MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / CalculateBoundingBox

Function CalculateBoundingBox

PanzerChasm/model.cpp:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static void CalculateBoundingBox(
89 const Vertex_o3* const vertices, unsigned int vertex_count,
90 m_BBox3& out_bbox )
91{
92 out_bbox.min.x= out_bbox.min.y= out_bbox.min.z= Constants::max_float;
93 out_bbox.max.x= out_bbox.max.y= out_bbox.max.z= Constants::min_float;
94
95 for( unsigned int i= 0u; i < vertex_count; i++ )
96 out_bbox +=
97 m_Vec3(
98 float( vertices[i].xyz[0] ),
99 float( vertices[i].xyz[1] ),
100 float( vertices[i].xyz[2] ) ) * g_3o_model_coords_scale;
101}
102
103static unsigned char GroupIdToGroupsMask( const unsigned char group_id )
104{

Callers 2

LoadModel_o3Function · 0.85
LoadModel_carFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected