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

Function CalculateModelZ

PanzerChasm/model.cpp:76–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static void CalculateModelZ( Model& model, const Vertex_o3* const vertices, const unsigned int vertex_count )
77{
78 model.z_max= Constants::min_float;
79 model.z_min= Constants::max_float;
80 for( unsigned int v= 0u; v < vertex_count; v++ )
81 {
82 const float z= float( vertices[v].xyz[2] ) * g_3o_model_coords_scale;
83 model.z_max= std::max( model.z_max, z );
84 model.z_min= std::min( model.z_min, z );
85 }
86}
87
88static void CalculateBoundingBox(
89 const Vertex_o3* const vertices, unsigned int vertex_count,

Callers 2

LoadModel_o3Function · 0.85
LoadModel_carFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected