|
|
@@ -11,7 +11,7 @@ namespace anki {
|
|
|
PhysicsSphere::PhysicsSphere(F32 radius)
|
|
|
: PhysicsCollisionShape(ShapeType::kSphere)
|
|
|
{
|
|
|
- m_sphere.init(radius);
|
|
|
+ m_sphere.construct(radius);
|
|
|
m_sphere->setMargin(PhysicsWorld::getSingleton().getCollisionMargin());
|
|
|
m_sphere->setUserPointer(static_cast<PhysicsObject*>(this));
|
|
|
}
|
|
|
@@ -24,7 +24,7 @@ PhysicsSphere::~PhysicsSphere()
|
|
|
PhysicsBox::PhysicsBox(const Vec3& extend)
|
|
|
: PhysicsCollisionShape(ShapeType::kBox)
|
|
|
{
|
|
|
- m_box.init(toBt(extend));
|
|
|
+ m_box.construct(toBt(extend));
|
|
|
m_box->setMargin(PhysicsWorld::getSingleton().getCollisionMargin());
|
|
|
m_box->setUserPointer(static_cast<PhysicsObject*>(this));
|
|
|
}
|
|
|
@@ -41,7 +41,7 @@ PhysicsTriangleSoup::PhysicsTriangleSoup(ConstWeakArray<Vec3> positions, ConstWe
|
|
|
{
|
|
|
ANKI_ASSERT((indices.getSize() % 3) == 0);
|
|
|
|
|
|
- m_mesh.init();
|
|
|
+ m_mesh.construct();
|
|
|
|
|
|
for(U32 i = 0; i < indices.getSize(); i += 3)
|
|
|
{
|
|
|
@@ -49,13 +49,13 @@ PhysicsTriangleSoup::PhysicsTriangleSoup(ConstWeakArray<Vec3> positions, ConstWe
|
|
|
}
|
|
|
|
|
|
// Create the dynamic shape
|
|
|
- m_triMesh.m_dynamic.init(m_mesh.get());
|
|
|
+ m_triMesh.m_dynamic.construct(m_mesh.get());
|
|
|
m_triMesh.m_dynamic->setMargin(PhysicsWorld::getSingleton().getCollisionMargin());
|
|
|
m_triMesh.m_dynamic->updateBound();
|
|
|
m_triMesh.m_dynamic->setUserPointer(static_cast<PhysicsObject*>(this));
|
|
|
|
|
|
// And the static one
|
|
|
- m_triMesh.m_static.init(m_mesh.get(), true);
|
|
|
+ m_triMesh.m_static.construct(m_mesh.get(), true);
|
|
|
m_triMesh.m_static->setMargin(PhysicsWorld::getSingleton().getCollisionMargin());
|
|
|
m_triMesh.m_static->setUserPointer(static_cast<PhysicsObject*>(this));
|
|
|
}
|
|
|
@@ -63,7 +63,7 @@ PhysicsTriangleSoup::PhysicsTriangleSoup(ConstWeakArray<Vec3> positions, ConstWe
|
|
|
{
|
|
|
m_type = ShapeType::kConvex; // Fake the type
|
|
|
|
|
|
- m_convex.init(&positions[0][0], I32(positions.getSize()), U32(sizeof(Vec3)));
|
|
|
+ m_convex.construct(&positions[0][0], I32(positions.getSize()), U32(sizeof(Vec3)));
|
|
|
m_convex->setMargin(PhysicsWorld::getSingleton().getCollisionMargin());
|
|
|
m_convex->setUserPointer(static_cast<PhysicsObject*>(this));
|
|
|
}
|