11 #ifndef __GU_AgentLayer__
12 #define __GU_AgentLayer__
75 , myTransformId(INVALID_TRANSFORM_ID)
77 , myBoundsScale(1.0, 1.0, 1.0)
80 myBounds.makeInvalid();
92 , myShapeId(shape->uniqueId())
94 , myTransformId(
SYSmax(transform_id, INVALID_TRANSFORM_ID))
96 , myBoundsScale(bounds_scale)
98 , myDeformer(deformer)
104 int64 getMemoryUsage(
bool inclusive)
const;
131 static constexpr
int INVALID_TRANSFORM_ID = -1;
159 bool copy_external_ref);
210 int64 getMemoryUsage(
bool inclusive) const;
214 const
NameType &uniqueName()
const {
return myUniqueName; }
239 {
return myShapes.entries(); }
241 {
return myStaticShapes.entries(); }
243 {
return myDeformingShapes.entries(); }
249 return myTransformStarts(xform_idx + 1) - myTransformStarts(xform_idx);
271 {
return myShapes(myTransformStarts(transform) + i); }
285 {
return shapeGeometry(shape(i)); }
316 bool unpackShapeToDetail(
318 const ShapeBinding &binding,
322 bool apply_joint_xform =
true)
const;
330 return myShapes.isValidIndex(shape_i)
331 ? unpackShapeToDetail(dest, shape(shape_i), agent, rig, xforms)
353 static void installDeformers();
373 return getLinearSkinDeformer(
381 return getLinearSkinDeformer(
391 bool has_blendshapes);
396 bool addShape(
const NameType &
name,
exint transform_id,
403 NameType myUniqueName;
404 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
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate and *a name There is also one special expression _ which means *the weaker expression when composing expressions together See with
SIM_API const UT_StringHolder agent
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.
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
std::optional< T > UT_Optional
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
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
GLuint const GLchar * name
UT_StringHolder myLayerName
UT_StringHolder myDeformerName
GA_API const UT_StringHolder transform
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.
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
GLubyte GLubyte GLubyte GLubyte w
exint staticEntries() const
const UT_IntArray & getStatic() const
const UT_BoundingBoxF & bounds() const
UT_Array< ShapeBinding > ShapeArray
UT_StringHolder myTransformName
UT_StringHolder myShapeName