11 #ifndef __GU_AgentLayer__
12 #define __GU_AgentLayer__
74 , myTransformId(INVALID_TRANSFORM_ID)
76 , myBoundsScale(1.0, 1.0, 1.0)
79 myBounds.makeInvalid();
91 , myShapeId(shape->uniqueId())
93 , myTransformId(
SYSmax(transform_id, INVALID_TRANSFORM_ID))
95 , myBoundsScale(bounds_scale)
97 , myDeformer(deformer)
103 int64 getMemoryUsage(
bool inclusive)
const;
130 static constexpr
int INVALID_TRANSFORM_ID = -1;
158 bool copy_external_ref);
213 const
NameType &uniqueName()
const {
return myUniqueName; }
238 {
return myShapes.entries(); }
240 {
return myStaticShapes.entries(); }
242 {
return myDeformingShapes.entries(); }
248 return myTransformStarts(xform_idx + 1) - myTransformStarts(xform_idx);
270 {
return myShapes(myTransformStarts(transform) + i); }
284 {
return shapeGeometry(shape(i)); }
315 bool unpackShapeToDetail(
317 const ShapeBinding &binding,
321 bool apply_joint_xform =
true)
const;
329 return myShapes.isValidIndex(shape_i)
330 ? unpackShapeToDetail(dest, shape(shape_i), agent, rig, xforms)
352 static void installDeformers();
372 return getLinearSkinDeformer(
380 return getLinearSkinDeformer(
387 bool addShape(
const NameType &
name,
exint transform_id,
394 NameType myUniqueName;
395 NameType myLayerName;
GT_API const UT_StringHolder filename
exint deformingEntries() const
ShapeBinding(const GU_AgentShapeLib &lib, const NameType &name, const ShapePtr &shape, GA_Offset offset, int transform_id, const GU_AgentShapeDeformerConstPtr &deformer, const UT_BoundingBoxF &bounds, const UT_Vector3F &bounds_scale)
bool unpackShapeToDetail(GU_Detail &dest, exint shape_i, const GU_Agent &agent, const GU_AgentRig &rig, const UT_Array< UT_Matrix4F > &xforms) const
#define SYS_VISIBILITY_EXPORT
ShapeArray::const_iterator const_iterator
const_iterator begin() const
bool isAttachedToTransform() const
const UT_IntArray & getDeforming() const
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
GLuint const GLchar * name
A reference counter base class for use with UT_IntrusivePtr.
const_iterator end() const
static GU_AgentShapeDeformerConstPtr getDualQuatSkinDeformer()
Convenience method to return the dual quaternion skinning deformer.
exint numBoundShapes(exint xform_idx) const
Return the number of shapes bound to a specific transform.
#define GA_INVALID_OFFSET
GLubyte GLubyte GLubyte GLubyte w
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
GLuint GLenum GLenum transform
static GU_AgentShapeDeformerConstPtr getDualQuatBlendSkinDeformer()
const NameType & shapeName() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
A rig for the agent primitive.
UT_IntrusivePtr< const GU_AgentLayer > GU_AgentLayerConstPtr
const ShapeBinding & shape(exint i) const
Get binding information for the given shape.
const GU_AgentShapeDeformerConstPtr & deformer() const
const ShapeBinding & boundShape(exint transform, exint i) const
UT_Vector3F myBoundsScale
Used to store the result of parsing a shape binding from a JSON file.
GLsizei GLsizei GLchar * source
Wrapper around hboost::intrusive_ptr.
GU_AgentShapeLib::ShapePtr ShapePtr
UT_Array< ShapeBindingData > myDeforming
UT_StringHolder myLayerName
UT_StringHolder myDeformerName
bool isFile() const
Return whether the layer was loaded from disk.
GT_API const UT_StringHolder version
Used to store the result of parsing a layer from a JSON file.
GU_ConstDetailHandle detail() const
Return the underlying geometry.
UT_IntrusivePtr< GU_AgentLayer > GU_AgentLayerPtr
void setName(const NameType &name)
SYS_VISIBILITY_EXPORT void GUregisterAgentShapeDeformer(void *)
Entry point for registering custom deformers.
GU_ConstDetailHandle shapeGeometry(exint i) const
Get the geometry for the given shape index.
GLsizei const GLint box[]
const GU_AgentShapeLib & shapeLib() const
Return the shape library for the layer.
const GU_AgentRig & rig() const
Return the rig associated with the layer.
const NameType & name() const
base_iterator< const ShapeBinding, true > const_iterator
UT_Array< ShapeBindingData > myStatic
const UT_Vector3F & boundsScale() const
exint staticEntries() const
const UT_IntArray & getStatic() const
const UT_BoundingBoxF & bounds() const
UT_Array< ShapeBinding > ShapeArray
UT_StringHolder myTransformName
UT_StringHolder myShapeName