Unravel Engine C++ Reference
|
Outlines a collection of bones that influence a given set of faces/vertices in the mesh. More...
#include <mesh.h>
Public Types | |
using | bone_index_map_t = std::map<uint32_t, uint32_t> |
Public Member Functions | |
bone_palette (uint32_t paletteSize) | |
Constructs a bone palette with the given size. | |
auto | get_skinning_matrices (const std::vector< math::transform > &node_transforms, const skin_bind_data &bind_data) const -> const std::vector< math::mat4 > & |
Gathers the bone/palette information and matrices ready for drawing the skinned mesh. | |
auto | get_skinning_matrices (const std::vector< math::mat4 > &node_transforms, const skin_bind_data &bind_data) const -> const std::vector< math::mat4 > & |
void | compute_palette_fit (bone_index_map_t &input, int32_t ¤t_space, int32_t &common_base, int32_t &additional_bones) |
Determines the relevant "fit" information that can be used to discover if and how the specified combination of bones will fit into this palette. | |
void | assign_bones (bone_index_map_t &bones, std::vector< uint32_t > &faces) |
Assigns the specified bones (and faces) to this bone palette. | |
void | assign_bones (std::vector< bool > &bones, std::vector< uint32_t > &faces) |
void | assign_bones (const std::vector< uint32_t > &bones) |
Assigns the specified bones to this bone palette. | |
auto | translate_bone_to_palette (uint32_t bone_index) const -> uint32_t |
Translates the specified bone index into its associated position in the palette. | |
auto | get_maximum_blend_index () const -> int32_t |
Retrieves the maximum vertex blend index for this palette. | |
auto | get_maximum_size () const -> uint32_t |
Retrieves the maximum size of the palette. | |
auto | get_data_group () const -> uint32_t |
Retrieves the identifier of the data group assigned to the submesh of the mesh reserved for this bone palette. | |
auto | get_influenced_faces () -> std::vector< uint32_t > & |
Retrieves the list of faces assigned to this palette. | |
auto | get_bones () const -> const std::vector< uint32_t > & |
Retrieves the indices of the bones referenced by this palette. | |
void | set_maximum_blend_index (int index) |
Sets the maximum vertex blend index for this palette. | |
void | set_data_group (uint32_t group) |
Sets the identifier of the data group assigned to the submesh of the mesh reserved for this bone palette. | |
void | clear_influenced_faces () |
Clears out the temporary face influences array. | |
Protected Attributes | |
bone_index_map_t | bones_lut_ |
< Sorted list of bones in this palette. | |
std::vector< uint32_t > | bones_ |
List of faces assigned to this palette. | |
std::vector< uint32_t > | faces_ |
The data group identifier used to separate the mesh data into submeshes relevant tothis bone palette. | |
uint32_t | data_group_id_ |
The maximum size of the palette. | |
uint32_t | maximum_size_ |
The maximum vertex blend index for this palette. | |
int32_t | maximum_blend_index_ |
Outlines a collection of bones that influence a given set of faces/vertices in the mesh.
using unravel::bone_palette::bone_index_map_t = std::map<uint32_t, uint32_t> |
unravel::bone_palette::bone_palette | ( | uint32_t | paletteSize | ) |
void unravel::bone_palette::assign_bones | ( | bone_index_map_t & | bones, |
std::vector< uint32_t > & | faces ) |
void unravel::bone_palette::assign_bones | ( | const std::vector< uint32_t > & | bones | ) |
void unravel::bone_palette::assign_bones | ( | std::vector< bool > & | bones, |
std::vector< uint32_t > & | faces ) |
void unravel::bone_palette::clear_influenced_faces | ( | ) |
void unravel::bone_palette::compute_palette_fit | ( | bone_index_map_t & | input, |
int32_t & | current_space, | ||
int32_t & | common_base, | ||
int32_t & | additional_bones ) |
Determines the relevant "fit" information that can be used to discover if and how the specified combination of bones will fit into this palette.
input | The input bone index map. |
current_space | The current space available in the palette. |
common_base | The common base index. |
additional_bones | The number of additional bones required. |
auto unravel::bone_palette::get_bones | ( | ) | const -> const std::vector<uint32_t>& |
auto unravel::bone_palette::get_data_group | ( | ) | const -> uint32_t |
auto unravel::bone_palette::get_influenced_faces | ( | ) | -> std::vector<uint32_t>& |
auto unravel::bone_palette::get_maximum_blend_index | ( | ) | const -> int32_t |
auto unravel::bone_palette::get_maximum_size | ( | ) | const -> uint32_t |
auto unravel::bone_palette::get_skinning_matrices | ( | const std::vector< math::mat4 > & | node_transforms, |
const skin_bind_data & | bind_data ) const -> const std::vector<math::mat4>& |
auto unravel::bone_palette::get_skinning_matrices | ( | const std::vector< math::transform > & | node_transforms, |
const skin_bind_data & | bind_data ) const -> const std::vector<math::mat4>& |
Gathers the bone/palette information and matrices ready for drawing the skinned mesh.
node_transforms | The node transforms. |
bind_data | The skin bind data. |
compute_inverse_transpose | Whether to compute the inverse transpose of the matrices. |
void unravel::bone_palette::set_data_group | ( | uint32_t | group | ) |
void unravel::bone_palette::set_maximum_blend_index | ( | int | index | ) |
auto unravel::bone_palette::translate_bone_to_palette | ( | uint32_t | bone_index | ) | const -> uint32_t |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |