RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Static Public Attributes
RoR::Collisions::hash_coll_element_t Struct Reference

Public Member Functions

 hash_coll_element_t (unsigned int cell_id_, int value)
 
bool IsCollisionBox () const
 
bool IsCollisionTri () const
 

Data Fields

unsigned int cell_id
 
int element_index
 Values below ELEMENT_TRI_BASE_INDEX are collision box indices (Collisions::m_collision_boxes), values above are collision tri indices (Collisions::m_collision_tris). More...
 

Static Public Attributes

static const int ELEMENT_TRI_BASE_INDEX = 1000000
 

Detailed Description

Static collision object lookup system

Terrain is split into equal-size 'cells' of dimension CELL_SIZE, identified by CellID A hash table aggregates elements from multiple cells in one entry

Definition at line 104 of file Collisions.h.

Constructor & Destructor Documentation

◆ hash_coll_element_t()

RoR::Collisions::hash_coll_element_t::hash_coll_element_t ( unsigned int  cell_id_,
int  value 
)
inline

Definition at line 108 of file Collisions.h.

Member Function Documentation

◆ IsCollisionBox()

bool RoR::Collisions::hash_coll_element_t::IsCollisionBox ( ) const
inline

Definition at line 110 of file Collisions.h.

◆ IsCollisionTri()

bool RoR::Collisions::hash_coll_element_t::IsCollisionTri ( ) const
inline

Definition at line 111 of file Collisions.h.

Field Documentation

◆ cell_id

unsigned int RoR::Collisions::hash_coll_element_t::cell_id

Definition at line 113 of file Collisions.h.

◆ element_index

int RoR::Collisions::hash_coll_element_t::element_index

Values below ELEMENT_TRI_BASE_INDEX are collision box indices (Collisions::m_collision_boxes), values above are collision tri indices (Collisions::m_collision_tris).

Definition at line 117 of file Collisions.h.

◆ ELEMENT_TRI_BASE_INDEX

const int RoR::Collisions::hash_coll_element_t::ELEMENT_TRI_BASE_INDEX = 1000000
static

Definition at line 106 of file Collisions.h.


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