Hide menu
cadex::ModelPrs_ManipulatorObserver Class Referenceabstract

Base abstract class for observers registered in ModelPrs_Manipulator. More...

Public Member Functions

 ModelPrs_ManipulatorObserver ()
 Constructor.
 
virtual void ModeChanged (ModelPrs_ManipulatorMode theMode, const ModelData_Direction &theDirection)=0
 A callback is invoked when the manipulator has changed mode or the direction of translation/direction to rotate. Subclasses must redefine this method to process this event.
 
virtual void StartTransformation ()=0
 A callback is invoked when a manipulator controller is pressed down by the mouse button. Subclasses must redefine this method to process this event. More...
 
virtual void Transformed (const ModelData_Transformation &theLocalTrsf, const ModelData_Transformation &theGlobalTrsf, double theValue)=0
 A callback is invoked when the manipulator makes transformations to the graphic presentation of scene nodes. Subclasses must redefine this method to process this event. More...
 
virtual void StopTransformation ()=0
 A callback is invoked when a manipulator controller is released. Before that, the manipulator updates the transformation property of the attached scene node. Subclasses must redefine this method to process this event. More...
 

Detailed Description

Base abstract class for observers registered in ModelPrs_Manipulator.

Warning
This class is a part of Visualization Toolkit add-on, which is licensed separately from the base CAD Exchanger SDK.

Subclasses must redefine all virtual functions. User-defined observer must be registered in the manipulator object with the help of ModelPrs_Manipulator::Register().

Examples
visualization/qtquick_qml/manipulator/main.cxx.

Member Function Documentation

◆ StartTransformation()

void cadex::ModelPrs_ManipulatorObserver::StartTransformation ( )
pure virtual

A callback is invoked when a manipulator controller is pressed down by the mouse button. Subclasses must redefine this method to process this event.

See also
StopTransformation()
Examples
visualization/qtquick_qml/manipulator/main.cxx.

◆ StopTransformation()

void cadex::ModelPrs_ManipulatorObserver::StopTransformation ( )
pure virtual

A callback is invoked when a manipulator controller is released. Before that, the manipulator updates the transformation property of the attached scene node. Subclasses must redefine this method to process this event.

See also
StartTransformation()
Examples
visualization/qtquick_qml/manipulator/main.cxx.

◆ Transformed()

void cadex::ModelPrs_ManipulatorObserver::Transformed ( const ModelData_Transformation theLocalTrsf,
const ModelData_Transformation theGlobalTrsf,
double  theValue 
)
pure virtual

A callback is invoked when the manipulator makes transformations to the graphic presentation of scene nodes. Subclasses must redefine this method to process this event.

Returns the local transformation, which takes into account the ancestors' transformations. It will be added to the attached scene node at the end of the transformation. The global transformation is just transformation from the start to the end position of the manipulator. The value is the distance of translation or the angle of rotation in degrees.

See also
ModeChanged(), StopTransformation()
Examples
visualization/qtquick_qml/manipulator/main.cxx.