1 // Created on: 2015-12-23
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2015 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _AIS_Manipulator_HeaderFile
17 #define _AIS_Manipulator_HeaderFile
19 #include <AIS_InteractiveObject.hxx>
20 #include <AIS_ManipulatorMode.hxx>
25 #include <Graphic3d_ArrayOfQuadrangles.hxx>
26 #include <Graphic3d_ArrayOfTriangles.hxx>
27 #include <Graphic3d_Group.hxx>
28 #include <NCollection_HSequence.hxx>
29 #include <Poly_Triangulation.hxx>
30 #include <V3d_View.hxx>
31 #include <Standard_Version.hxx>
32 #include <Standard_DefineHandle.hxx>
33 NCOLLECTION_HSEQUENCE(AIS_ManipulatorObjectSequence, Handle(AIS_InteractiveObject));
35 DEFINE_STANDARD_HANDLE (AIS_Manipulator, AIS_InteractiveObject)
37 //! Interactive object class to manipulate local transformation of another interactive
38 //! object or a group of objects via mouse.
39 //! It manages three types of manipulations in 3D space:
40 //! - translation through axis
41 //! - scaling within axis
42 //! - rotation around axis
43 //! To enable one of this modes, selection mode (from 1 to 3) is to be activated.
44 //! There are three orthogonal transformation axes defined by position property of
45 //! the manipulator. Particular transformation mode can be disabled for each
46 //! of the axes or all of them. Furthermore each of the axes can be hidden or
48 //! The following steps demonstrate how to attach, configure and use manipulator
49 //! for an interactive object:
50 //! Step 1. Create manipulator object and adjust it appearance:
52 //! Handle(AIS_Manipulator) aManipulator = new AIS_Manipulator();
53 //! aManipulator->SetPart (0, AIS_Manipulator::Scaling, Standard_False);
54 //! aManipulator->SetPart (1, AIS_Manipulator::Rotation, Standard_False);
55 //! // Attach manipulator to already displayed object and manage manipulation modes
56 //! aManipulator->AttachToObject (anAISObject);
57 //! aManipulator->EnableMode (AIS_Manipulator::Translation);
58 //! aManipulator->EnableMode (AIS_Manipulator::Rotation);
59 //! aManipulator->EnableMode (AIS_Manipulator::Scaling);
61 //! Note that you can enable only one manipulation mode but have all visual parts displayed.
62 //! This code allows you to view manipulator and select its manipulation parts.
63 //! Note that manipulator activates mode on part selection.
64 //! If this mode is activated, no selection will be performed for manipulator.
65 //! It can be activated with highlighting. To enable this:
67 //! aManipulator->SetModeActivationOnDetection (Standard_True);
69 //! Step 2. To perform transformation of object use next code in your event processing chain:
71 //! // catch mouse button down event
72 //! if (aManipulator->HasActiveMode())
74 //! aManipulator->StartTransform (anXPix, anYPix, aV3dView);
77 //! // or track mouse move event
78 //! if (aManipulator->HasActiveMode())
80 //! aManipulator->Transform (anXPix, anYPix, aV3dView);
81 //! aV3dView->Redraw();
84 //! // or catch mouse button up event (apply) or escape event (cancel)
85 //! aManipulator->StopTransform(/*Standard_Boolean toApply*/);
87 //! Step 3. To deactivate current manipulation mode use:
88 //! @code aManipulator->DeactivateCurrentMode();
90 //! Step 4. To detach manipulator from object use:
92 //! aManipulator->Detach();
94 //! The last method erases manipulator object.
96 //! On construction an instance of AIS_Manipulator object is bound to Graphic3d_ZLayerId_Topmost layer,
97 //! so make sure to call for your AIS_InteractiveContext the method MainSelector()->SetPickClosest (Standard_False)
98 //! otherwise you may notice issues with activation of modes.
99 class AIS_Manipulator : public AIS_InteractiveObject
103 //! Constructs a manipulator object with default placement and all parts to be displayed.
104 Standard_EXPORT AIS_Manipulator();
106 //! Constructs a manipulator object with input location and positions of axes and all parts to be displayed.
107 Standard_EXPORT AIS_Manipulator (const gp_Ax2& thePosition);
109 //! Disable or enable visual parts for translation, rotation or scaling for some axis.
110 //! By default all parts are enabled (will be displayed).
111 //! @warning Enabling or disabling of visual parts of manipulator does not manage the manipulation (selection) mode.
112 //! @warning Raises program error if axis index is < 0 or > 2.
113 Standard_EXPORT void SetPart (const Standard_Integer theAxisIndex, const AIS_ManipulatorMode theMode, const Standard_Boolean theIsEnabled);
115 //! Behavior settings to be applied when performing transformation:
116 //! - FollowTranslation - whether the manipulator will be moved together with an object.
117 //! - FollowRotation - whether the manipulator will be rotated together with an object.
118 struct OptionsForAttach {
120 OptionsForAttach() : AdjustPosition (Standard_True), AdjustSize (Standard_False), EnableModes (Standard_True) {}
121 OptionsForAttach& SetAdjustPosition (const Standard_Boolean theApply) { AdjustPosition = theApply; return *this; }
122 OptionsForAttach& SetAdjustSize (const Standard_Boolean theApply) { AdjustSize = theApply; return *this; }
123 OptionsForAttach& SetEnableModes (const Standard_Boolean theApply) { EnableModes = theApply; return *this; }
125 Standard_Boolean AdjustPosition;
126 Standard_Boolean AdjustSize;
127 Standard_Boolean EnableModes;
130 //! Attaches himself to the input interactive object and become displayed in the same context.
131 //! It is placed in the center of object bounding box, and its size is adjusted to the object bounding box.
132 Standard_EXPORT void Attach (const Handle(AIS_InteractiveObject)& theObject, const OptionsForAttach& theOptions = OptionsForAttach());
134 //! Attaches himself to the input interactive object group and become displayed in the same context.
135 //! It become attached to the first object, baut manage manipulation of the whole group.
136 //! It is placed in the center of object bounding box, and its size is adjusted to the object bounding box.
137 Standard_EXPORT void Attach (const Handle(AIS_ManipulatorObjectSequence)& theObject, const OptionsForAttach& theOptions = OptionsForAttach());
139 //! Enable manipualtion mode.
140 //! @warning It activates selection mode in the current context.
141 //! If manipulator is not displayed, no mode will be activated.
142 Standard_EXPORT void EnableMode (const AIS_ManipulatorMode theMode);
144 //! Enables mode activation on detection (highlighting).
145 //! By default, mode is activated on selection of manipulator part.
146 //! @warning If this mode is enabled, selection of parts does nothing.
147 void SetModeActivationOnDetection (const Standard_Boolean theToEnable)
149 myIsActivationOnDetection = theToEnable;
152 //! @return true if manual mode activation is enabled.
153 Standard_Boolean IsModeActivationOnDetection() const
155 return myIsActivationOnDetection;
160 //! Init start (reference) transformation.
161 //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform
162 //! and is used only for custom transform set. If Transform(const Standard_Integer, const Standard_Integer) is used,
163 //! initial data is set automatically, and it is reset on DeactivateCurrentMode call if it is not reset yet.
164 Standard_EXPORT void StartTransform (const Standard_Integer theX, const Standard_Integer theY, const Handle(V3d_View)& theView);
166 //! Apply to the owning objects the input transformation.
167 //! @remark The transformation is set using SetLocalTransformation for owning objects.
168 //! The location of the manipulator is stored also in Local Transformation,
169 //! so that there's no need to redisplay objects.
170 //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform
171 //! and is used only for custom transform set.
172 //! @warning It will does nothing if transformation is not initiated (with StartTransform() call).
173 Standard_EXPORT void Transform (const gp_Trsf& aTrsf);
175 //! Reset start (reference) transformation.
176 //! @param theToApply [in] option to apply or to cancel the started transformation.
177 //! @warning It is used in chain with StartTransform-Transform(gp_Trsf)-StopTransform
178 //! and is used only for custom transform set.
179 Standard_EXPORT void StopTransform (const Standard_Boolean theToApply = Standard_True);
181 //! Apply transformation made from mouse moving from start position
182 //! (save on the first Tranform() call and reset on DeactivateCurrentMode() call.)
183 //! to the in/out mouse position (theX, theY)
184 Standard_EXPORT gp_Trsf Transform (const Standard_Integer theX, const Standard_Integer theY,
185 const Handle(V3d_View)& theView);
187 //! Computes transformation of parent object according to the active mode and input motion vector.
188 //! You can use this method to get object transformation according to current mode or use own algorithm
189 //! to implement any other tranformation for modes.
190 //! @return transformation of parent object.
191 Standard_EXPORT Standard_Boolean ObjectTransformation (const Standard_Integer theX, const Standard_Integer theY,
192 const Handle(V3d_View)& theView, gp_Trsf& theTrsf);
194 //! Make inactive the current selected manipulator part and reset current axis index and current mode.
195 //! After its call HasActiveMode() returns false.
196 //! @sa HasActiveMode()
197 Standard_EXPORT void DeactivateCurrentMode();
199 //! Detaches himself from the owner object, and removes itself from context.
200 Standard_EXPORT void Detach();
202 //! @return all owning objects.
203 Standard_EXPORT Handle(AIS_ManipulatorObjectSequence) Objects() const;
205 //! @return the first (leading) object of the owning objects.
206 Standard_EXPORT Handle(AIS_InteractiveObject) Object() const;
208 //! @return one of the owning objects.
209 //! @warning raises program error if theIndex is more than owning objects count or less than 1.
210 Standard_EXPORT Handle(AIS_InteractiveObject) Object (const Standard_Integer theIndex) const;
212 //! @return true if manipulator is attached to some interactive object (has owning object).
213 Standard_Boolean IsAttached() const { return HasOwner(); }
215 //! @return true if some part of manipulator is selected (transformation mode is active, and owning object can be transformed).
216 Standard_Boolean HasActiveMode() const { return IsAttached() && myCurrentMode != AIS_MM_None; }
218 Standard_Boolean HasActiveTransformation() { return myHasStartedTransformation; }
220 gp_Trsf StartTransformation() const { return !myStartTrsfs.IsEmpty() ? myStartTrsfs.First() : gp_Trsf(); }
222 gp_Trsf StartTransformation (Standard_Integer theIndex) const
224 Standard_ProgramError_Raise_if (theIndex < 1 || theIndex > Objects()->Upper(),
225 "AIS_Manipulator::StartTransformation(): theIndex is out of bounds");
226 return !myStartTrsfs.IsEmpty() ? myStartTrsfs (theIndex) : gp_Trsf();
229 public: //! @name Configuration of graphical transformations
231 //! Enable or disable zoom persistence mode for the manipulator. With
232 //! this mode turned on the presentation will keep fixed screen size.
233 //! @warning when turned on this option overrides transform persistence
234 //! properties and local transformation to achieve necessary visual effect.
235 //! @warning revise use of AdjustSize argument of of \sa AttachToObjects method
236 //! when enabling zoom persistence.
237 Standard_EXPORT void SetZoomPersistence (const Standard_Boolean theToEnable);
239 //! Returns state of zoom persistence mode, whether it turned on or off.
240 Standard_Boolean ZoomPersistence() const { return myIsZoomPersistentMode; }
242 //! Redefines transform persistence management to setup transformation for sub-presentation of axes.
243 //! @warning this interactive object does not support custom transformation persistence when
244 //! using \sa ZoomPersistence mode. In this mode the transformation persistence flags for
245 //! presentations are overridden by this class.
246 //! @warning Invokes debug assertion to catch incompatible usage of the method with \sa ZoomPersistence mode,
247 //! silently does nothing in release mode.
248 //! @warning revise use of AdjustSize argument of of \sa AttachToObjects method
249 //! when enabling zoom persistence.
250 Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers) Standard_OVERRIDE;
252 public: //! @name Setters for parameters
254 AIS_ManipulatorMode ActiveMode() const { return myCurrentMode; }
256 //! @return poition of manipulator interactive object.
257 const gp_Ax2& Position() const { return myPosition; }
259 //! Sets position of the manipulator object.
260 Standard_EXPORT void SetPosition (const gp_Ax2& thePosition);
262 Standard_ShortReal Size() const { return myAxes[0].Size(); }
264 //! Sets size (length of side of the manipulator cubic bounding box.
265 Standard_EXPORT void SetSize (const Standard_ShortReal theSideLength);
267 //! Sets gaps between translator, scaler and rotator sub-presentations.
268 Standard_EXPORT void SetGap (const Standard_ShortReal theValue);
272 //! Behavior settings to be applied when performing transformation:
273 //! - FollowTranslation - whether the manipulator will be moved together with an object.
274 //! - FollowRotation - whether the manipulator will be rotated together with an object.
275 struct BehaviorOnTransform {
277 BehaviorOnTransform() : FollowTranslation (Standard_True), FollowRotation (Standard_True) {}
278 BehaviorOnTransform& SetFollowTranslation (const Standard_Boolean theApply) { FollowTranslation = theApply; return *this; }
279 BehaviorOnTransform& SetFollowRotation (const Standard_Boolean theApply) { FollowRotation = theApply; return *this; }
281 Standard_Boolean FollowTranslation;
282 Standard_Boolean FollowRotation;
285 //! Sets behavior settings for transformation action carried on the manipulator,
286 //! whether it translates, rotates together with the transformed object or not.
287 void SetTransformBehavior (const BehaviorOnTransform& theSettings) { myBehaviorOnTransform = theSettings; }
289 //! @return behavior settings for transformation action of the manipulator.
290 BehaviorOnTransform& ChangeTransformBehavior() { return myBehaviorOnTransform; }
292 //! @return behavior settings for transformation action of the manipulator.
293 const BehaviorOnTransform& TransformBehavior() const { return myBehaviorOnTransform; }
295 public: //! @name Presentation computation
297 //! Fills presentation.
298 //! @note Manipulator presentation does not use display mode and for all modes has the same presentation.
299 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
300 const Handle(Prs3d_Presentation)& thePrs,
301 const Standard_Integer theMode = 0) Standard_OVERRIDE;
303 //! Computes selection sensitive zones (triangulation) for manipulator.
304 //! @param theNode [in] Selection mode that is treated as transformation mode.
305 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
306 const Standard_Integer theMode) Standard_OVERRIDE;
308 //! Disables auto highlighting to use HilightSelected() and HilightOwnerWithColor() overridden methods.
309 virtual Standard_Boolean IsAutoHilight() const Standard_OVERRIDE
311 return Standard_False;
314 //! Method which clear all selected owners belonging
315 //! to this selectable object ( for fast presentation draw ).
316 Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
318 //! Method which draws selected owners ( for fast presentation draw ).
319 Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& thePM, const SelectMgr_SequenceOfOwner& theSeq) Standard_OVERRIDE;
321 //! Method which hilight an owner belonging to
322 //! this selectable object ( for fast presentation draw ).
323 Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
324 const Handle(Prs3d_Drawer)& theStyle,
325 const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE;
329 Standard_EXPORT void init();
331 Standard_EXPORT void updateTransformation();
333 Standard_EXPORT Handle(Prs3d_Presentation) getHighlightPresentation (const Handle(SelectMgr_EntityOwner)& theOwner) const;
335 Standard_EXPORT Handle(Graphic3d_Group) getGroup (const Standard_Integer theIndex, const AIS_ManipulatorMode theMode) const;
337 Standard_EXPORT void attachToBox (const Bnd_Box& theBox);
339 Standard_EXPORT void adjustSize (const Bnd_Box& theBox);
341 Standard_EXPORT void setTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers);
343 //! Redefines local transformation management method to inform user of inproper use.
344 //! @warning this interactive object does not support setting custom local transformation,
345 //! this class solely uses this property to implement visual positioning of the manipulator
346 //! without need for recomputing presentation.
347 //! @warning Invokes debug assertion in debug to catch incompatible usage of the
348 //! method, silently does nothing in release mode.
349 Standard_EXPORT virtual void setLocalTransformation (const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
350 using AIS_InteractiveObject::SetLocalTransformation; // hide visibility
352 protected: //! @name Auxiliary classes to fill presentation with proper primitives
360 myTriangulation.Nullify();
365 const Handle(Poly_Triangulation)& Triangulation() const { return myTriangulation; }
367 const Handle(Graphic3d_ArrayOfTriangles)& Array() const { return myArray; }
371 Handle(Poly_Triangulation) myTriangulation;
372 Handle(Graphic3d_ArrayOfTriangles) myArray;
375 class Disk : public Quadric
387 void Init (const Standard_ShortReal theInnerRadius,
388 const Standard_ShortReal theOuterRadius,
389 const gp_Ax1& thePosition,
390 const Standard_Integer theSlicesNb = 20,
391 const Standard_Integer theStacksNb = 20);
396 Standard_ShortReal myInnerRad;
397 Standard_ShortReal myOuterRad;
400 class Sphere : public Quadric
408 void Init (const Standard_ShortReal theRadius,
409 const gp_Pnt& thePosition,
410 const Standard_Integer theSlicesNb = 20,
411 const Standard_Integer theStacksNb = 20);
416 Standard_ShortReal myRadius;
426 void Init (const gp_Ax1& thePosition, const Standard_ShortReal myBoxSize);
428 const Handle(Poly_Triangulation)& Triangulation() const { return myTriangulation; }
430 const Handle(Graphic3d_ArrayOfTriangles)& Array() const { return myArray; }
434 void addTriangle (const Standard_Integer theIndex, const gp_Pnt& theP1, const gp_Pnt& theP2, const gp_Pnt& theP3,
435 const gp_Dir& theNormal);
439 Handle(Poly_Triangulation) myTriangulation;
440 Handle(Graphic3d_ArrayOfTriangles) myArray;
443 //! The class describes on axis sub-object.
444 //! It includes sub-objects itself:
452 Axis (const gp_Ax1& theAxis = gp_Ax1(),
453 const Quantity_Color& theColor = Quantity_Color(),
454 const Standard_ShortReal theLength = 10.0f);
456 void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
457 const Handle(Prs3d_Presentation)& thePrs,
458 const Handle(Prs3d_ShadingAspect)& theAspect);
460 const gp_Ax1& ReferenceAxis() const { return myReferenceAxis; }
462 void SetPosition (const gp_Ax1& thePosition) { myPosition = thePosition; }
464 const gp_Ax1& Position() const { return myPosition; }
466 void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers)
468 if (!myHighlightTranslator.IsNull())
470 myHighlightTranslator->SetTransformPersistence (theTrsfPers);
473 if (!myHighlightScaler.IsNull())
475 myHighlightScaler->SetTransformPersistence (theTrsfPers);
478 if (!myHighlightRotator.IsNull())
480 myHighlightRotator->SetTransformPersistence (theTrsfPers);
484 void Transform (const Handle(Geom_Transformation)& theTransformation)
486 if (!myHighlightTranslator.IsNull())
488 myHighlightTranslator->SetTransformation (theTransformation);
491 if (!myHighlightScaler.IsNull())
493 myHighlightScaler->SetTransformation (theTransformation);
496 if (!myHighlightRotator.IsNull())
498 myHighlightRotator->SetTransformation (theTransformation);
502 Standard_Boolean HasTranslation() const { return myHasTranslation; }
504 Standard_Boolean HasRotation() const { return myHasRotation; }
506 Standard_Boolean HasScaling() const { return myHasScaling; }
508 void SetTranslation (const Standard_Boolean theIsEnabled) { myHasTranslation = theIsEnabled; }
510 void SetRotation (const Standard_Boolean theIsEnabled) { myHasRotation = theIsEnabled; }
512 void SetScaling (const Standard_Boolean theIsEnabled) { myHasScaling = theIsEnabled; }
514 Quantity_Color Color() const { return myColor; }
516 Standard_ShortReal AxisLength() const { return myLength; }
518 Standard_ShortReal AxisRadius() const { return myAxisRadius; }
520 void SetAxisRadius (const Standard_ShortReal theValue) { myAxisRadius = theValue; }
522 const Handle(Prs3d_Presentation)& TranslatorHighlightPrs() const { return myHighlightTranslator; }
524 const Handle(Prs3d_Presentation)& RotatorHighlightPrs() const { return myHighlightRotator; }
526 const Handle(Prs3d_Presentation)& ScalerHighlightPrs() const { return myHighlightScaler; }
528 const Handle(Graphic3d_Group)& TranslatorGroup() const { return myTranslatorGroup; }
530 const Handle(Graphic3d_Group)& RotatorGroup() const { return myRotatorGroup; }
532 const Handle(Graphic3d_Group)& ScalerGroup() const { return myScalerGroup; }
534 const Handle(Graphic3d_ArrayOfTriangles)& TriangleArray() const { return myTriangleArray; }
536 void SetIndent (const Standard_ShortReal theValue) { myIndent = theValue; }
538 Standard_ShortReal Size() const { return myLength + myBoxSize + myDiskThickness + myIndent * 2.0f; }
540 gp_Pnt ScalerCenter (const gp_Pnt& theLocation) const { return theLocation.XYZ() + myPosition.Direction().XYZ() * (myLength + myIndent + myBoxSize * 0.5f); }
542 void SetSize (const Standard_ShortReal theValue)
544 if (myIndent > theValue * 0.1f)
546 myLength = theValue * 0.7f;
547 myBoxSize = theValue * 0.15f;
548 myDiskThickness = theValue * 0.05f;
549 myIndent = theValue * 0.05f;
551 else // use pre-set value of predent
553 Standard_ShortReal aLength = theValue - 2 * myIndent;
554 myLength = aLength * 0.8f;
555 myBoxSize = aLength * 0.15f;
556 myDiskThickness = aLength * 0.05f;
558 myInnerRadius = myIndent * 2 + myBoxSize + myLength;
559 myAxisRadius = myBoxSize / 4.0f;
562 Standard_Integer FacettesNumber() const { return myFacettesNumber; }
566 const gp_Pnt& TranslatorTipPosition() const { return myArrowTipPos; }
567 const Disk& RotatorDisk() const { return myCircle; }
568 float RotatorDiskRadius() const { return myCircleRadius; }
569 const Cube& ScalerCube() const { return myCube; }
570 const gp_Pnt& ScalerCubePosition() const { return myCubePos; }
574 gp_Ax1 myReferenceAxis; //!< Returns reference axis assignment.
575 gp_Ax1 myPosition; //!< Position of the axis including local transformation.
576 Quantity_Color myColor;
578 Standard_Boolean myHasTranslation;
579 Standard_ShortReal myLength; //!< Length of translation axis.
580 Standard_ShortReal myAxisRadius;
582 Standard_Boolean myHasScaling;
583 Standard_ShortReal myBoxSize; //!< Size of scaling cube.
585 Standard_Boolean myHasRotation;
586 Standard_ShortReal myInnerRadius; //!< Radius of rotation circle.
587 Standard_ShortReal myDiskThickness;
588 Standard_ShortReal myIndent; //!< Gap between visual part of the manipulator.
592 Standard_Integer myFacettesNumber;
594 gp_Pnt myArrowTipPos;
596 float myCircleRadius;
600 Handle(Graphic3d_Group) myTranslatorGroup;
601 Handle(Graphic3d_Group) myScalerGroup;
602 Handle(Graphic3d_Group) myRotatorGroup;
604 Handle(Prs3d_Presentation) myHighlightTranslator;
605 Handle(Prs3d_Presentation) myHighlightScaler;
606 Handle(Prs3d_Presentation) myHighlightRotator;
608 Handle(Graphic3d_ArrayOfTriangles) myTriangleArray;
614 Axis myAxes[3]; //!< Tree axes of the manipulator.
615 Sphere myCenter; //!< Visual part displaying the center sphere of the manipulator.
616 gp_Ax2 myPosition; //!< Position of the manipulator object. it displays its location and position of its axes.
618 Standard_Integer myCurrentIndex; //!< Index of active axis.
619 AIS_ManipulatorMode myCurrentMode; //!< Name of active manipulation mode.
621 Standard_Boolean myIsActivationOnDetection; //!< Manual activation of modes (not on parts selection).
622 Standard_Boolean myIsZoomPersistentMode; //!< Zoom persistence mode activation.
623 BehaviorOnTransform myBehaviorOnTransform; //!< Behavior settings applied on manipulator when transforming an object.
625 protected: //! @name Fields for interactive transformation. Fields only for internal needs. They do not have public interface.
627 NCollection_Sequence<gp_Trsf> myStartTrsfs; //!< Owning object transformation for start. It is used internally.
628 Standard_Boolean myHasStartedTransformation; //!< Shows if transformation is processed (sequential calls of Transform()).
629 gp_Ax2 myStartPosition; //! Start position of manipulator.
630 gp_Pnt myStartPick; //! 3d point corresponding to start mouse pick.
631 Standard_Real myPrevState; //! Previous value of angle during rotation.
633 //! Aspect used to color current detected part and current selected part.
634 Handle(Prs3d_ShadingAspect) myHighlightAspect;
637 DEFINE_STANDARD_RTTIEXT(AIS_Manipulator, AIS_InteractiveObject)
639 #endif // _AIS_Manipulator_HeaderFile