m_bCamDiscrete( true ),
m_bCubicClipping( false ),
m_showStats( true ),
- m_nStrafeMode( 0 ){
+ m_nStrafeMode( 3 ){
}
};
bool m_strafe; // true when in strafemode toggled by the ctrl-key
bool m_strafe_forward; // true when in strafemode by ctrl-key and shift is pressed for forward strafing
+ bool m_strafe_forward_invert; //silly option to invert forward strafing to support old fegs
unsigned int movementflags; // movement flags
Timer m_keycontrol_timer;
camera.origin -= camera.vright * strafespeed * dx;
if ( camera.m_strafe_forward ) {
- camera.origin -= camera.vpn * strafespeed * dy;
+ camera.origin += camera.m_strafe_forward_invert ? ( camera.vpn * strafespeed * dy ) : ( -camera.vpn * strafespeed * dy );
}
else{
camera.origin += camera.vup * strafespeed * dy;
cam->m_mouseMove.motion_delta( x, y, state );
+ cam->m_strafe_forward_invert = false;
+
switch ( g_camwindow_globals_private.m_nStrafeMode )
{
case 0:
- cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0;
- if ( cam->m_strafe ) {
- cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0;
- }
- else{
- cam->m_strafe_forward = false;
- }
+ cam->m_strafe = false;
break;
case 1:
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
cam->m_strafe_forward = cam->m_strafe;
break;
+ case 4:
+ cam->m_strafe_forward_invert = true;
+ default:
+ cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0;
+ if ( cam->m_strafe ) {
+ cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0;
+ }
+ else{
+ cam->m_strafe_forward = false;
+ }
+ break;
}
}
+
+
+
+
class CamWnd
{
View m_view;
);
}
- const char* strafe_mode[] = { "Both", "Forward", "Up" };
+ const char* strafe_mode[] = { "None", "Up", "Forward", "Both", "Both Inverted" };
page.appendCombo(
"Strafe Mode",
float grid = GetSnapGridSize();
Vector3 maxs( m_bounds.origin + m_bounds.extents );
Vector3 mins( m_bounds.origin - m_bounds.extents );
-// globalOutputStream() << "current: " << current << "\n";
+ //globalOutputStream() << "current: " << current << "\n";
for( std::size_t i = 0; i < 3; ++i ){
- if( current[i] != 0.f ){
+ if( fabs( current[i] ) > 0.000001f ){
float snapto1 = float_snapped( maxs[i] + current[i] , grid );
float snapto2 = float_snapped( mins[i] + current[i] , grid );
};
bool g_bAltDragManipulatorResize = false;
+bool g_bTmpComponentMode = false;
class DragManipulator : public Manipulator
{
{
( *i ).second->setSelected( true );
}
+ g_bTmpComponentMode = m_selected;
}
void setSelected( bool select ){
if ( Mode() == ePrimitive ) {
if ( ManipulatorMode() == eDrag ) {
+ g_bTmpComponentMode = false;
if( g_bAltDragManipulatorResize ){
Scene_SelectAll_Component( false, SelectionSystem::eVertex );
}
AABB RadiantSelectionSystem::getSelectionAABB() const {
AABB bounds;
if ( !nothingSelected() ) {
- if ( Mode() == eComponent ) {
+ if ( Mode() == eComponent || g_bTmpComponentMode ) {
Scene_BoundsSelectedComponent( GlobalSceneGraph(), bounds );
}
else