FVector FEdMode::GetWidgetNormalFromCurrentAxis( void* InData ) { // Figure out the proper coordinate system. FMatrix matrix = FMatrix::Identity; if( Owner->GetCoordSystem() == COORD_Local ) { GetCustomDrawingCoordinateSystem( matrix, InData ); } // Get a base normal from the current axis. FVector BaseNormal(1,0,0); // Default to X axis switch( CurrentWidgetAxis ) { case EAxisList::Y: BaseNormal = FVector(0,1,0); break; case EAxisList::Z: BaseNormal = FVector(0,0,1); break; case EAxisList::XY: BaseNormal = FVector(1,1,0); break; case EAxisList::XZ: BaseNormal = FVector(1,0,1); break; case EAxisList::YZ: BaseNormal = FVector(0,1,1); break; case EAxisList::XYZ: BaseNormal = FVector(1,1,1); break; } // Transform the base normal into the proper coordinate space. return matrix.TransformPosition( BaseNormal ); }
FMatrix FEditorModeTools::GetCustomInputCoordinateSystem() { return GetCustomDrawingCoordinateSystem(); }
bool FEdModeGeometry::GetCustomInputCoordinateSystem( FMatrix& InMatrix, void* InData ) { return GetCustomDrawingCoordinateSystem( InMatrix, InData ); }