#include <VertexAttributeLayer.h>
Inherits EMotionFX::BaseObject.
Inherited by EMotionFX::SkinningInfoVertexAttributeLayer, and EMotionFX::VertexAttributeLayerAbstractData.
The vertex attribute layer base class. Each mesh can have a set of custom vertex attribute layers. Each layer must be inherited from this base class and must store its custom data, such as texture coordinates or vertex color or softskinning information.
◆ VertexAttributeLayer()
EMotionFX::VertexAttributeLayer::VertexAttributeLayer |
( |
uint32 |
numAttributes, |
|
|
bool |
keepOriginals = false |
|
) |
| |
|
protected |
The constructor.
- Parameters
-
numAttributes | The number of attributes to store inside this layer. |
keepOriginals | Specifies whether a copy of the original data should be stored as well. The current data values wil then be restored to their original values every frame, before passing them through any mesh deformers. |
◆ ~VertexAttributeLayer()
virtual EMotionFX::VertexAttributeLayer::~VertexAttributeLayer |
( |
| ) |
|
|
protectedvirtual |
The destructor, which should delete all allocated attributes from memory.
◆ Clone()
◆ GetData()
virtual void * EMotionFX::VertexAttributeLayer::GetData |
( |
| ) |
|
|
inlinevirtual |
◆ GetIsAbstractDataClass()
virtual bool EMotionFX::VertexAttributeLayer::GetIsAbstractDataClass |
( |
| ) |
const |
|
virtual |
◆ GetKeepOriginals()
MCORE_INLINE bool EMotionFX::VertexAttributeLayer::GetKeepOriginals |
( |
| ) |
const |
|
inline |
Check if this class also stores original vertex data or not. This will store twice as many attributes in memory and is used for vertex data that can be deformed, such as positions, normals and tangents. Before applying deformations to the data returned by GetData() the current vertex data returned by this method will be initialized to its original data as it was before any deformations. The initialization to the original data happens inside the ResetToOriginalData method.
- Returns
- Returns true when this class also stores the original (undeformed) data, next to the current (deformed) data.
◆ GetNumAttributes()
MCORE_INLINE uint32 EMotionFX::VertexAttributeLayer::GetNumAttributes |
( |
| ) |
const |
|
inline |
Get the number of attributes inside this layer.
- Returns
- The number of attributes.
◆ GetOriginalData()
virtual void * EMotionFX::VertexAttributeLayer::GetOriginalData |
( |
| ) |
|
|
inlinevirtual |
Get a pointer to the original data, as it is stored in the base pose, before any mesh deformers have been applied.
- Returns
- A pointer to the original vertex data.
Reimplemented in EMotionFX::VertexAttributeLayerAbstractData.
◆ GetType()
virtual uint32 EMotionFX::VertexAttributeLayer::GetType |
( |
| ) |
const |
|
pure virtual |
◆ GetTypeString()
virtual const char * EMotionFX::VertexAttributeLayer::GetTypeString |
( |
| ) |
const |
|
pure virtual |
◆ RemoveAttributes()
virtual void EMotionFX::VertexAttributeLayer::RemoveAttributes |
( |
uint32 |
startAttributeNr, |
|
|
uint32 |
endAttributeNr |
|
) |
| |
|
pure virtual |
◆ ResetToOriginalData()
virtual void EMotionFX::VertexAttributeLayer::ResetToOriginalData |
( |
| ) |
|
|
pure virtual |
◆ Scale()
virtual void EMotionFX::VertexAttributeLayer::Scale |
( |
float |
scaleFactor | ) |
|
|
inlinevirtual |
Scale all vertex data (should scale positional data and maybe more). This is a slow operation and is used to convert between different unit systems (cm, meters, etc).
- Parameters
-
scaleFactor | The scale factor to scale the current data by. |
◆ SwapAttributes()
virtual void EMotionFX::VertexAttributeLayer::SwapAttributes |
( |
uint32 |
attribA, |
|
|
uint32 |
attribB |
|
) |
| |
|
pure virtual |
◆ m_keepOriginals
bool EMotionFX::VertexAttributeLayer::m_keepOriginals |
|
protected |
Should we store a copy of the original data as well?
◆ m_nameId
uint32 EMotionFX::VertexAttributeLayer::m_nameId |
|
protected |
◆ m_numAttributes
uint32 EMotionFX::VertexAttributeLayer::m_numAttributes |
|
protected |
The number of attributes inside this layer.
The documentation for this class was generated from the following file:
- Gems/EMotionFX/Code/EMotionFX/Source/VertexAttributeLayer.h