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

Function GetNormalForWall

PanzerChasm/server/map.cpp:32–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31template<class Wall>
32static m_Vec3 GetNormalForWall( const Wall& wall )
33{
34 m_Vec3 n( wall.vert_pos[0].y - wall.vert_pos[1].y, wall.vert_pos[1].x - wall.vert_pos[0].x, 0.0f );
35 return n / n.xy().Length();
36}
37
38static bool CollideWithSquare( const MapData::ModelDescription& model_description )
39{

Callers 2

CollideWithMapMethod · 0.85
TickMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected