This is the function I have to call:
Code: Select all
NewtonCollision* NewtonCreateBox(
const NewtonWorld* newtonWorld,
dFloat dx,
dFloat dy,
dFloat dz,
const dFloat *offsetMatrix)
Create a box primitive for collision.
Parameters
const NewtonWorld *newtonWorld - is the pointer to the Newton world.
dFloat dx - box side one x dimension.
dFloat dy - box side one y dimension.
dFloat dz - box side one z dimension.
const dFloat *offsetMatrix - pointer to an array of 16 floats containing the offset matrix of the box relative to the body. If this parameter is NULL, then the primitive is centered at the origin of the body.
Return
Pointer to the box
Remarks
Collision primitives are reference counted objects. The application should call NewtonReleaseCollision in order to release references to the object. Neglecting to release references to collision primitives is a common cause of memory leaks. Collision primitives can be reused with more than one body. This will reduce the amount of memory used be the engine, as well as speed up some calculations.
Thanks.