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

#include <GU_Agent.h>

+ Inheritance diagram for GU_Agent:

Classes

struct  ClipLayer
 
struct  State
 State of the primitive. More...
 

Public Types

enum  BlendMode { BLEND_INTERPOLATE, BLEND_ADDITIVE, NUM_BLEND_MODES }
 
typedef UT_StringHolder StringType
 
typedef fpreal32 FloatType
 
typedef UT_Matrix4T< FloatTypeMatrix4Type
 
typedef UT_Array< Matrix4TypeMatrix4Array
 
typedef UT_SharedPtr
< Matrix4Array
Matrix4ArrayPtr
 
typedef UT_SharedPtr< const
Matrix4Array
Matrix4ArrayConstPtr
 
- Public Types inherited from GU_PackedImpl
typedef fpreal(GU_PackedImpl::* FloatGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* FloatSetter )(const GU_PrimPacked *, fpreal)
 
typedef GA_Size(GU_PackedImpl::* IntGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* IntSetter )(GU_PrimPacked *, GA_Size)
 
typedef bool(GU_PackedImpl::* BoolGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* BoolSetter )(GU_PrimPacked *, bool)
 
typedef const char
*(GU_PackedImpl::* 
StringGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StringSetter )(GU_PrimPacked *, const char *)
 
typedef std::string(GU_PackedImpl::* StdStringGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StdStringSetter )(GU_PrimPacked *, const std::string &)
 
typedef UT_StringHolder(GU_PackedImpl::* StringHolderGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StringHolderSetter )(GU_PrimPacked *, const UT_StringHolder &)
 
typedef fpreal(GU_PackedImpl::* FloatTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* FloatTupleSetter )(GU_PrimPacked *, exint, fpreal)
 
typedef GA_Size(GU_PackedImpl::* IntTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* IntTupleSetter )(GU_PrimPacked *, exint, GA_Size)
 
typedef bool(GU_PackedImpl::* BoolTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* BoolTupleSetter )(GU_PrimPacked *, exint, bool)
 
typedef const char
*(GU_PackedImpl::* 
StringTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StringTupleSetter )(GU_PrimPacked *, exint, const char *)
 
typedef std::string(GU_PackedImpl::* StdStringTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StdStringTupleSetter )(GU_PrimPacked *, exint, const std::string &)
 
typedef UT_StringHolder(GU_PackedImpl::* StringHolderTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StringHolderTupleSetter )(GU_PrimPacked *, exint, const UT_StringHolder &)
 
typedef void(GU_PackedImpl::* F32VectorGetter )(const GU_PrimPacked *, fpreal32 *, exint) const
 
typedef void(GU_PackedImpl::* F32VectorSetter )(GU_PrimPacked *, const fpreal32 *, exint)
 
typedef void(GU_PackedImpl::* F64VectorGetter )(const GU_PrimPacked *, fpreal64 *, exint) const
 
typedef void(GU_PackedImpl::* F64VectorSetter )(GU_PrimPacked *, const fpreal64 *, exint)
 
typedef void(GU_PackedImpl::* I32VectorGetter )(const GU_PrimPacked *, int32 *, exint) const
 
typedef void(GU_PackedImpl::* I32VectorSetter )(GU_PrimPacked *, const int32 *, exint)
 
typedef void(GU_PackedImpl::* I64VectorGetter )(const GU_PrimPacked *, int64 *, exint) const
 
typedef void(GU_PackedImpl::* I64VectorSetter )(GU_PrimPacked *, const int64 *, exint)
 
typedef void(GU_PackedImpl::* BVectorGetter )(const GU_PrimPacked *, bool *, exint) const
 
typedef void(GU_PackedImpl::* BVectorSetter )(GU_PrimPacked *, const bool *, exint)
 
typedef void(GU_PackedImpl::* StringArrayGetter )(const GU_PrimPacked *, UT_StringArray &) const
 
typedef void(GU_PackedImpl::* StringArraySetter )(GU_PrimPacked *, const UT_StringArray &)
 

Public Member Functions

 GU_Agent ()
 
 GU_Agent (const GU_Agent &src)
 
virtual ~GU_Agent ()
 
SYS_FORCE_INLINE
GU_AgentDefinition
definition ()
 
SYS_FORCE_INLINE const
GU_AgentDefinition
definition () const
 
void setDefinition (GU_PrimPacked *prim, const GU_AgentDefinitionPtr &definition)
 
const GU_AgentLayergetCurrentLayer () const
 Return the current layer. This may be a NULL pointer. More...
 
const GU_AgentLayergetCollisionLayer () const
 Return the current collision layer. This may be a NULL pointer. More...
 
exint numClips () const
 Return the number of clips used for transform evaluation. More...
 
exint intrinsicNumClips (const GU_PrimPacked *prim) const
 
const char * clipName (exint i) const
 Names of the clips used for transform evaluation. More...
 
const char * intrinsicClipName (const GU_PrimPacked *prim, exint i) const
 
void setClipByName (GU_PrimPacked *prim, exint i, const char *clip_name)
 Set a clip by name. More...
 
bool computeWorldTransforms (Matrix4ArrayConstPtr &xforms, bool interpolate_samples=true) const
 
bool computeLocalTransforms (Matrix4ArrayConstPtr &xforms, bool interpolate_samples=true) const
 Get the local transforms for this agent. More...
 
bool computeWorldTransform (Matrix4Type &xform, exint i, bool interpolate_samples=true) const
 Get a specific world transform for the agent. More...
 
bool computeLocalTransform (Matrix4Type &xform, exint i, bool interpolate_samples=true) const
 Get a specific local transform for the agent. More...
 
void setWorldTransforms (const Matrix4Array &xforms)
 Override the world transforms for this agent. More...
 
void setLocalTransforms (const Matrix4Array &xforms)
 Override the local transforms for this agent. More...
 
void setWorldTransform (const Matrix4Type &xform, exint i)
 Override a specific world transform for this agent. More...
 
void setLocalTransform (const Matrix4Type &xform, exint i)
 Override a specific local transform for this agent. More...
 
bool hasCustomTransforms () const
 
bool intrinsicHasCustomTransforms (const GU_PrimPacked *) const
 
exint transformCount () const
 Number of transforms in the rig. More...
 
exint intrinsicTransformCount (const GU_PrimPacked *prim) const
 
const char * transformName (exint i) const
 Return the name of the given transform. More...
 
const char * intrinsicTransformName (const GU_PrimPacked *prim, exint i) const
 
exint transformsArraySize () const
 
exint intrinsicTransformsArraySize (const GU_PrimPacked *prim) const
 
void worldTransformsArray (const GU_PrimPacked *prim, FloatType *data, exint n) const
 
void setWorldTransformsFromArray (GU_PrimPacked *prim, const FloatType *data, exint n)
 
void localTransformsArray (const GU_PrimPacked *prim, FloatType *data, exint n) const
 
void setLocalTransformsFromArray (GU_PrimPacked *prim, const FloatType *data, exint n)
 
exint intrinsicParentIndex (const GU_PrimPacked *prim, exint i) const
 Functions for the 'agentrigparents' intrinsic. More...
 
exint intrinsicNumLayers (const GU_PrimPacked *prim) const
 Functions for the 'agentlayers' intrinsic. More...
 
const char * intrinsicLayerName (const GU_PrimPacked *prim, exint i) const
 
void intrinsicSetNumClips (GU_PrimPacked *prim, GA_Size n)
 
exint intrinsicCatalogNumClips (const GU_PrimPacked *prim) const
 Functions for the 'agentclipcatalog' intrinsic. More...
 
const char * intrinsicCatalogClipName (const GU_PrimPacked *prim, exint i) const
 
const char * intrinsicClipCatalogFilenames (const GU_PrimPacked *prim, exint i) const
 
exint intrinsicNumShapes (const GU_PrimPacked *prim) const
 Functions for the 'agentshapelibrary' intrinsic. More...
 
void intrinsicShapeNames (const GU_PrimPacked *prim, UT_StringArray &values) const
 
virtual GU_PackedFactorygetFactory () const
 
virtual GU_Agentcopy () const
 
virtual bool isValid () const
 
virtual void clearData ()
 
virtual bool supportsJSONLoad () const
 
virtual bool load (GU_PrimPacked *prim, const UT_Options &options, const GA_LoadMap &map)
 
virtual bool loadFromJSON (GU_PrimPacked *prim, const UT_JSONValueMap &options, const GA_LoadMap &map)
 
virtual void update (GU_PrimPacked *prim, const UT_Options &options)
 
virtual bool saveSharedData (UT_JSONWriter &w, GA_SaveMap &map, GA_GeometryIndex *geometryIndex) const
 
virtual bool loadSharedData (int load_data_type, const GA_SharedLoadData *item)
 
virtual bool save (UT_Options &options, const GA_SaveMap &map) const
 
virtual bool getBounds (UT_BoundingBox &box) const
 
virtual bool getRenderingBounds (UT_BoundingBox &box) const
 
virtual void getVelocityRange (UT_Vector3 &vmin, UT_Vector3 &vmax) const
 
virtual void getWidthRange (fpreal &wmin, fpreal &wmax) const
 
virtual bool unpack (GU_Detail &destgdp, const UT_Matrix4D *transform) const
 
virtual bool unpackWithStyler (GU_Detail &destgdp, STY_StylerGroup &prim_styler_group, const STY_Styler &parent_styler, const GU_PrimPacked *prim) const
 
virtual GU_ConstDetailHandle getPackedDetail (GU_PackedContext *context=0) const
 
virtual int64 getMemoryUsage (bool inclusive) const
 Report memory usage (includes all shared memory) More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
const GU_AgentRigConstPtrgetRig () const
 
bool layerBounds (const GU_AgentLayer &layer, UT_BoundingBox &box) const
 
void layerVelocityRange (const GU_AgentLayer &layer, UT_Vector3 &vmin, UT_Vector3 &vmax) const
 
void layerWidthRange (const GU_AgentLayer &layer, fpreal &wmin, fpreal &wmax) const
 
bool layerUnpack (const GU_AgentLayer &layer, GU_Detail &destgdp, const UT_Matrix4D *transform, STY_StylerGroup *prim_styler_group=nullptr, const STY_Styler *parent_styler=nullptr, const GU_PrimPacked *prim=nullptr) const
 
GU_ConstDetailHandle layerPackedDetail (const GU_AgentLayer &layer) const
 
StringType currentLayerName () const
 
StringType intrinsicCurrentLayerName (const GU_PrimPacked *prim) const
 
void setCurrentLayerName (GU_PrimPacked *prim, const StringType &name)
 
StringType collisionLayerName () const
 
StringType intrinsicCollisionLayerName (const GU_PrimPacked *prim) const
 
void setCollisionLayerName (GU_PrimPacked *prim, const StringType &name)
 
const GU_AgentClipPtrArrayclips () const
 
void setClips (GU_PrimPacked *prim, const GU_AgentClipPtrArray &clips)
 
void setClipsByNames (GU_PrimPacked *prim, const UT_StringArray &clip_names)
 
fpreal clipTime (exint i) const
 
fpreal intrinsicClipTime (const GU_PrimPacked *prim, exint i) const
 
void setClipTime (GU_PrimPacked *prim, exint i, fpreal seconds)
 
fpreal clipWeight (exint i) const
 
fpreal intrinsicClipWeight (const GU_PrimPacked *prim, exint i) const
 
void setClipWeight (GU_PrimPacked *prim, exint i, fpreal weight)
 
const char * clipTransformGroupName (exint i) const
 
const char * intrinsicClipTransformGroupName (const GU_PrimPacked *prim, exint i) const
 
void setClipTransformGroupByName (GU_PrimPacked *prim, exint i, const char *name)
 
exint clipLayerId (exint i) const
 
exint intrinsicClipLayerId (const GU_PrimPacked *prim, exint i) const
 
void setClipLayerId (GU_PrimPacked *prim, exint i, exint layer_id)
 
void setClipLayers (GU_PrimPacked *prim, const UT_Array< ClipLayer > &clip_layers)
 
exint numClipLayers () const
 
exint intrinsicNumTransformGroups (const GU_PrimPacked *prim) const
 
const char * intrinsicTransformGroupName (const GU_PrimPacked *prim, exint i) const
 
const char * intrinsicClipLayerMode (const GU_PrimPacked *prim, exint i) const
 
exint intrinsicClipLayerParent (const GU_PrimPacked *prim, exint i) const
 
fpreal intrinsicClipLayerWeight (const GU_PrimPacked *prim, exint i) const
 
exint intrinsicNumClipLayers (const GU_PrimPacked *prim) const
 
- Public Member Functions inherited from GU_PackedImpl
 GU_PackedImpl ()
 
 GU_PackedImpl (const GU_PackedImpl &src)
 
virtual ~GU_PackedImpl ()
 
virtual bool loadUnknownToken (const char *token, UT_JSONParser &p, const GA_LoadMap &map)
 
virtual void getPrimitiveName (const GU_PrimPacked *prim, UT_WorkBuffer &wbuf) const
 
virtual bool getLocalTransform (UT_Matrix4D &m) const
 
virtual bool unpackWithContext (GU_Detail &destgdp, GU_PackedContext &context, const GU_PrimPacked *prim) const
 
bool unpack (GU_Detail &destgdp, const GU_PrimPacked *prim) const
 
virtual void forceLoad () const
 
virtual bool isLoaded () const
 
virtual bool unpackUsingPolygons (GU_Detail &destgdp, const GU_PrimPacked *prim) const
 
bool pointInstanceTransform () const
 
bool intrinsicPointInstanceTransform (const GU_PrimPacked *prim) const
 
void setPointInstanceTransform (GU_PrimPacked *prim, bool b)
 Set whether point instancing should be used. More...
 
void topologyDirty ()
 Indicate that topology and attributes are dirty. More...
 
GU_PrimPackedgetPrim ()
 
const GU_PrimPackedgetPrim () const
 
virtual bool saveCachedBBox () const
 
int64 intrinsic3Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic6Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic9Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic16Tuple (const GU_PrimPacked *prim) const
 
std::string intrinsicPrimitiveName (const GU_PrimPacked *prim) const
 
const char * intrinsicFactoryName (const GU_PrimPacked *prim) const
 
const char * intrinsicFactoryLabel (const GU_PrimPacked *prim) const
 
void intrinsicPackedBox (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicPackedRenderBox (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicPivot (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicSetPivot (GU_PrimPacked *prim, const fpreal64 *vals, exint sz)
 
void intrinsicPrimTransform (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicSetPrimTransform (GU_PrimPacked *prim, const fpreal64 *v, exint sz)
 
void intrinsicPackedTransform (const GU_PrimPacked *prim, fpreal64 *v, exint sz) const
 
void intrinsicFullTransform (const GU_PrimPacked *prim, fpreal64 *v, exint sz) const
 
const char * intrinsicViewportLOD (const GU_PrimPacked *prim) const
 
void intrinsicSetViewportLOD (GU_PrimPacked *prim, const char *lod)
 

Static Public Member Functions

static void install (GA_PrimitiveFactory *pfact)
 Register the packed primitive type. More...
 
static GA_PrimitiveTypeId typeId ()
 Get the type ID for the GU_Agent primitive type. More...
 
static GU_PrimPackedagent (GU_Detail &dest, const StringType &default_layer=UTmakeUnsafeRef(GU_AGENT_LAYER_DEFAULT), const StringType &collision_layer=UTmakeUnsafeRef(GU_AGENT_LAYER_COLLISION), GA_Offset ptoff=GA_INVALID_OFFSET)
 Convenience method to create a packed agent primitive. More...
 
static bool hasAgentPackedPrimitives (const GU_Detail &gdp)
 
- Static Public Member Functions inherited from GU_PackedImpl
static bool computeVelocityRange (const GU_Detail *gdp, UT_Vector3 &vmin, UT_Vector3 &vmax)
 
static bool computeWidthRange (const GU_Detail *gdp, fpreal &wmin, fpreal &wmax)
 

Additional Inherited Members

- Protected Member Functions inherited from GU_PackedImpl
void copyPrimitiveGroups (GU_Detail &dest, bool force=false) const
 
bool unpackToDetail (GU_Detail &destgdp, GU_Detail *src, const UT_Matrix4D *transform) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_Detail *src, const UT_Matrix4D *transform) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_ConstDetailHandle &gdh, const UT_Matrix4D *transform) const
 Unpack the source detail handle. More...
 
virtual UT_Vector3 getBaryCenter () const
 Optional method to compute centroid (default uses bounding box) More...
 
virtual fpreal computeVolume (const UT_Vector3 &refpt) const
 Optional method to calculate volume (default uses bounding box) More...
 
virtual fpreal computeArea () const
 Optional method to calculate surface area (default uses bounding box) More...
 
virtual fpreal computePerimeter () const
 Optional method to calculate perimeter (default uses bounding box) More...
 
- Static Protected Member Functions inherited from GU_PackedImpl
template<typename T >
static bool import (const UT_JSONValueMap &options, const UT_StringRef &key, T &value)
 
template<typename T >
static bool import (const UT_Options &options, const UT_StringRef &key, T &value)
 

Detailed Description

A packed agent

The agent is composed of multiple named layers. Each layer consists of zero or more shapes.

All agents must have a default layer. This is the layer used when a specific layer isn't found. Example layers might be: "default", "low-res", "medium-res", "high-quality", "collision".

The packed agent conforms to the GU_PackedImpl API, but also provides access to the layers/shapes.

Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 50 of file GU_Agent.h.

Member Typedef Documentation

Definition at line 54 of file GU_Agent.h.

Definition at line 56 of file GU_Agent.h.

Definition at line 57 of file GU_Agent.h.

Definition at line 55 of file GU_Agent.h.

Definition at line 53 of file GU_Agent.h.

Member Enumeration Documentation

Enumerator
BLEND_INTERPOLATE 
BLEND_ADDITIVE 
NUM_BLEND_MODES 

Definition at line 60 of file GU_Agent.h.

Constructor & Destructor Documentation

GU_Agent::GU_Agent ( )
GU_Agent::GU_Agent ( const GU_Agent src)
virtual GU_Agent::~GU_Agent ( )
virtual

Member Function Documentation

static GU_PrimPacked* GU_Agent::agent ( GU_Detail dest,
const StringType default_layer = UTmakeUnsafeRef(GU_AGENT_LAYER_DEFAULT),
const StringType collision_layer = UTmakeUnsafeRef(GU_AGENT_LAYER_COLLISION),
GA_Offset  ptoff = GA_INVALID_OFFSET 
)
static

Convenience method to create a packed agent primitive.

Examples:
SOP/SOP_BouncyAgent.C.
virtual void GU_Agent::clearData ( )
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

exint GU_Agent::clipLayerId ( exint  i) const
inline

The layer that each clip belongs to.

Definition at line 273 of file GU_Agent.h.

const char* GU_Agent::clipName ( exint  i) const

Names of the clips used for transform evaluation.

const GU_AgentClipPtrArray& GU_Agent::clips ( ) const

Array of clips used for transform evaluation

fpreal GU_Agent::clipTime ( exint  i) const
inline

Array of times in seconds to evaluate the clips. Indices in [0,numClips()-1] inclusively.

Definition at line 245 of file GU_Agent.h.

const char* GU_Agent::clipTransformGroupName ( exint  i) const

The subset of transforms in the rig that each clip should be applied to.

fpreal GU_Agent::clipWeight ( exint  i) const
inline

Array of weights to evaluate the corresponding clips. Assumes they are normalized.

Definition at line 255 of file GU_Agent.h.

StringType GU_Agent::collisionLayerName ( ) const
inline

Set the collision layer.

Definition at line 216 of file GU_Agent.h.

bool GU_Agent::computeLocalTransform ( Matrix4Type xform,
exint  i,
bool  interpolate_samples = true 
) const
inline

Get a specific local transform for the agent.

Definition at line 305 of file GU_Agent.h.

bool GU_Agent::computeLocalTransforms ( Matrix4ArrayConstPtr xforms,
bool  interpolate_samples = true 
) const
inline

Get the local transforms for this agent.

Definition at line 295 of file GU_Agent.h.

bool GU_Agent::computeWorldTransform ( Matrix4Type xform,
exint  i,
bool  interpolate_samples = true 
) const
inline

Get a specific world transform for the agent.

Definition at line 301 of file GU_Agent.h.

bool GU_Agent::computeWorldTransforms ( Matrix4ArrayConstPtr xforms,
bool  interpolate_samples = true 
) const
inline

Get the world transforms for this agent. Disabling interpolation can improve performance if the clip time falls between two samples.

Definition at line 289 of file GU_Agent.h.

virtual GU_Agent* GU_Agent::copy ( ) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

virtual void GU_Agent::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const
virtual

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly.

Implements GU_PackedImpl.

StringType GU_Agent::currentLayerName ( ) const
inline

Set the default layer (for packing, bounds, etc)

Definition at line 209 of file GU_Agent.h.

SYS_FORCE_INLINE GU_AgentDefinition& GU_Agent::definition ( )
inline

Return the agent's definition (which contains e.g. available clips and layers).

Definition at line 164 of file GU_Agent.h.

SYS_FORCE_INLINE const GU_AgentDefinition& GU_Agent::definition ( ) const
inline

Definition at line 170 of file GU_Agent.h.

virtual bool GU_Agent::getBounds ( UT_BoundingBox box) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

const GU_AgentLayer* GU_Agent::getCollisionLayer ( ) const

Return the current collision layer. This may be a NULL pointer.

const GU_AgentLayer* GU_Agent::getCurrentLayer ( ) const

Return the current layer. This may be a NULL pointer.

virtual GU_PackedFactory* GU_Agent::getFactory ( ) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

virtual int64 GU_Agent::getMemoryUsage ( bool  inclusive) const
virtual

Report memory usage (includes all shared memory)

Implements GU_PackedImpl.

virtual GU_ConstDetailHandle GU_Agent::getPackedDetail ( GU_PackedContext context = 0) const
virtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

virtual bool GU_Agent::getRenderingBounds ( UT_BoundingBox box) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

const GU_AgentRigConstPtr& GU_Agent::getRig ( ) const
inline

Rig Accessor

Definition at line 180 of file GU_Agent.h.

virtual void GU_Agent::getVelocityRange ( UT_Vector3 vmin,
UT_Vector3 vmax 
) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

virtual void GU_Agent::getWidthRange ( fpreal wmin,
fpreal wmax 
) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

static bool GU_Agent::hasAgentPackedPrimitives ( const GU_Detail gdp)
static
bool GU_Agent::hasCustomTransforms ( ) const
inline

Returns whether the agent's transforms have been overridden from the blended clips.

Definition at line 321 of file GU_Agent.h.

static void GU_Agent::install ( GA_PrimitiveFactory pfact)
static

Register the packed primitive type.

const char* GU_Agent::intrinsicCatalogClipName ( const GU_PrimPacked prim,
exint  i 
) const
exint GU_Agent::intrinsicCatalogNumClips ( const GU_PrimPacked prim) const

Functions for the 'agentclipcatalog' intrinsic.

const char* GU_Agent::intrinsicClipCatalogFilenames ( const GU_PrimPacked prim,
exint  i 
) const
exint GU_Agent::intrinsicClipLayerId ( const GU_PrimPacked prim,
exint  i 
) const
inline

The layer that each clip belongs to.

Definition at line 275 of file GU_Agent.h.

const char* GU_Agent::intrinsicClipLayerMode ( const GU_PrimPacked prim,
exint  i 
) const

Functions for the clip layer intrinsics.

exint GU_Agent::intrinsicClipLayerParent ( const GU_PrimPacked prim,
exint  i 
) const

Functions for the clip layer intrinsics.

fpreal GU_Agent::intrinsicClipLayerWeight ( const GU_PrimPacked prim,
exint  i 
) const

Functions for the clip layer intrinsics.

const char* GU_Agent::intrinsicClipName ( const GU_PrimPacked prim,
exint  i 
) const
inline

Definition at line 236 of file GU_Agent.h.

fpreal GU_Agent::intrinsicClipTime ( const GU_PrimPacked prim,
exint  i 
) const
inline

Array of times in seconds to evaluate the clips. Indices in [0,numClips()-1] inclusively.

Definition at line 247 of file GU_Agent.h.

const char* GU_Agent::intrinsicClipTransformGroupName ( const GU_PrimPacked prim,
exint  i 
) const
inline

The subset of transforms in the rig that each clip should be applied to.

Definition at line 266 of file GU_Agent.h.

fpreal GU_Agent::intrinsicClipWeight ( const GU_PrimPacked prim,
exint  i 
) const
inline

Array of weights to evaluate the corresponding clips. Assumes they are normalized.

Definition at line 257 of file GU_Agent.h.

StringType GU_Agent::intrinsicCollisionLayerName ( const GU_PrimPacked prim) const
inline

Set the collision layer.

Definition at line 217 of file GU_Agent.h.

StringType GU_Agent::intrinsicCurrentLayerName ( const GU_PrimPacked prim) const
inline

Set the default layer (for packing, bounds, etc)

Definition at line 210 of file GU_Agent.h.

bool GU_Agent::intrinsicHasCustomTransforms ( const GU_PrimPacked ) const
inline

Definition at line 322 of file GU_Agent.h.

const char* GU_Agent::intrinsicLayerName ( const GU_PrimPacked prim,
exint  i 
) const
exint GU_Agent::intrinsicNumClipLayers ( const GU_PrimPacked prim) const
inline

Functions for the clip layer intrinsics.

Definition at line 383 of file GU_Agent.h.

exint GU_Agent::intrinsicNumClips ( const GU_PrimPacked prim) const
inline

Definition at line 231 of file GU_Agent.h.

exint GU_Agent::intrinsicNumLayers ( const GU_PrimPacked prim) const

Functions for the 'agentlayers' intrinsic.

exint GU_Agent::intrinsicNumShapes ( const GU_PrimPacked prim) const

Functions for the 'agentshapelibrary' intrinsic.

exint GU_Agent::intrinsicNumTransformGroups ( const GU_PrimPacked prim) const

Functions for the 'agenttransformgroups' intrinsic.

exint GU_Agent::intrinsicParentIndex ( const GU_PrimPacked prim,
exint  i 
) const

Functions for the 'agentrigparents' intrinsic.

void GU_Agent::intrinsicSetNumClips ( GU_PrimPacked prim,
GA_Size  n 
)

Used by the 'agentcliptimes', 'agentclipnames', and 'agentclipweights' intrinsics to grow or shrink the number of clips.

void GU_Agent::intrinsicShapeNames ( const GU_PrimPacked prim,
UT_StringArray values 
) const
exint GU_Agent::intrinsicTransformCount ( const GU_PrimPacked prim) const
inline

Definition at line 327 of file GU_Agent.h.

const char* GU_Agent::intrinsicTransformGroupName ( const GU_PrimPacked prim,
exint  i 
) const

Functions for the 'agenttransformgroups' intrinsic.

const char* GU_Agent::intrinsicTransformName ( const GU_PrimPacked prim,
exint  i 
) const
inline

Definition at line 331 of file GU_Agent.h.

exint GU_Agent::intrinsicTransformsArraySize ( const GU_PrimPacked prim) const
inline

Definition at line 337 of file GU_Agent.h.

virtual bool GU_Agent::isValid ( ) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

bool GU_Agent::layerBounds ( const GU_AgentLayer layer,
UT_BoundingBox box 
) const

Packed implementation for specific layers

GU_ConstDetailHandle GU_Agent::layerPackedDetail ( const GU_AgentLayer layer) const

Packed implementation for specific layers

bool GU_Agent::layerUnpack ( const GU_AgentLayer layer,
GU_Detail destgdp,
const UT_Matrix4D transform,
STY_StylerGroup prim_styler_group = nullptr,
const STY_Styler parent_styler = nullptr,
const GU_PrimPacked prim = nullptr 
) const

Packed implementation for specific layers

void GU_Agent::layerVelocityRange ( const GU_AgentLayer layer,
UT_Vector3 vmin,
UT_Vector3 vmax 
) const

Packed implementation for specific layers

void GU_Agent::layerWidthRange ( const GU_AgentLayer layer,
fpreal wmin,
fpreal wmax 
) const

Packed implementation for specific layers

virtual bool GU_Agent::load ( GU_PrimPacked prim,
const UT_Options options,
const GA_LoadMap map 
)
inlinevirtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

Definition at line 126 of file GU_Agent.h.

virtual bool GU_Agent::loadFromJSON ( GU_PrimPacked prim,
const UT_JSONValueMap options,
const GA_LoadMap map 
)
inlinevirtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

Definition at line 128 of file GU_Agent.h.

virtual bool GU_Agent::loadSharedData ( int  load_data_type,
const GA_SharedLoadData item 
)
virtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

void GU_Agent::localTransformsArray ( const GU_PrimPacked prim,
FloatType data,
exint  n 
) const
inline

Definition at line 345 of file GU_Agent.h.

exint GU_Agent::numClipLayers ( ) const
inline

List of clip layers and their blend modes.

Definition at line 283 of file GU_Agent.h.

exint GU_Agent::numClips ( ) const
inline

Return the number of clips used for transform evaluation.

Definition at line 229 of file GU_Agent.h.

virtual bool GU_Agent::save ( UT_Options options,
const GA_SaveMap map 
) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

virtual bool GU_Agent::saveSharedData ( UT_JSONWriter w,
GA_SaveMap map,
GA_GeometryIndex geometryIndex 
) const
virtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

void GU_Agent::setClipByName ( GU_PrimPacked prim,
exint  i,
const char *  clip_name 
)

Set a clip by name.

void GU_Agent::setClipLayerId ( GU_PrimPacked prim,
exint  i,
exint  layer_id 
)

The layer that each clip belongs to.

void GU_Agent::setClipLayers ( GU_PrimPacked prim,
const UT_Array< ClipLayer > &  clip_layers 
)

List of clip layers and their blend modes.

void GU_Agent::setClips ( GU_PrimPacked prim,
const GU_AgentClipPtrArray clips 
)

Array of clips used for transform evaluation

void GU_Agent::setClipsByNames ( GU_PrimPacked prim,
const UT_StringArray clip_names 
)

Array of clips used for transform evaluation

Examples:
SOP/SOP_BouncyAgent.C.
void GU_Agent::setClipTime ( GU_PrimPacked prim,
exint  i,
fpreal  seconds 
)

Array of times in seconds to evaluate the clips. Indices in [0,numClips()-1] inclusively.

Examples:
SOP/SOP_BouncyAgent.C.
void GU_Agent::setClipTransformGroupByName ( GU_PrimPacked prim,
exint  i,
const char *  name 
)

The subset of transforms in the rig that each clip should be applied to.

void GU_Agent::setClipWeight ( GU_PrimPacked prim,
exint  i,
fpreal  weight 
)

Array of weights to evaluate the corresponding clips. Assumes they are normalized.

void GU_Agent::setCollisionLayerName ( GU_PrimPacked prim,
const StringType name 
)

Set the collision layer.

void GU_Agent::setCurrentLayerName ( GU_PrimPacked prim,
const StringType name 
)

Set the default layer (for packing, bounds, etc)

void GU_Agent::setDefinition ( GU_PrimPacked prim,
const GU_AgentDefinitionPtr definition 
)
void GU_Agent::setLocalTransform ( const Matrix4Type xform,
exint  i 
)

Override a specific local transform for this agent.

void GU_Agent::setLocalTransforms ( const Matrix4Array xforms)
inline

Override the local transforms for this agent.

Definition at line 313 of file GU_Agent.h.

void GU_Agent::setLocalTransformsFromArray ( GU_PrimPacked prim,
const FloatType data,
exint  n 
)
inline

Definition at line 348 of file GU_Agent.h.

void GU_Agent::setWorldTransform ( const Matrix4Type xform,
exint  i 
)

Override a specific world transform for this agent.

void GU_Agent::setWorldTransforms ( const Matrix4Array xforms)
inline

Override the world transforms for this agent.

Definition at line 310 of file GU_Agent.h.

void GU_Agent::setWorldTransformsFromArray ( GU_PrimPacked prim,
const FloatType data,
exint  n 
)
inline

Definition at line 341 of file GU_Agent.h.

virtual bool GU_Agent::supportsJSONLoad ( ) const
inlinevirtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

Definition at line 124 of file GU_Agent.h.

exint GU_Agent::transformCount ( ) const
inline

Number of transforms in the rig.

Definition at line 325 of file GU_Agent.h.

const char* GU_Agent::transformName ( exint  i) const

Return the name of the given transform.

exint GU_Agent::transformsArraySize ( ) const

Functions for the 'agentworldtransforms' and 'agentlocaltransforms' intrinsics to manipulate the transforms as an array of floats.

static GA_PrimitiveTypeId GU_Agent::typeId ( )
inlinestatic

Get the type ID for the GU_Agent primitive type.

Definition at line 100 of file GU_Agent.h.

virtual bool GU_Agent::unpack ( GU_Detail destgdp,
const UT_Matrix4D transform 
) const
virtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

virtual bool GU_Agent::unpackWithStyler ( GU_Detail destgdp,
STY_StylerGroup prim_styler_group,
const STY_Styler parent_styler,
const GU_PrimPacked prim 
) const
virtual

API defined on GU_PackedImpl

Reimplemented from GU_PackedImpl.

virtual void GU_Agent::update ( GU_PrimPacked prim,
const UT_Options options 
)
inlinevirtual

API defined on GU_PackedImpl

Implements GU_PackedImpl.

Definition at line 132 of file GU_Agent.h.

void GU_Agent::worldTransformsArray ( const GU_PrimPacked prim,
FloatType data,
exint  n 
) const
inline

Definition at line 339 of file GU_Agent.h.


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