Torque3D Documentation / _generateds / PhysicsCollision

PhysicsCollision

Engine/source/T3D/physics/physicsCollision.h

The shared collision representation for a instance of a static or dynamic physics body.

More...

Public Functions

addBox(const Point3F & halfWidth, const MatrixF & localXfm)

Add a box to the collision shape.

addCapsule(F32 radius, F32 height, const MatrixF & localXfm)

Add a Y axis capsule to the collision shape.

bool
addConvex(const Point3F * points, U32 count, const MatrixF & localXfm)

Add a point cloud convex hull to the collision shape.

bool
addHeightfield(const U16 * heights, const bool * holes, U32 blockSize, F32 metersPerSample, const MatrixF & localXfm)

Add a heightfield to the collision shape.

Add an infinite plane to the collision shape.

addSphere(F32 radius, const MatrixF & localXfm)

Add a sphere to the collision shape.

bool
addTriangleMesh(const Point3F * vert, U32 vertCount, const U32 * index, U32 triCount, const MatrixF & localXfm)

Add a triangle mesh to the collision shape.

Detailed Description

The shared collision representation for a instance of a static or dynamic physics body.

Note that making very big convex primitives can cause bad queries and collisions in some physics providers.

Public Functions

addBox(const Point3F & halfWidth, const MatrixF & localXfm)

Add a box to the collision shape.

Reimplemented by: BtCollision, Px3Collision

addCapsule(F32 radius, F32 height, const MatrixF & localXfm)

Add a Y axis capsule to the collision shape.

Reimplemented by: BtCollision, Px3Collision

addConvex(const Point3F * points, U32 count, const MatrixF & localXfm)

Add a point cloud convex hull to the collision shape.

Reimplemented by: BtCollision, Px3Collision

addHeightfield(const U16 * heights, const bool * holes, U32 blockSize, F32 metersPerSample, const MatrixF & localXfm)

Add a heightfield to the collision shape.

Reimplemented by: BtCollision, Px3Collision

addPlane(const PlaneF & plane)

Add an infinite plane to the collision shape.

This shape is assumed to be static in some physics providers and will at times be faked with a large box.

Reimplemented by: BtCollision, Px3Collision

addSphere(F32 radius, const MatrixF & localXfm)

Add a sphere to the collision shape.

Reimplemented by: BtCollision, Px3Collision

addTriangleMesh(const Point3F * vert, U32 vertCount, const U32 * index, U32 triCount, const MatrixF & localXfm)

Add a triangle mesh to the collision shape.

Reimplemented by: BtCollision, Px3Collision