HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_AgentShapeDeformer Class Referenceabstract

Defines a deformer for an agent shape. More...

#include <GU_AgentShapeDeformer.h>

+ Inheritance diagram for GU_AgentShapeDeformer:

Public Member Functions

 GU_AgentShapeDeformer (const UT_StringHolder &name)
 
virtual ~GU_AgentShapeDeformer ()=default
 
const UT_StringHoldername () const
 
virtual void deform (GU_Detail &gdp, const GU_AgentShapeLib::Shape &src_shape, exint xform_idx, const GU_Agent &src_agent) const =0
 
virtual void computeBounds (UT_BoundingBox &box, const GU_AgentShapeLib::Shape &src_shape, exint xform_idx, const GU_Agent &src_agent) const
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentShapeDeformer >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentShapeDeformer >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Defines a deformer for an agent shape.

Definition at line 29 of file GU_AgentShapeDeformer.h.

Constructor & Destructor Documentation

GU_AgentShapeDeformer::GU_AgentShapeDeformer ( const UT_StringHolder name)
virtual GU_AgentShapeDeformer::~GU_AgentShapeDeformer ( )
virtualdefault

Member Function Documentation

virtual void GU_AgentShapeDeformer::computeBounds ( UT_BoundingBox box,
const GU_AgentShapeLib::Shape src_shape,
exint  xform_idx,
const GU_Agent src_agent 
) const
virtual

Compute an approximate bounding box for the deformed shape. Similar to deform(), the shape binding's transform and bounds scale are applied after calling this method.

The default implementation just uses the bounding box of the source shape (equivalent to how bounds would be computed for a static shape binding).

Reimplemented in GU_AgentLinearSkinDeformer, and GU_AgentBlendShapeDeformer.

virtual void GU_AgentShapeDeformer::deform ( GU_Detail gdp,
const GU_AgentShapeLib::Shape src_shape,
exint  xform_idx,
const GU_Agent src_agent 
) const
pure virtual

Deform the provided detail, which was unpacked from the given shape binding (shape & transform index) and agent.

The transform index can be used for deformers that need to know the shape's transform in order to perform the deformation correctly (e.g. for skinning). Deformers are not responsible for applying the transform to the geometry - this is performed after the deformer is executed. Note that the transform index may be -1 if the shape was not attached to a joint.

Implemented in GU_AgentLinearSkinDeformer, and GU_AgentBlendShapeDeformer.

const UT_StringHolder& GU_AgentShapeDeformer::name ( ) const
inline

Unique identifier for the deformer. This is used when serializing layers to JSON.

Definition at line 39 of file GU_AgentShapeDeformer.h.


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