载入中...
搜索中...
未找到
eve::animation::AnimGraph类 参考

Composable runtime pose graph supporting clips, blends, additive layers, per-bone masks, one-shots and 1D/2D blend spaces. Script type: AnimGraph. 更多...

#include <AnimGraph.h>

类 eve::animation::AnimGraph 继承关系图:
eve::animation::IAnimPoseSource

Public 成员函数

 AnimGraph (AnimSkeleton *skeleton)
 Anim graph.
 
 ~AnimGraph () override=default
 Anim graph.
 
 AnimGraph (const AnimGraph &)=delete
 
AnimGraph & operator= (const AnimGraph &)=delete
 
int addClip (AnimClip *clip)
 Adds clip.
 
int addBlend (int a, int b, float weight=0.5f)
 Adds blend.
 
int addAdditive (int base, int additive, float weight=1.f)
 Adds additive.
 
int addLayer (int base, int overlay, float weight=1.f)
 Adds layer.
 
int addOneShot (int base, int shot, float fadeIn=0.1f, float fadeOut=0.1f)
 Adds one shot.
 
int addBlendSpace1D ()
 Adds blend space 1 d.
 
int addBlendSpace2D ()
 Adds blend space 2 d.
 
void addBlendSpace1DPoint (int node, float x, int child)
 Adds blend space 1 d point.
 
void addBlendSpace2DPoint (int node, float x, float y, int child)
 Adds blend space 2 d point.
 
void setBoneMask (int node, int boneIndex, float weight, bool includeChildren=false)
 Sets the bone mask.
 
void clearBoneMask (int node)
 Clears bone mask.
 
void setRoot (int node)
 Sets the root.
 
int getRoot () const
 Returns the root.
 
int getNodeCount () const
 Returns the node count.
 
void setWeight (int node, float weight)
 Sets the weight.
 
void setPosition1D (int node, float x)
 Sets the position 1 d.
 
void setPosition2D (int node, float x, float y)
 Sets the position 2 d.
 
void setSpeed (int node, float speed)
 Sets the speed.
 
void trigger (int node)
 Trigger.
 
bool isOneShotActive (int node) const
 True when one shot active.
 
eve::Result< void > setAdditiveReference (int node, const std::string &reference)
 Set additive reference for an Additive node: "bind" or "identity". Defaults to identity (sample is already a local-space delta).
 
bool setAdditiveReferenceCompat (int node, const std::string &reference)
 Compatibility facade over setAdditiveReference.
 
std::string getAdditiveReference (int node) const
 Return "bind" / "identity", or empty for non-additive / invalid nodes.
 
eve::Result< void > advance (const eve::SimulationStep &step) override
 Evaluate the graph using one scheduler-owned deterministic step.
 
void update (float dt)
 Legacy seconds facade; explicitly forwards to advance().
 
AnimPose * getPose () override
 Borrowed pointer accessor. @ownership Borrowed @lifetime Valid while the owning animation object remains alive; do not retain across destruction.
 
AnimSkeleton * getSkeleton () const override
 Return the graph skeleton. @ownership Borrowed @lifetime Valid while the owning animation object remains alive; do not retain across destruction.
 
bool hasCurrentTick () const noexcept override
 True when current tick.
 
eve::SimulationTick currentTick () const noexcept override
 Current tick.
 
- Public 成员函数 继承自 eve::animation::IAnimPoseSource
virtual ~IAnimPoseSource ()=default
 Releases IAnimPoseSource resources.
 
virtual int getEventCount () const
 Events emitted by the most recent advance; default is none.
 
virtual std::string getEventName (int) const
 
virtual std::string getEventPayload (int) const
 

详细描述

Composable runtime pose graph supporting clips, blends, additive layers, per-bone masks, one-shots and 1D/2D blend spaces. Script type: AnimGraph.

Nodes are stable integer handles. A graph owns runtime state but not skeletons or clips; those must outlive the graph. Call advance(step) once per frame and read getPose(). Graph evaluation is memoized so shared subgraphs sample only once.

在文件 AnimGraph.h 第 26 行定义.

构造及析构函数说明

◆ AnimGraph() [1/2]

eve::animation::AnimGraph::AnimGraph ( AnimSkeleton *  skeleton)
explicit

Anim graph.

在文件 AnimGraph.cpp 第 15 行定义.

引用了 eve::animation::AnimSkeleton::getBoneCount() , 以及 eve::animation::AnimPose::resize().

◆ ~AnimGraph()

eve::animation::AnimGraph::~AnimGraph ( )
overridedefault

Anim graph.

◆ AnimGraph() [2/2]

eve::animation::AnimGraph::AnimGraph ( const AnimGraph &  )
delete

成员函数说明

◆ addAdditive()

int eve::animation::AnimGraph::addAdditive ( int  base,
int  additive,
float  weight = 1.f 
)

Adds additive.

在文件 AnimGraph.cpp 第 56 行定义.

引用了 eve::animation::clampf(), id, n , 以及 weight.

◆ addBlend()

int eve::animation::AnimGraph::addBlend ( int  a,
int  b,
float  weight = 0.5f 
)

Adds blend.

在文件 AnimGraph.cpp 第 46 行定义.

引用了 a, b, eve::animation::clampf(), id, n , 以及 weight.

◆ addBlendSpace1D()

int eve::animation::AnimGraph::addBlendSpace1D ( )

Adds blend space 1 d.

在文件 AnimGraph.cpp 第 89 行定义.

◆ addBlendSpace1DPoint()

void eve::animation::AnimGraph::addBlendSpace1DPoint ( int  node,
float  x,
int  child 
)

Adds blend space 1 d point.

在文件 AnimGraph.cpp 第 92 行定义.

引用了 a, b, n, node , 以及 x.

◆ addBlendSpace2D()

int eve::animation::AnimGraph::addBlendSpace2D ( )

Adds blend space 2 d.

在文件 AnimGraph.cpp 第 90 行定义.

◆ addBlendSpace2DPoint()

void eve::animation::AnimGraph::addBlendSpace2DPoint ( int  node,
float  x,
float  y,
int  child 
)

Adds blend space 2 d point.

在文件 AnimGraph.cpp 第 99 行定义.

引用了 n, node, x , 以及 y.

◆ addClip()

int eve::animation::AnimGraph::addClip ( AnimClip *  clip)

Adds clip.

在文件 AnimGraph.cpp 第 40 行定义.

引用了 clip , 以及 id.

◆ addLayer()

int eve::animation::AnimGraph::addLayer ( int  base,
int  overlay,
float  weight = 1.f 
)

Adds layer.

在文件 AnimGraph.cpp 第 66 行定义.

引用了 eve::animation::clampf(), id, n , 以及 weight.

◆ addOneShot()

int eve::animation::AnimGraph::addOneShot ( int  base,
int  shot,
float  fadeIn = 0.1f,
float  fadeOut = 0.1f 
)

Adds one shot.

在文件 AnimGraph.cpp 第 77 行定义.

引用了 id , 以及 n.

◆ advance()

eve::Result< void > eve::animation::AnimGraph::advance ( const eve::SimulationStep &  step)
overridevirtual

Evaluate the graph using one scheduler-owned deterministic step.

实现了 eve::animation::IAnimPoseSource.

在文件 AnimGraph.cpp 第 296 行定义.

引用了 eve::Applied, eve::Result< T >::failure(), eve::animation::detail::secondsForStep(), step, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 update().

◆ clearBoneMask()

void eve::animation::AnimGraph::clearBoneMask ( int  node)

Clears bone mask.

在文件 AnimGraph.cpp 第 119 行定义.

引用了 mask , 以及 node.

◆ currentTick()

eve::SimulationTick eve::animation::AnimGraph::currentTick ( ) const
inlineoverridevirtualnoexcept

Current tick.

实现了 eve::animation::IAnimPoseSource.

在文件 AnimGraph.h 第 107 行定义.

◆ getAdditiveReference()

std::string eve::animation::AnimGraph::getAdditiveReference ( int  node) const

Return "bind" / "identity", or empty for non-additive / invalid nodes.

在文件 AnimGraph.cpp 第 180 行定义.

引用了 getNodeCount(), eve::animation::Identity, n , 以及 node.

◆ getNodeCount()

int eve::animation::AnimGraph::getNodeCount ( ) const
inline

Returns the node count.

在文件 AnimGraph.h 第 65 行定义.

被这些函数引用 getAdditiveReference().

◆ getPose()

AnimPose * eve::animation::AnimGraph::getPose ( )
inlineoverridevirtual

Borrowed pointer accessor. @ownership Borrowed @lifetime Valid while the owning animation object remains alive; do not retain across destruction.

实现了 eve::animation::IAnimPoseSource.

在文件 AnimGraph.h 第 97 行定义.

◆ getRoot()

int eve::animation::AnimGraph::getRoot ( ) const
inline

Returns the root.

在文件 AnimGraph.h 第 63 行定义.

◆ getSkeleton()

AnimSkeleton * eve::animation::AnimGraph::getSkeleton ( ) const
inlineoverridevirtual

Return the graph skeleton. @ownership Borrowed @lifetime Valid while the owning animation object remains alive; do not retain across destruction.

实现了 eve::animation::IAnimPoseSource.

在文件 AnimGraph.h 第 103 行定义.

◆ hasCurrentTick()

bool eve::animation::AnimGraph::hasCurrentTick ( ) const
inlineoverridevirtualnoexcept

True when current tick.

实现了 eve::animation::IAnimPoseSource.

在文件 AnimGraph.h 第 105 行定义.

◆ isOneShotActive()

bool eve::animation::AnimGraph::isOneShotActive ( int  node) const

True when one shot active.

在文件 AnimGraph.cpp 第 145 行定义.

引用了 node.

◆ operator=()

AnimGraph & eve::animation::AnimGraph::operator= ( const AnimGraph &  )
delete

◆ setAdditiveReference()

eve::Result< void > eve::animation::AnimGraph::setAdditiveReference ( int  node,
const std::string &  reference 
)

Set additive reference for an Additive node: "bind" or "identity". Defaults to identity (sample is already a local-space delta).

在文件 AnimGraph.cpp 第 156 行定义.

引用了 eve::Applied, eve::animation::BindPose, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::animation::Identity, eve::InvalidArgument, n, node, reference, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 setAdditiveReferenceCompat().

◆ setAdditiveReferenceCompat()

bool eve::animation::AnimGraph::setAdditiveReferenceCompat ( int  node,
const std::string &  reference 
)

Compatibility facade over setAdditiveReference.

在文件 AnimGraph.cpp 第 171 行定义.

引用了 node, reference , 以及 setAdditiveReference().

◆ setBoneMask()

void eve::animation::AnimGraph::setBoneMask ( int  node,
int  boneIndex,
float  weight,
bool  includeChildren = false 
)

◆ setPosition1D()

void eve::animation::AnimGraph::setPosition1D ( int  node,
float  x 
)

Sets the position 1 d.

在文件 AnimGraph.cpp 第 127 行定义.

引用了 node , 以及 x.

◆ setPosition2D()

void eve::animation::AnimGraph::setPosition2D ( int  node,
float  x,
float  y 
)

Sets the position 2 d.

在文件 AnimGraph.cpp 第 128 行定义.

引用了 n, node, x , 以及 y.

◆ setRoot()

void eve::animation::AnimGraph::setRoot ( int  node)

Sets the root.

在文件 AnimGraph.cpp 第 122 行定义.

引用了 node.

◆ setSpeed()

void eve::animation::AnimGraph::setSpeed ( int  node,
float  speed 
)

Sets the speed.

在文件 AnimGraph.cpp 第 133 行定义.

引用了 n , 以及 node.

◆ setWeight()

void eve::animation::AnimGraph::setWeight ( int  node,
float  weight 
)

Sets the weight.

在文件 AnimGraph.cpp 第 126 行定义.

引用了 eve::animation::clampf(), node , 以及 weight.

◆ trigger()

void eve::animation::AnimGraph::trigger ( int  node)

Trigger.

在文件 AnimGraph.cpp 第 138 行定义.

引用了 n , 以及 node.

◆ update()

void eve::animation::AnimGraph::update ( float  dt)

Legacy seconds facade; explicitly forwards to advance().

在文件 AnimGraph.cpp 第 305 行定义.

引用了 advance(), eve::Result< void >::ignore(), eve::animation::detail::legacyStep() , 以及 step.


该类的文档由以下文件生成: