135 static void baseEventCB(
void* userData,
ml::BaseEvent* event);
143 bool isInSelectionDistance(
const SbVec2f& pos1,
const SbVec2f& pos2,
float selectionDistance)
const;
145 bool isInTranslationArea(
const SbVec2f& mouseDevicePosition,
const std::vector < SbVec2f >& translateHandlesPositions)
const;
149 void clearHandlesPositions();
151 void setScaleCursorShape();
153 void limitScaleOffset(SbVec2f& scaleOffset);
155 void computeMoveAndScaleFactors(
const SbVec3f& offsetX,
const SbVec3f& offsetY,
float voxelBBX,
float voxelBBY,
156 float& voxelMoveX,
float& voxelMoveY,
float& voxelScaleX,
float& voxelScaleY)
const;
159 void computeMoveAndScaleFactorsForIsotropicScaling(
const SbVec3f& bbVoxelCenterPoint,
const SbVec3f& currentVoxelPosition,
float& voxelScaleX,
float& voxelScaleY);
161 void drawRotateIndicatorLine(
ml::CSO* cso,
const SbVec2f& rotateHandlePosition,
float rotateHandleOffset);
163 boost::unordered_map < MatrixHashPair, std::vector < SbVec2f >,
MatrixHashFunction > _scaleHandlesPositionsCache;
164 boost::unordered_map < MatrixHashPair, std::vector < SbVec2f >,
MatrixHashFunction > _translateHandlesPositionsCache;
166 boost::unordered_map < MatrixHashPair, SbVec2f, MatrixHashFunction > _rotateHandlePositionCache;
167 boost::unordered_map < MatrixHashPair, SbVec2f, MatrixHashFunction > _rotateCenterCache;
170 void resetActiveHandleIndices()
172 _activeScaleHandleIndex = -1;
173 _activeTranslateHandleIndex = -1;
174 _activeRotateHandleIndex = -1;
178 bool shouldShowHandles()
const;
183 int _activeScaleHandleIndex;
184 int _activeTranslateHandleIndex;
185 int _activeRotateHandleIndex;
187 SbVec2f _startDevicePosition;
188 SbVec3f _startVoxelPositionForIsotropicScaling;
189 SbVec3f _lastWorldPosition;
190 SbVec3f _lastGoodCurrentWorldPosition;
194 ml::CSO _originalCSO;
196 SbVec2f _rotationCenterDevice;
197 void setRotationCenter(View2DSliceList* slicelist);
198 ml::Matrix4 composeMLRotationMatrix(
const SoPointerPosition& pos);
200 ml::Matrix4 convertInventorToMLMatrix(
const SbMatrix& matrix);
202 ml::CSO* _selectedCSO;
#define SOCSO_EXPORT
Header file for system independent resolution.
SoCSOEditorExtension()
Hidden constructor.
SoPointerPosition manages the current position of the mouse cursor.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
The CSOBoundingBox defines an axis-parallel bounding box with double precision.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Tvec3< MLdouble > Vector3
A vector with three components of type double.