Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
AIS_AnimationAxisRotation Class Reference

Animation defining object transformation. More...

#include <AIS_AnimationAxisRotation.hxx>

Inheritance diagram for AIS_AnimationAxisRotation:
Inheritance graph
[legend]

Public Member Functions

 AIS_AnimationAxisRotation (const TCollection_AsciiString &theAnimationName, const occ::handle< AIS_InteractiveContext > &theContext, const occ::handle< AIS_InteractiveObject > &theObject, const gp_Ax1 &theAxis, const double theAngleStart, const double theAngleEnd)
 Constructor with initialization.
 
- Public Member Functions inherited from AIS_Animation
 AIS_Animation (const TCollection_AsciiString &theAnimationName)
 Creates empty animation.
 
 ~AIS_Animation () override
 Destruct object, clear arguments.
 
const TCollection_AsciiStringName () const
 Animation name.
 
double StartPts () const
 
void SetStartPts (const double thePtsStart)
 Sets time limits for animation in the animation timeline.
 
double Duration () const
 
void UpdateTotalDuration ()
 Update total duration considering all animations on timeline.
 
bool HasOwnDuration () const
 Return true if duration is defined.
 
double OwnDuration () const
 
void SetOwnDuration (const double theDuration)
 Defines duration of the animation.
 
void Add (const occ::handle< AIS_Animation > &theAnimation)
 Add single animation to the timeline.
 
void Clear ()
 Clear animation timeline - remove all animations from it.
 
occ::handle< AIS_AnimationFind (const TCollection_AsciiString &theAnimationName) const
 Return the child animation with the given name.
 
bool Remove (const occ::handle< AIS_Animation > &theAnimation)
 Remove the child animation.
 
bool Replace (const occ::handle< AIS_Animation > &theAnimationOld, const occ::handle< AIS_Animation > &theAnimationNew)
 Replace the child animation.
 
void CopyFrom (const occ::handle< AIS_Animation > &theOther)
 Clears own children and then copy child animations from another object. Copy also Start Time and Duration values.
 
const NCollection_Sequence< occ::handle< AIS_Animation > > & Children () const
 Return sequence of child animations.
 
virtual void StartTimer (const double theStartPts, const double thePlaySpeed, const bool theToUpdate, const bool theToStopTimer=false)
 Start animation with internally defined timer instance. Calls Start() internally.
 
virtual double UpdateTimer ()
 Update single frame of animation, update timer state.
 
double ElapsedTime () const
 Return elapsed time.
 
const occ::handle< Media_Timer > & Timer () const
 Return playback timer.
 
void SetTimer (const occ::handle< Media_Timer > &theTimer)
 Set playback timer.
 
virtual void Start (const bool theToUpdate)
 Start animation. This method changes status of the animation to Started. This status defines whether animation is to be performed in the timeline or not.
 
virtual void Pause ()
 Pause the process timeline.
 
virtual void Stop ()
 Stop animation. This method changed status of the animation to Stopped. This status shows that animation will not be performed in the timeline or it is finished.
 
bool IsStopped ()
 Check if animation is to be performed in the animation timeline.
 
virtual bool Update (const double thePts)
 Update single frame of animation, update timer state.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Member Functions

void update (const AIS_AnimationProgress &theProgress) override
 Update the progress.
 
- Protected Member Functions inherited from AIS_BaseAnimationObject
 AIS_BaseAnimationObject (const TCollection_AsciiString &theAnimationName, const occ::handle< AIS_InteractiveContext > &theContext, const occ::handle< AIS_InteractiveObject > &theObject)
 Constructor with initialization.
 
void updateTrsf (const gp_Trsf &theTrsf)
 Update the transformation.
 
- Protected Member Functions inherited from AIS_Animation
virtual void updateWithChildren (const AIS_AnimationProgress &thePosition)
 Process one step of the animation according to the input time progress, including all children. Calls also update() to update own animation.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 
- Protected Types inherited from AIS_Animation
enum  AnimationState { AnimationState_Started , AnimationState_Stopped , AnimationState_Paused }
 Defines animation state. More...
 
- Protected Attributes inherited from AIS_BaseAnimationObject
occ::handle< AIS_InteractiveContextmyContext
 context where object is displayed
 
occ::handle< AIS_InteractiveObjectmyObject
 presentation object to set location
 
- Protected Attributes inherited from AIS_Animation
occ::handle< Media_TimermyTimer
 
TCollection_AsciiString myName
 animation name
 
NCollection_Sequence< occ::handle< AIS_Animation > > myAnimations
 sequence of child animations
 
AnimationState myState
 animation state - started, stopped of paused
 
double myPtsStart
 time of start in the timeline
 
double myOwnDuration
 duration of animation excluding children
 
double myChildrenDuration
 duration of animation including children
 

Detailed Description

Animation defining object transformation.

Constructor & Destructor Documentation

◆ AIS_AnimationAxisRotation()

AIS_AnimationAxisRotation::AIS_AnimationAxisRotation ( const TCollection_AsciiString & theAnimationName,
const occ::handle< AIS_InteractiveContext > & theContext,
const occ::handle< AIS_InteractiveObject > & theObject,
const gp_Ax1 & theAxis,
const double theAngleStart,
const double theAngleEnd )

Constructor with initialization.

Parameters
[in]theAnimationNameanimation identifier
[in]theContextinteractive context where object have been displayed
[in]theObjectobject to apply rotation
[in]theAxisrotation axis
[in]theAngleStartrotation angle at the start of animation
[in]theAngleEndrotation angle at the end of animation

Member Function Documentation

◆ update()

void AIS_AnimationAxisRotation::update ( const AIS_AnimationProgress & theProgress)
overrideprotectedvirtual

Update the progress.

Reimplemented from AIS_Animation.


The documentation for this class was generated from the following file: