HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_Skeleton.h File Reference
#include "HUSD_API.h"
#include <GU/GU_AgentClip.h>
#include <GU/GU_AgentRig.h>
#include <SYS/SYS_Types.h>
#include <UT/UT_UniquePtr.h>
+ Include dependency graph for HUSD_Skeleton.h:

Go to the source code of this file.

Classes

class  HUSD_SkeletonCache
 

Enumerations

enum  HUSD_SkeletonPoseType { HUSD_SkeletonPoseType::Animation, HUSD_SkeletonPoseType::BindPose, HUSD_SkeletonPoseType::RestPose }
 

Functions

HUSD_API UT_StringHolder HUSDdefaultSkelRootPath (HUSD_AutoReadLock &readlock)
 Returns the path to a SkelRoot prim in the stage, or the empty string. More...
 
HUSD_API bool HUSDimportSkinnedGeometry (GU_Detail &gdp, HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, const UT_StringRef &purpose, const UT_StringHolder &shapeattrib)
 Imports all skinnable primitives underneath the provided SkelRoot prim. More...
 
HUSD_API bool HUSDimportSkeleton (GU_Detail &gdp, HUSD_SkeletonCache &cache, HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, HUSD_SkeletonPoseType pose_type)
 
HUSD_API bool HUSDimportSkeletonPose (GU_Detail &gdp, const HUSD_SkeletonCache &cache, HUSD_AutoReadLock &readlock, HUSD_SkeletonPoseType pose_type, fpreal timecode)
 
HUSD_API GU_AgentRigPtr HUSDimportAgentRig (HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, const UT_StringHolder &rig_name, bool create_locomotion_joint)
 Builds an agent rig from the SkelRoot's first Skeleton prim. More...
 
HUSD_API bool HUSDimportAgentShapes (GU_AgentShapeLib &shapelib, GU_AgentLayer &layer, HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath, const UT_StringRef &purpose, const UT_Vector3F &layer_bounds_scale)
 
HUSD_API GU_AgentClipPtr HUSDimportAgentClip (const GU_AgentRigConstPtr &rig, HUSD_AutoReadLock &readlock, const UT_StringRef &skelrootpath)
 
HUSD_API UT_Array
< GU_AgentClipPtr
HUSDimportAgentClips (const GU_AgentRigConstPtr &rig, HUSD_AutoReadLock &readlock, const UT_StringRef &prim_pattern)
 

Enumeration Type Documentation

enum HUSD_SkeletonPoseType
strong
Enumerator
Animation 
BindPose 
RestPose 

Definition at line 46 of file HUSD_Skeleton.h.

Function Documentation

HUSD_API UT_StringHolder HUSDdefaultSkelRootPath ( HUSD_AutoReadLock readlock)

Returns the path to a SkelRoot prim in the stage, or the empty string.

HUSD_API GU_AgentClipPtr HUSDimportAgentClip ( const GU_AgentRigConstPtr rig,
HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath 
)

Initialize an agent clip from the animation associated with the skeleton used for HUSDimportAgentRig(). The clip is assigned a name from the skeleton primitive's name.

HUSD_API UT_Array<GU_AgentClipPtr> HUSDimportAgentClips ( const GU_AgentRigConstPtr rig,
HUSD_AutoReadLock readlock,
const UT_StringRef prim_pattern 
)

Import clips from the provided primitive pattern, which can match against either SkelRoot or Skeleton prims. The clips are assigned names from the USD primitives' names.

HUSD_API GU_AgentRigPtr HUSDimportAgentRig ( HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
const UT_StringHolder rig_name,
bool  create_locomotion_joint 
)

Builds an agent rig from the SkelRoot's first Skeleton prim.

HUSD_API bool HUSDimportAgentShapes ( GU_AgentShapeLib shapelib,
GU_AgentLayer layer,
HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
const UT_StringRef purpose,
const UT_Vector3F layer_bounds_scale 
)

Imports all skinnable primitives underneath the provided SkelRoot prim (which are associated with the skeleton used for HUSDimportRig()), and adds the shape bindings to the provided layer.

HUSD_API bool HUSDimportSkeleton ( GU_Detail gdp,
HUSD_SkeletonCache cache,
HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
HUSD_SkeletonPoseType  pose_type 
)

Imports all Skeleton primitives underneath the provided SkelRoot prim. A point is created for each joint, and joints are connected to their parents by polyline primitives. Use HUSDimportSkeletonPose() to set the skeleton's transforms. The pose type is only used in this method to initialize attributes that aren't time-varying. The HUSD_SkeletonCache is initialized for use with HUSDimportSkeletonPose().

HUSD_API bool HUSDimportSkeletonPose ( GU_Detail gdp,
const HUSD_SkeletonCache cache,
HUSD_AutoReadLock readlock,
HUSD_SkeletonPoseType  pose_type,
fpreal  timecode 
)

Updates the pose using the skeleton geometry and cached data created by HUSDimportSkeleton().

HUSD_API bool HUSDimportSkinnedGeometry ( GU_Detail gdp,
HUSD_AutoReadLock readlock,
const UT_StringRef skelrootpath,
const UT_StringRef purpose,
const UT_StringHolder shapeattrib 
)

Imports all skinnable primitives underneath the provided SkelRoot prim.