MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / makeBoxCollisionShape

Method makeBoxCollisionShape

src/physics/PhysicsSystem.cpp:235–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235Handle::CollisionShapeHandle PhysicsSystem::makeBoxCollisionShape(const Math::float3& halfExtends)
236{
237 btBoxShape* s = new btBoxShape(btVector3(halfExtends.x, halfExtends.y, halfExtends.z));
238
239 Handle::CollisionShapeHandle csh = m_CollisionShapeAllocator.createObject();
240 CollisionShape& cs = getCollisionShape(csh);
241 cs.collisionShape = s;
242 cs.shapeType = CollisionShape::Box;
243 cs.collisionType = CollisionShape::CT_Any;
244
245 cs.collisionShape->setUserIndex(csh.index);
246
247 return csh;
248}
249
250std::vector<RayTestResult> PhysicsSystem::raytraceAll(const Math::float3& from, const Math::float3& to, CollisionShape::ECollisionType filtertype)
251{

Callers

nothing calls this directly

Calls 1

createObjectMethod · 0.45

Tested by

no test coverage detected