Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::ConstraintTransformRotationAngles Class Reference

#include <ConstraintTransformRotationAngles.h>

Inherits EMotionFX::ConstraintTransform.

Public Types

enum  { TYPE_ID = 0x00000001 }
 
enum  EAxis : int { AXIS_X = 0 , AXIS_Y = 1 , AXIS_Z = 2 }
 

Public Member Functions

uint32 GetType () const override
 
const char * GetTypeString () const override
 
void Execute () override
 
void DebugDraw (ActorInstance *actorInstance, const AZ::Transform &offset, const AZ::Color &color, float radius) const
 
void SetMinRotationAngles (const AZ::Vector2 &minSwingDegrees)
 
void SetMaxRotationAngles (const AZ::Vector2 &maxSwingDegrees)
 
void SetMinTwistAngle (float minAngleDegrees)
 
void SetMaxTwistAngle (float maxAngleDegrees)
 
void SetTwistAxis (EAxis axisIndex)
 
AZ::Vector2 GetMinRotationAnglesDegrees () const
 
AZ::Vector2 GetMaxRotationAnglesDegrees () const
 
AZ::Vector2 GetMinRotationAnglesRadians () const
 
AZ::Vector2 GetMaxRotationAnglesRadians () const
 
float GetMinTwistAngle () const
 
float GetMaxTwistAngle () const
 
EAxis GetTwistAxis () const
 
- Public Member Functions inherited from EMotionFX::ConstraintTransform
void SetTransform (const Transform &transform)
 
MCORE_INLINE const Transform & GetTransform () const
 
MCORE_INLINE Transform & GetTransform ()
 
virtual uint32 GetType () const =0
 
virtual const char * GetTypeString () const =0
 
virtual void Execute ()=0
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void DrawSphericalLine (ActorInstance *actorInstance, const AZ::Vector2 &start, const AZ::Vector2 &end, uint32 numSteps, const AZ::Color &color, float radius, const AZ::Transform &offset) const
 
AZ::Vector3 GetSphericalPos (float x, float y) const
 

Protected Attributes

AZ::Vector2 m_minRotationAngles
 The minimum rotation angles, actually the precalculated sin(halfAngleRadians).
 
AZ::Vector2 m_maxRotationAngles
 The maximum rotation angles, actually the precalculated sin(halfAngleRadians).
 
float m_minTwist
 The minimum twist angle, actually the precalculated sin(halfAngleRadians).
 
float m_maxTwist
 The maximum twist angle, actually the precalculated sin(halfAngleRadians).
 
EAxis m_twistAxis
 The twist axis index, which has to be either 0, 1 or 2 (default=AXIS_X, which equals 0).
 
- Protected Attributes inherited from EMotionFX::ConstraintTransform
Transform m_transform = Transform::CreateIdentity()
 

Detailed Description

The rotation angle constraint. This constraint works on a transform and limits the rotation to be within a given range defined by minimum and maximum swing and twist angles in degrees.

Member Function Documentation

◆ Execute()

void EMotionFX::ConstraintTransformRotationAngles::Execute ( )
overridevirtual

The main execution function, which performs the actual constraint operation.

Implements EMotionFX::Constraint.

◆ GetType()

uint32 EMotionFX::ConstraintTransformRotationAngles::GetType ( ) const
overridevirtual

Get the type ID of the constraint, which identifies the type of constraint.

Returns
The type ID.

Implements EMotionFX::Constraint.

◆ GetTypeString()

const char * EMotionFX::ConstraintTransformRotationAngles::GetTypeString ( ) const
overridevirtual

Get the type string of the constraint, which identifies the type of constraint, using its class name.

Returns
The type string.

Implements EMotionFX::Constraint.


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