Nebula
Loading...
Searching...
No Matches
Characters Namespace Reference

Detailed Description

A character encapsulates a skeleton resource, an animation resource, and the ability to instantiate such and drive animations.

Base class for all model nodes, which is the resource level instantiation of hierarchical model.

A skeleton resource is a container for skeletons loaded from an NSK file.

Stream loader for skeletons.

Contains relevant information about a skeleton joint.

Each node represents some level in the hierarchy, and the different type of node contain their specific data.

The nodes have names for lookup, the name is setup during load.

A node is a part of an N-tree, meaning there are N children [0-infinity] for each node. The model itself keeps track of the root node, and a dictionary of all nodes and their corresponding names.

Classes

class  CharacterContext
 Assumes control over the character animation functionalities of a model if it contains a character definition and an animation set. More...
 
struct  CharacterJobContext
 
struct  CharacterJoint
 
struct  Nsk3Header
 NSK3 file format structs. More...
 
struct  Nsk3Joint
 
struct  Nsk3Skeleton
 
struct  SkeletonCreateInfo
 
struct  SkeletonId
 
struct  SkeletonJobJoint
 
class  SkeletonLoader
 
struct  SkeletonResourceId
 

Typedefs

typedef Ids::IdAllocator< Util::FixedArray< CharacterJoint >, Util::FixedArray< Math::mat4 >, Util::HashTable< Util::StringAtom, IndexT >, Util::FixedArray< Math::vec4 > > SkeletonAllocator
 
typedef Ids::IdAllocator< Util::FixedArray< SkeletonId > > SkeletonResourceAllocator
 

Enumerations

enum  EnqueueMode { Append , Replace , IgnoreIfSame }
 
enum  { Skeleton_Joints , Skeleton_BindPose , Skeleton_JointNameMap , Skeleton_IdleSamples }
 

Functions

 __ImplementContext (CharacterContext, CharacterContext::characterContextAllocator)
 
const bool IsExpired (const CharacterContext::AnimationRuntime &runtime, const Timing::Time time)
 
const bool IsInfinite (const CharacterContext::AnimationRuntime &runtime)
 
Timing::Tick GetAbsoluteStopTime (const CharacterContext::AnimationRuntime &runtime)
 
void EvalCharacter (SizeT totalJobs, SizeT groupSize, IndexT groupIndex, SizeT invocationOffset, void *ctx)
 
 __ImplementEnumBitOperators (CharacterContext::LoadState)
 
const SkeletonId CreateSkeleton (const SkeletonCreateInfo &info)
 create model (resource)
 
void DestroySkeleton (const SkeletonId id)
 discard model (resource)
 
const SizeT SkeletonGetNumJoints (const SkeletonId id)
 get number of joints from skeleton
 
const Util::FixedArray< CharacterJoint > & SkeletonGetJoints (const SkeletonId id)
 get joints from skeleton
 
const Util::FixedArray< Math::mat4 > & SkeletonGetBindPose (const SkeletonId id)
 get bind pose
 
const IndexT SkeletonGetJointIndex (const SkeletonId id, const Util::StringAtom &name)
 get joint index
 
const Util::FixedArray< Math::vec4 > & SkeletonGetIdleSamples (const SkeletonId id)
 Get idle samples.
 
void SkeletonEvalJob (const Jobs::JobFuncContext &ctx)
 
void SkeletonEvalJobWithVariation (const Jobs::JobFuncContext &ctx)
 
 __ImplementClass (Characters::SkeletonLoader, 'SSKP', Resources::ResourceLoader) Resources
 
const SkeletonId SkeletonResourceGetSkeleton (const SkeletonResourceId id, IndexT index)
 Fetch skeleton from loaded resource.
 
void DestroySkeletonResource (const SkeletonResourceId id)
 Discard skeleton resource and the skeletons it holds.
 

Variables

SkeletonAllocator skeletonAllocator
 
SkeletonResourceAllocator skeletonResourceAllocator
 

Typedef Documentation

◆ SkeletonAllocator

◆ SkeletonResourceAllocator

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Skeleton_Joints 
Skeleton_BindPose 
Skeleton_JointNameMap 
Skeleton_IdleSamples 

◆ EnqueueMode

Enumerator
Append 
Replace 
IgnoreIfSame 

Function Documentation

◆ __ImplementClass()

Characters::__ImplementClass ( Characters::SkeletonLoader ,
'SSKP' ,
Resources::ResourceLoader  )

◆ __ImplementContext()

Characters::__ImplementContext ( CharacterContext ,
CharacterContext::characterContextAllocator  )

◆ __ImplementEnumBitOperators()

Characters::__ImplementEnumBitOperators ( CharacterContext::LoadState )

◆ CreateSkeleton()

const SkeletonId Characters::CreateSkeleton ( const SkeletonCreateInfo & info)

create model (resource)

◆ DestroySkeleton()

void Characters::DestroySkeleton ( const SkeletonId id)

discard model (resource)

◆ DestroySkeletonResource()

void Characters::DestroySkeletonResource ( const SkeletonResourceId id)

Discard skeleton resource and the skeletons it holds.

Destroy all skeletons in resource.

◆ EvalCharacter()

void Characters::EvalCharacter ( SizeT totalJobs,
SizeT groupSize,
IndexT groupIndex,
SizeT invocationOffset,
void * ctx )

◆ GetAbsoluteStopTime()

Timing::Tick Characters::GetAbsoluteStopTime ( const CharacterContext::AnimationRuntime & runtime)

◆ IsExpired()

const bool Characters::IsExpired ( const CharacterContext::AnimationRuntime & runtime,
const Timing::Time time )

◆ IsInfinite()

const bool Characters::IsInfinite ( const CharacterContext::AnimationRuntime & runtime)

◆ SkeletonEvalJob()

void Characters::SkeletonEvalJob ( const Jobs::JobFuncContext & ctx)

◆ SkeletonEvalJobWithVariation()

void Characters::SkeletonEvalJobWithVariation ( const Jobs::JobFuncContext & ctx)

◆ SkeletonGetBindPose()

const Util::FixedArray< Math::mat4 > & Characters::SkeletonGetBindPose ( const SkeletonId id)

get bind pose

◆ SkeletonGetIdleSamples()

const Util::FixedArray< Math::vec4 > & Characters::SkeletonGetIdleSamples ( const SkeletonId id)

Get idle samples.

◆ SkeletonGetJointIndex()

const IndexT Characters::SkeletonGetJointIndex ( const SkeletonId id,
const Util::StringAtom & name )

get joint index

◆ SkeletonGetJoints()

const Util::FixedArray< CharacterJoint > & Characters::SkeletonGetJoints ( const SkeletonId id)

get joints from skeleton

◆ SkeletonGetNumJoints()

const SizeT Characters::SkeletonGetNumJoints ( const SkeletonId id)

get number of joints from skeleton

◆ SkeletonResourceGetSkeleton()

const SkeletonId Characters::SkeletonResourceGetSkeleton ( const SkeletonResourceId id,
IndexT index )

Fetch skeleton from loaded resource.

Get skeleton from resource.

Variable Documentation

◆ skeletonAllocator

SkeletonAllocator Characters::skeletonAllocator

◆ skeletonResourceAllocator

SkeletonResourceAllocator Characters::skeletonResourceAllocator