Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::batch_instance Struct Reference

Instance data for a single object in a batch. More...

#include <batch_instance.h>

Public Member Functions

 batch_instance ()=default
 Default constructor.
 
 batch_instance (const math::mat4 *world_transform_ptr)
 Constructor with world transform pointer.
 
 batch_instance (const math::mat4 *world_transform_ptr, const math::vec3 &lod_params)
 Constructor with world transform pointer and LOD parameters.
 
auto is_valid () const -> bool
 Check if this instance has valid data.
 
auto to_string () const -> std::string
 Get string representation for debugging.
 

Public Attributes

const math::mat4 * world_transform_ptr = nullptr
 Pointer to world transformation matrix for this instance (valid only during frame processing)
 
math::vec3 lod_params = math::vec3(0.0f, -1.0f, 0.0f)
 LOD blending parameters (x = current blend factor, y = target blend, z = transition time)
 
float padding = 0.0f
 Padding to ensure alignment (unused, reserved for future use)
 

Detailed Description

Instance data for a single object in a batch.

Contains all per-instance data needed for rendering, including world transform and LOD parameters.

Definition at line 16 of file batch_instance.h.

Constructor & Destructor Documentation

◆ batch_instance() [1/3]

unravel::batch_instance::batch_instance ( )
default

Default constructor.

◆ batch_instance() [2/3]

unravel::batch_instance::batch_instance ( const math::mat4 * world_transform_ptr)
explicit

Constructor with world transform pointer.

Parameters
world_transform_ptrPointer to world transformation matrix (must remain valid until batch submission)

Definition at line 12 of file batch_instance.cpp.

◆ batch_instance() [3/3]

unravel::batch_instance::batch_instance ( const math::mat4 * world_transform_ptr,
const math::vec3 & lod_params )

Constructor with world transform pointer and LOD parameters.

Parameters
world_transform_ptrPointer to world transformation matrix (must remain valid until batch submission)
lod_paramsLOD blending parameters

Definition at line 17 of file batch_instance.cpp.

Member Function Documentation

◆ is_valid()

auto unravel::batch_instance::is_valid ( ) const -> bool

Check if this instance has valid data.

Returns
True if the instance appears to have valid transformation data

Definition at line 23 of file batch_instance.cpp.

◆ to_string()

auto unravel::batch_instance::to_string ( ) const -> std::string

Get string representation for debugging.

Returns
String representation of the instance data

Definition at line 28 of file batch_instance.cpp.

Member Data Documentation

◆ lod_params

math::vec3 unravel::batch_instance::lod_params = math::vec3(0.0f, -1.0f, 0.0f)

LOD blending parameters (x = current blend factor, y = target blend, z = transition time)

Definition at line 22 of file batch_instance.h.

◆ padding

float unravel::batch_instance::padding = 0.0f

Padding to ensure alignment (unused, reserved for future use)

Definition at line 25 of file batch_instance.h.

◆ world_transform_ptr

const math::mat4* unravel::batch_instance::world_transform_ptr = nullptr

Pointer to world transformation matrix for this instance (valid only during frame processing)

Definition at line 19 of file batch_instance.h.


The documentation for this struct was generated from the following files: