13 #ifndef CSOTRANSFORMATION_PROCESSOR_H
14 #define CSOTRANSFORMATION_PROCESSOR_H
33 SbVec3f
middle()
const {
return SbVec3f((v1[0]+v2[0])*.5f, (v1[1]+v2[1])*.5f, (v1[2]+v2[2])*.5f); }
119 BoolField* _showHandlesOnlyForSelectedCSOFld;
127 BoolField* _storeTransformationMatrixInCSOFld;
131 CSO* _checkScaleHandles();
132 CSO* _checkRotateHandles();
133 CSO* _checkTranslateHandles();
139 void _scaleCurrentCSO();
140 void _rotateCurrentCSO();
141 void _translateCurrentCSO();
143 void _initializeRotation();
144 void _finishRotation();
146 void _initializeHandleIcons();
148 float handleMargin()
const {
return _handleSize * 2.0f; }
149 float handleSize()
const {
return _handleSize * _handleScaleFld->
getFloatValue(); }
150 float influenceMargin()
const {
return _influenceMarginFld->
getFloatValue(); }
152 CSOInventorVoxelBoundingBox _convertVoxelBoundingBoxToInventor(CSO* cso,
Matrix4 worldToVoxelMatrix)
const;
153 Matrix4 _convertInventorToMLMatrix(
const SbMatrix& inventorMatrix)
const;
155 void _compileActiveCSOs(CSOList* csoList,
View2DSliceList* slicelist, CSOBoundingBox slabBB, std::vector<CSOInventorVoxelBoundingBox>& voxelBBList);
157 Matrix4 _getCurrentTransformationMatrix(CSO* cso);
158 void _updateTransformationMatrixByTranslation(
const Matrix4& translationMatrix, CSO* cso);
159 void _updateTransformationMatrixByRotation(
const Matrix4& rotationMatrix, CSO* cso);
161 Matrix4 _initialCSOInteractiveMatrix;
166 bool _shouldStoreInUndoManager;
172 bool _mouseOverScaleHandle;
173 bool _mouseOverRotateHandle;
174 bool _mouseOverTranslateHandle;
179 bool _hasRotationSingularity;
182 CSOInventorVoxelBoundingBox _rotateBoundingBox;
183 float _rotationAngle;
194 float _interactionStartX;
195 float _interactionStartY;
205 std::vector<CSOInventorVoxelBoundingBox> _visibleCSOBoundingBoxes;
206 std::vector<CSOInventorVoxelBoundingBox> _editableCSOBoundingBoxes;
#define SOCSO_EXPORT
Header file for system independent resolution.
SoView2D is a 2D viewer for image data.
Defines and implements a class to store multiple images and draw them via OpenGL.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
Field to encapsulate a boolean value.
The CSOBoundingBox defines an axis parallel bounding box with double precision.
Base class for processor modules; those provide mechanisms for an interactive generation of seed poin...
The CSO represents a contour segmentation object.
Field to encapsulate a vector of 3 float values representing an (rgb) color with all properties of Ve...
Base class for all fields used in the ML.
Field to encapsulate a float value.
float getFloatValue() const
Returns the value of the field.
Field to encapsulate a string value.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
@ TRANSFORMATION_MODE_ROTATE
@ TRANSFORMATION_MODE_TRANSLATE
@ TRANSFORMATION_MODE_SCALE