HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_AgentShapeReader Class Reference

#include <SIM_ObjectReader.h>

+ Inheritance diagram for SIM_AgentShapeReader:

Classes

struct  BatchROHandleA
 
struct  BatchRWHandleA
 

Public Member Functions

 SIM_AgentShapeReader (const SIM_Object &obj, const GU_Detail &gdp)
 
void setCurrentShape (GA_Offset prim_offset, exint transform_id)
 
const GU_PrimPackedgetPrimitive () const
 
const GU_AgentgetAgent () const
 
const UT_StringHoldergetAgentName () const
 
GA_Offset getPointOffset () const
 
exint getTransformId () const
 
bool getAnchorNames (UT_WorkBuffer &full_name, UT_StringRef &name) const
 
bool hasPositionData () const
 
UT_Vector3 getPivot () const
 
UT_Vector3 getPosition () const
 
UT_Quaternion getOrientation () const override
 
void getCurrentWorldTransform (UT_Matrix4D &xform) const
 
void getPositionTransform (UT_Matrix4D &xform, bool scale=true) const override
 
UT_Vector3 getCentroid () const override
 
bool unpackBoundShapes (GU_Detail &gdp, bool apply_joint_xform=true) const
 
GU_ConstDetailHandle getObjectGdp () const override
 
const GU_DetailgetSimGdp () const override
 Return the SIM_Object's geometry. More...
 
- Public Member Functions inherited from SIM_BaseObjectReader
 SIM_BaseObjectReader (const SIM_Object &obj)
 
virtual ~SIM_BaseObjectReader ()
 
const SIM_ObjectgetObject () const
 Return the SIM_Object. More...
 

Static Public Member Functions

template<typename T , typename ARRAY_T >
static bool getArrayAttribElement (const BatchROHandleA< ARRAY_T > &handle, GA_Offset offset, exint i, T &elem)
 
template<typename T , typename ARRAY_T >
static void setArrayAttribElement (BatchRWHandleA< ARRAY_T > &handle, GA_Offset offset, exint i, exint n, const T &elem)
 

Additional Inherited Members

- Protected Attributes inherited from SIM_BaseObjectReader
const SIM_ObjectmyObject
 

Detailed Description

Definition at line 167 of file SIM_ObjectReader.h.

Constructor & Destructor Documentation

SIM_AgentShapeReader::SIM_AgentShapeReader ( const SIM_Object obj,
const GU_Detail gdp 
)

Member Function Documentation

const GU_Agent* SIM_AgentShapeReader::getAgent ( ) const
inline

Definition at line 209 of file SIM_ObjectReader.h.

const UT_StringHolder& SIM_AgentShapeReader::getAgentName ( ) const
bool SIM_AgentShapeReader::getAnchorNames ( UT_WorkBuffer full_name,
UT_StringRef name 
) const

Computes the two names that can be used to reference agents in a constraint network - either 'dopobject/agentname/transform' or 'agentname/transform' can be used. Returns false if the agent does not have a name.

template<typename T , typename ARRAY_T >
bool SIM_AgentShapeReader::getArrayAttribElement ( const BatchROHandleA< ARRAY_T > &  handle,
GA_Offset  offset,
exint  i,
T elem 
)
static

Helper function for reading an element from an array attribute at the given offset.

Definition at line 342 of file SIM_ObjectReader.h.

UT_Vector3 SIM_AgentShapeReader::getCentroid ( ) const
overridevirtual

Implements SIM_BaseObjectReader.

void SIM_AgentShapeReader::getCurrentWorldTransform ( UT_Matrix4D xform) const
GU_ConstDetailHandle SIM_AgentShapeReader::getObjectGdp ( ) const
overridevirtual

Return the geometry of the RBD object (i.e. the shapes attached to the current transform).

Implements SIM_BaseObjectReader.

UT_Quaternion SIM_AgentShapeReader::getOrientation ( ) const
overridevirtual

Implements SIM_BaseObjectReader.

UT_Vector3 SIM_AgentShapeReader::getPivot ( ) const
GA_Offset SIM_AgentShapeReader::getPointOffset ( ) const
inline

Definition at line 211 of file SIM_ObjectReader.h.

UT_Vector3 SIM_AgentShapeReader::getPosition ( ) const
void SIM_AgentShapeReader::getPositionTransform ( UT_Matrix4D xform,
bool  scale = true 
) const
overridevirtual

Implements SIM_BaseObjectReader.

const GU_PrimPacked* SIM_AgentShapeReader::getPrimitive ( ) const
inline

Definition at line 208 of file SIM_ObjectReader.h.

const GU_Detail* SIM_AgentShapeReader::getSimGdp ( ) const
overridevirtual

Return the SIM_Object's geometry.

Implements SIM_BaseObjectReader.

exint SIM_AgentShapeReader::getTransformId ( ) const
inline

Definition at line 212 of file SIM_ObjectReader.h.

bool SIM_AgentShapeReader::hasPositionData ( ) const
template<typename T , typename ARRAY_T >
void SIM_AgentShapeReader::setArrayAttribElement ( BatchRWHandleA< ARRAY_T > &  handle,
GA_Offset  offset,
exint  i,
exint  n,
const T elem 
)
static

Helper function for updating an element of an array attribute at the given offset.

Definition at line 374 of file SIM_ObjectReader.h.

void SIM_AgentShapeReader::setCurrentShape ( GA_Offset  prim_offset,
exint  transform_id 
)
bool SIM_AgentShapeReader::unpackBoundShapes ( GU_Detail gdp,
bool  apply_joint_xform = true 
) const

Unpack the shape(s) attached to the current joint, optionally applying the joint transform to the shape.


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