Open 3D Engine AzFramework 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.
AzPhysics::JointHelpersInterface Class Referenceabstract

Interface to access Joint utilities and helper functions. More...

#include <PhysicsJoint.h>

Public Member Functions

 AZ_RTTI (AzPhysics::JointHelpersInterface, "{A511C64D-C8A5-4E8F-9C69-8DC5EFAD0C4C}")
 
 AZ_DISABLE_COPY_MOVE (JointHelpersInterface)
 
virtual const AZStd::vector< AZ::TypeId > GetSupportedJointTypeIds () const =0
 Returns a list of supported Joint types.
 
virtual AZStd::optional< const AZ::TypeId > GetSupportedJointTypeId (JointType typeEnum) const =0
 
virtual AZStd::unique_ptr< JointConfigurationComputeInitialJointLimitConfiguration (const AZ::TypeId &jointLimitTypeId, const AZ::Quaternion &parentWorldRotation, const AZ::Quaternion &childWorldRotation, const AZ::Vector3 &axis, const AZStd::vector< AZ::Quaternion > &exampleLocalRotations)=0
 
virtual void GenerateJointLimitVisualizationData (const JointConfiguration &configuration, const AZ::Quaternion &parentRotation, const AZ::Quaternion &childRotation, float scale, AZ::u32 angularSubdivisions, AZ::u32 radialSubdivisions, AZStd::vector< AZ::Vector3 > &vertexBufferOut, AZStd::vector< AZ::u32 > &indexBufferOut, AZStd::vector< AZ::Vector3 > &lineBufferOut, AZStd::vector< bool > &lineValidityBufferOut)=0
 

Detailed Description

Interface to access Joint utilities and helper functions.

Member Function Documentation

◆ ComputeInitialJointLimitConfiguration()

virtual AZStd::unique_ptr< JointConfiguration > AzPhysics::JointHelpersInterface::ComputeInitialJointLimitConfiguration ( const AZ::TypeId &  jointLimitTypeId,
const AZ::Quaternion &  parentWorldRotation,
const AZ::Quaternion &  childWorldRotation,
const AZ::Vector3 &  axis,
const AZStd::vector< AZ::Quaternion > &  exampleLocalRotations 
)
pure virtual

Computes parameters such as joint limit local rotations to give the desired initial joint limit orientation.

Parameters
jointLimitTypeIdThe type ID used to identify the particular kind of joint limit configuration to be created.
parentWorldRotationThe rotation in world space of the parent world body associated with the joint.
childWorldRotationThe rotation in world space of the child world body associated with the joint.
axisAxis used to define the centre for limiting angular degrees of freedom.
exampleLocalRotationsA vector (which may be empty) containing example valid rotations in the local space of the child world body relative to the parent world body, which may optionally be used to help estimate the extents of the joint limit.

◆ GenerateJointLimitVisualizationData()

virtual void AzPhysics::JointHelpersInterface::GenerateJointLimitVisualizationData ( const JointConfiguration configuration,
const AZ::Quaternion &  parentRotation,
const AZ::Quaternion &  childRotation,
float  scale,
AZ::u32  angularSubdivisions,
AZ::u32  radialSubdivisions,
AZStd::vector< AZ::Vector3 > &  vertexBufferOut,
AZStd::vector< AZ::u32 > &  indexBufferOut,
AZStd::vector< AZ::Vector3 > &  lineBufferOut,
AZStd::vector< bool > &  lineValidityBufferOut 
)
pure virtual

Generates joint limit visualization data in appropriate format to pass to DebugDisplayRequests draw functions.

Parameters
configurationThe joint configuration to generate visualization data for.
parentRotationThe rotation of the joint's parent body (in the same frame as childRotation).
childRotationThe rotation of the joint's child body (in the same frame as parentRotation).
scaleScale factor for the output display data.
angularSubdivisionsLevel of detail in the angular direction (may be clamped in the implementation).
radialSubdivisionsLevel of detail in the radial direction (may be clamped in the implementation).
[out]vertexBufferOutUsed with indexBufferOut to define triangles to be displayed.
[out]indexBufferOutUsed with vertexBufferOut to define triangles to be displayed.
[out]lineBufferOutUsed to define lines to be displayed.
[out]lineValidityBufferOutWhether each line in the line buffer is part of a valid or violated limit.

◆ GetSupportedJointTypeId()

virtual AZStd::optional< const AZ::TypeId > AzPhysics::JointHelpersInterface::GetSupportedJointTypeId ( JointType  typeEnum) const
pure virtual

Returns a TypeID if the request joint type is supported. If the Physics backend supports this joint type JointHelpersInterface::GetSupportedJointTypeId will return a AZ::TypeId.


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