MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / create_box_physic_shell

Method create_box_physic_shell

ogsr_engine/xrGame/physic_item.cpp:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void CPhysicItem::create_box_physic_shell()
137{
138 // Physics (Box)
139 Fobb obb;
140 Visual()->getVisData().box.get_CD(obb.m_translate, obb.m_halfsize);
141 obb.m_rotate.identity();
142
143 // Physics (Elements)
144 CPhysicsElement* E = P_create_Element();
145 R_ASSERT(E);
146 E->add_Box(obb);
147 // Physics (Shell)
148 m_pPhysicsShell = P_create_Shell();
149 R_ASSERT(m_pPhysicsShell);
150 m_pPhysicsShell->add_Element(E);
151 m_pPhysicsShell->setDensity(2000.f);
152}
153
154void CPhysicItem::create_box2sphere_physic_shell()
155{

Callers

nothing calls this directly

Calls 8

VisualFunction · 0.85
P_create_ElementFunction · 0.85
P_create_ShellFunction · 0.85
get_CDMethod · 0.80
add_ElementMethod · 0.80
identityMethod · 0.45
add_BoxMethod · 0.45
setDensityMethod · 0.45

Tested by

no test coverage detected