VisualizationFoundation CAT3DManipulator
Usage: you must use this class as is. You should never derive it.
public class CAT3DManipulator
Class to control a 3D representation.
Role:
A CAT3DManipulator is a Controller attached to a 3D representation providing
a proposition of a new position for 3D manipulation after the representation
selected by the user has been manipulated.
Usage of manipulators
- In the instanciation :
- Instanciate a manipulator connected to the representation :
CAT3DManipulator * _Manip = new
CAT3DManipulator( this, "MYName", MYRep, CAT3DManipulator::Translation);
- Position the manipulator
_Manip->SetPosition( PositionComputedFromNewModelization)
- Set characteristics (Invariants) Note: Do it after SetPosition()
Manip->SetTranslationDirection( CATMathJ);
- Branch a callback in you father command to be informed about the manipulation
AddAnalyseNotificationCB( _Manip, CATManipulator::GetCATManipulate(),
(CATCommandMethod) &MYCommand::MYCallback, NULL);
- In the callback,
- Read data of manipulation
- read the RESULT of the manipulation
CATMathAxis Position = ((CAT3DManipulator *)Command)->GetPosition();
- read the event elementary TRANSFORMATION of the manipulation
CATTransformationNotification *TransfoNotif =
((CATTransformationNotification *) Command->SendCommandSpecificObject(
CATTransformationNotification::ClassName(), Notification));
CATMathTransformation *Transformation = TransfoNotif->GetNotification();
- In the callback, Update your modelization
- In the callback, Reposition the manipulator if needed (usualy when there is constraints)
_Manip->SetPosition( PositionComputedFromNewModelization)
Constructor and Destructor Index
- o
CAT3DManipulator(CATCommand*,CATString&,CAT3DRep*,ManipulationStyle,ManipulationStyle)
- Construction of the manipulator.
Method Index
- o
GetManipulationStyle(ManipulationStyle&,ManipulationStyle&)
- Gets the manipulation style.
- o
GetPosition()
- Gets the current position of the manipulator.
- o
GetRotationLine(CATMathLine&)
- Gets the invariant line of LineRotation and PlaneMovement.
- o
GetRotationPoint(CATMathPoint&)
- Gets the invariant point of Point Rotation.
- o
GetTranslationDirection(CATMathDirection&)
- Gets the invariant direction of translation direction.
- o
GetTranslationPlane(CATMathPlane&)
- Gets the invariant plane of translationPlane and PlaneMovement.
- o
SetPosition(CATMathAxis&)
- Sets the position of the manipulator.
- o
SetRotationLine(CATMathLine&)
- Sets the invariant line of LineRotation and PlaneMovement.
- o
SetRotationPoint(CATMathPoint&)
- Sets the invariant point of PointRotation.
- o
SetTranslationDirection(CATMathDirection&)
- Sets the invariant direction of DirectionTranslation.
- o
SetTranslationPlane(CATMathPlane&)
- Sets the invariant plane of PlaneTranslation and PlaneMovement.
Enumerated Type Index
- o
ManipulationStyle
- Defines the different types of manipulation available for
a 3D representation.
Constructor and Destructor
o CAT3DManipulator
public CAT3DManipulator( | | iFather, |
| const | iName, |
| | iRep, |
| const | iFirstStyle | =NoManipulation, |
| const | iSecondStyle | =NoManipulation) |
-
Construction of the manipulator.
- Parameters:
-
- iFirstStyle
- = style of manipulation used by Mouse Left button drag
- iSecondStyle
- = style of manipulation used by Mouse Left+Middle buttons drag (left THEN middle)
Methods
o GetManipulationStyle
public GetManipulationStyle( | | o_firstStyle, |
| | o_secondStyle) |
-
Gets the manipulation style.
- Parameters:
-
- iFirstStyle
- = style of manipulation used by Mouse Left button drag
- iSecondStyle
- = style of manipulation used by Mouse Left+Middle buttons drag (left THEN middle)
o GetPosition
public virtual GetPosition( | ) |
-
Gets the current position of the manipulator.
o GetRotationLine
public GetRotationLine( | | o_line) |
-
Gets the invariant line of LineRotation and PlaneMovement.
- Parameters:
-
- o_line
- = invariant line.
o GetRotationPoint
public GetRotationPoint( | | o_point) |
-
Gets the invariant point of Point Rotation.
- Parameters:
-
- o_point
- = invariant point
o GetTranslationDirection
public GetTranslationDirection( | | o_direction) |
-
Gets the invariant direction of translation direction.
- Parameters:
-
- o_direction
- = invariant direction
o GetTranslationPlane
public GetTranslationPlane( | | o_plane) |
-
Gets the invariant plane of translationPlane and PlaneMovement.
- Parameters:
-
- o_plane
- = invariant plane.
o SetPosition
public virtual SetPosition( | const | iPosition) |
-
Sets the position of the manipulator.
o SetRotationLine
public virtual SetRotationLine( | const | iLine) |
-
Sets the invariant line of LineRotation and PlaneMovement.
o SetRotationPoint
public virtual SetRotationPoint( | const | iPoint) |
-
Sets the invariant point of PointRotation.
o SetTranslationDirection
public virtual SetTranslationDirection( | const | iWAxis) |
-
Sets the invariant direction of DirectionTranslation.
o SetTranslationPlane
public virtual SetTranslationPlane( | const | iPlane) |
-
Sets the invariant plane of PlaneTranslation and PlaneMovement.
Enumerated Types
o ManipulationStyle
-
enum ManipulationStyle {
NoManipulation,
DirectionTranslation,
PlaneTranslation,
PlaneMovement,
LineRotation,
PointRotation,
FrontestPlaneTranslation
}
Defines the different types of manipulation available for
a 3D representation.
- Parameters:
-
- NoManipulation
- The CAT3DManipulator does no specific work
- DirectionTranslation
- The CAT3Dmanipulator contrains its position along a given direction during the manipulation
- PlaneTranslation
- The CAT3Dmanipulator contrains its position along a given plane during the manipulation
- PlaneMovement
- Do not use
- LineRotation
- The CAT3Dmanipulator contrains its position on a circle normal to a given axis
- PointRotation
- The CAT3Dmanipulator contrains its position on a sphere centered on a given point
- FrontestPlaneTranslation
- The CAT3Dmanipulator contrains its position along a plane parallel to the screen
This object is included in the file: CAT3DManipulator.h
If needed, your Imakefile.mk should include the module: CATVisFoundation
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.