PixelLightAPI  .
Classes | Public Member Functions
PLMesh::MorphTargetAni Class Reference

Morph target animation class. More...

#include <MorphTargetAni.h>

Inheritance diagram for PLMesh::MorphTargetAni:
Inheritance graph
[legend]

List of all members.

Classes

class  AniMorphTarget
 Animation morph target. More...

Public Member Functions

PLMESH_API MorphTargetAni (const PLCore::String &sName, PLCore::ElementManager< MorphTargetAni > *pManager=nullptr)
 Constructor.
virtual PLMESH_API ~MorphTargetAni ()
 Destructor.
PLMESH_API PLCore::Array
< AniMorphTarget > & 
GetMorphTargets ()
 Returns the morph target animation morph targets.
PLMESH_API bool ApplyMorphTargetWeight (PLCore::Array< float > &lstMorphTargetWeights, PLCore::uint32 nFrame, float fWeight=1.0f, const Mesh *pMesh=nullptr) const
 Applies the morph target weight from the given morph target frame to the given morph target weights.
PLMESH_API bool ApplyMorphTargetWeight (PLCore::Array< float > &lstMorphTargetWeights, PLCore::uint32 nFrame1, PLCore::uint32 nFrame2, float fTime, float fWeight=1.0f, const Mesh *pMesh=nullptr) const
 Applies the blended morph target weight from the given morph target frames to the given morph target weights.
virtual PLMESH_API MorphTargetAnioperator= (const MorphTargetAni &cSource)
virtual PLMESH_API PLCore::String GetSourceName () const override
 Get the animation source name.

Detailed Description

Morph target animation class.


Constructor & Destructor Documentation

PLMESH_API PLMesh::MorphTargetAni::MorphTargetAni ( const PLCore::String sName,
PLCore::ElementManager< MorphTargetAni > *  pManager = nullptr 
)

Constructor.

Parameters:
[in]sNameName
[in]pManagerElement manager using this element, can be a null pointer
Note:
  • If you provide the pointer to the owner manager the morph target animation will check in the owner morph target animation manager name list
  • If the desired name is already in use inside the owner manager an alternative name is set
virtual PLMESH_API PLMesh::MorphTargetAni::~MorphTargetAni ( ) [virtual]

Destructor.


Member Function Documentation

Returns the morph target animation morph targets.

Returns:
Morph target animation morph targets
PLMESH_API bool PLMesh::MorphTargetAni::ApplyMorphTargetWeight ( PLCore::Array< float > &  lstMorphTargetWeights,
PLCore::uint32  nFrame,
float  fWeight = 1.0f,
const Mesh pMesh = nullptr 
) const

Applies the morph target weight from the given morph target frame to the given morph target weights.

Parameters:
[out]lstMorphTargetWeightsMorph target weights to manipulate
[in]nFrameMorph target animation frame
[in]fWeightWeight (0.0-1.0)
[in]pMeshMesh of the given morph target weights array, can be a null pointer
Returns:
'true' if all went fine, else 'false'
Note:
  • If pMesh is not a null pointer lstMorphTargetWeights is a list of ALL morph target influences of the given mesh, else lstMorphTargetWeights is only a list of the morph target weights of THIS animation!
PLMESH_API bool PLMesh::MorphTargetAni::ApplyMorphTargetWeight ( PLCore::Array< float > &  lstMorphTargetWeights,
PLCore::uint32  nFrame1,
PLCore::uint32  nFrame2,
float  fTime,
float  fWeight = 1.0f,
const Mesh pMesh = nullptr 
) const

Applies the blended morph target weight from the given morph target frames to the given morph target weights.

Parameters:
[out]lstMorphTargetWeightsMorph target weights to manipulate
[in]nFrame1Morph target animation frame 1
[in]nFrame2Morph target animation frame 2
[in]fTimeMorph target animation time (0.0-1.0)
[in]fWeightWeight (0.0-1.0)
[in]pMeshMesh of the given morph target weights array, can be a null pointer
Returns:
'true' if all went fine, else 'false'
See also:
virtual PLMESH_API MorphTargetAni& PLMesh::MorphTargetAni::operator= ( const MorphTargetAni cSource) [virtual]
virtual PLMESH_API PLCore::String PLMesh::MorphTargetAni::GetSourceName ( ) const [override, virtual]

Get the animation source name.

Returns:
Animation source name, empty on error
Note:
  • If this is a skeleton animation, the source name is the name of a skeleton. (SkeletonManager::Get(...))
  • If this is a vertex animation, the source name is the name of a morph target animation. (pMyMesh->GetMorphTargetAnimationManager().Get(...))

Reimplemented from PLRenderer::AnimationInfo.


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:36
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported