#include <model.h>
|
| struct | transform_index |
| | Maps submesh index to a list of transform indices. Key: submesh_index, Value: list of indices into the transforms array. More...
|
| |
|
| void | clear () |
| | Clears all data.
|
| |
| void | reserve (size_t count) |
| | Reserves space for submeshes.
|
| |
| template<typename SubmeshIndices > |
| auto | add_transform (const SubmeshIndices &submesh_indices, const math::mat4 &transform, bool active) -> uint32_t |
| | Adds a transform and maps multiple submesh indices to it. All submesh indices in the vector will reference the same transform.
|
| |
| auto | add_transform (const math::mat4 &transform) -> uint32_t |
| | Adds a transform to the shared pool without mapping any submesh to it.
|
| |
| void | map_submesh (uint32_t submesh_index, uint32_t trans_index, bool active, bool casts_shadow) |
| | Maps a single submesh index to a pooled transform with per-instance flags.
|
| |
| auto | get_transform_count (uint32_t submesh_index) const -> size_t |
| | Gets the number of transform instances for a specific submesh.
|
| |
| auto | get_transform (uint32_t submesh_index, size_t instance_index) const -> const math::mat4 * |
| | Gets a specific transform for a submesh by its instance index.
|
| |
| auto | has_transforms (uint32_t submesh_index) const -> bool |
| | Checks if a submesh has any transforms.
|
| |
| auto | get_transform_active (uint32_t submesh_index, size_t instance_index) const -> bool |
| | Checks if a transform is active.
|
| |
| auto | get_transform_casts_shadow (uint32_t submesh_index, size_t instance_index) const -> bool |
| | Checks if an instance casts shadows.
|
| |
Definition at line 56 of file model.h.
◆ add_transform() [1/2]
| auto unravel::submesh_pose_mat4::add_transform |
( |
const math::mat4 & | transform | ) |
-> uint32_t
|
|
inline |
Adds a transform to the shared pool without mapping any submesh to it.
- Parameters
-
| transform | The transform to add. |
- Returns
- The index of the transform in the transforms array.
Definition at line 121 of file model.h.
◆ add_transform() [2/2]
template<typename SubmeshIndices >
| auto unravel::submesh_pose_mat4::add_transform |
( |
const SubmeshIndices & | submesh_indices, |
|
|
const math::mat4 & | transform, |
|
|
bool | active ) -> uint32_t
|
|
inline |
Adds a transform and maps multiple submesh indices to it. All submesh indices in the vector will reference the same transform.
- Parameters
-
| submesh_indices | Submesh indices that should use this transform. |
| transform | The transform to add. |
- Returns
- The index of the transform in the transforms array.
Definition at line 102 of file model.h.
◆ clear()
| void unravel::submesh_pose_mat4::clear |
( |
| ) |
|
|
inline |
Clears all data.
Definition at line 79 of file model.h.
◆ get_transform()
| auto unravel::submesh_pose_mat4::get_transform |
( |
uint32_t | submesh_index, |
|
|
size_t | instance_index ) const -> const math::mat4*
|
|
inline |
Gets a specific transform for a submesh by its instance index.
- Parameters
-
- Returns
- Pointer to the transform, or nullptr if invalid.
Definition at line 164 of file model.h.
◆ get_transform_active()
| auto unravel::submesh_pose_mat4::get_transform_active |
( |
uint32_t | submesh_index, |
|
|
size_t | instance_index ) const -> bool
|
|
inline |
Checks if a transform is active.
- Parameters
-
- Returns
- True if the transform is active, false otherwise.
Definition at line 198 of file model.h.
◆ get_transform_casts_shadow()
| auto unravel::submesh_pose_mat4::get_transform_casts_shadow |
( |
uint32_t | submesh_index, |
|
|
size_t | instance_index ) const -> bool
|
|
inline |
Checks if an instance casts shadows.
- Parameters
-
- Returns
- True if the instance casts shadows, false otherwise.
Definition at line 217 of file model.h.
◆ get_transform_count()
| auto unravel::submesh_pose_mat4::get_transform_count |
( |
uint32_t | submesh_index | ) |
const -> size_t
|
|
inline |
Gets the number of transform instances for a specific submesh.
- Parameters
-
| submesh_index | The index of the submesh. |
- Returns
- The number of transforms for this submesh.
Definition at line 149 of file model.h.
◆ has_transforms()
| auto unravel::submesh_pose_mat4::has_transforms |
( |
uint32_t | submesh_index | ) |
const -> bool
|
|
inline |
Checks if a submesh has any transforms.
- Parameters
-
| submesh_index | The index of the submesh. |
- Returns
- True if the submesh has transforms, false otherwise.
Definition at line 186 of file model.h.
◆ map_submesh()
| void unravel::submesh_pose_mat4::map_submesh |
( |
uint32_t | submesh_index, |
|
|
uint32_t | trans_index, |
|
|
bool | active, |
|
|
bool | casts_shadow ) |
|
inline |
Maps a single submesh index to a pooled transform with per-instance flags.
- Parameters
-
| submesh_index | The submesh index to map. |
| trans_index | Index of the transform in the pool (see add_transform). |
| active | Whether this instance is rendered at all. |
| casts_shadow | Whether this instance is rendered into shadow passes. |
Definition at line 135 of file model.h.
◆ reserve()
| void unravel::submesh_pose_mat4::reserve |
( |
size_t | count | ) |
|
|
inline |
Reserves space for submeshes.
- Parameters
-
| count | Number of submeshes to reserve space for. |
Definition at line 89 of file model.h.
◆ submesh_to_transform_indices
| hpp::small_vector<hpp::small_vector<transform_index> > unravel::submesh_pose_mat4::submesh_to_transform_indices |
◆ transforms
| std::vector<math::mat4> unravel::submesh_pose_mat4::transforms |
Shared pool of unique transforms. Multiple submeshes can reference the same transform by index.
Definition at line 62 of file model.h.
The documentation for this struct was generated from the following file: