Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::scene::skin::BlendShapeManager Class Reference

Public Member Functions

 BlendShapeManager (size_t count, size_t vertices)
 
std::vector< uint8_t > getPackedData ()
 
size_t getIdFromName (const std::string &name)
 
void addBlendShape (const std::string &name, const std::vector< BlendShapeData > &blendshape_data)
 
void setWeight (const std::string &name, const float weight)
 
const std::vector< float > & getAllWeights () const
 
void resetWeights ()
 
uint32_t getCount ()
 
uint32_t getTotalAffectedVerticesCount ()
 

Constructor & Destructor Documentation

◆ BlendShapeManager()

oe::scene::skin::BlendShapeManager::BlendShapeManager ( size_t  count,
size_t  vertices 
)

Prepare undelying blendshape data

Member Function Documentation

◆ addBlendShape()

void oe::scene::skin::BlendShapeManager::addBlendShape ( const std::string &  name,
const std::vector< BlendShapeData > &  blendshape_data 
)

Register a blendshape // associated to a submesh

◆ getAllWeights()

const std::vector< float > & oe::scene::skin::BlendShapeManager::getAllWeights ( ) const
inline

Get all blendshapes' weights

◆ getIdFromName()

size_t oe::scene::skin::BlendShapeManager::getIdFromName ( const std::string &  name)

Get blendshape id from its name

◆ getPackedData()

std::vector< uint8_t > oe::scene::skin::BlendShapeManager::getPackedData ( )

Get packed blendshape data

◆ resetWeights()

void oe::scene::skin::BlendShapeManager::resetWeights ( )

Set all blendshapes' weights to 0

◆ setWeight()

void oe::scene::skin::BlendShapeManager::setWeight ( const std::string &  name,
const float  weight 
)

Set Mesh blendshapes weight value

Note
weight is supposed to be between 0.0 and 1.0 but not enforced to allow creative effects

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