Difference between pages "NewtonWorldListenerGetBodyDestroyCallback" and "NewtonBodySetCollision"
(Difference between pages)
m (1 revision imported) |
m (1 revision imported) |
||
Line 1: | Line 1: | ||
− | == | + | == NewtonBodySetCollision == |
− | + | void NewtonBodySetCollision( const NewtonBody* bodyPtr, const NewtonCollision* collisionPtr) | |
== Usage == | == Usage == | ||
− | + | Assign a collision primitive to the body. | |
== Parameters == | == Parameters == | ||
− | * const | + | * const NewtonBody *bodyPtr - pointer to the body. |
− | * | + | * const collisionPtr *collisionPtr - pointer to the new collision geometry. |
== Return == | == Return == | ||
− | * | + | * Nothing. |
− | |||
− | |||
+ | == Remarks == | ||
+ | * This function replaces a collision geometry of a body with the new collision geometry. This function increments the reference count of the collision geometry and decrements the reference count of the old collision geometry. If the reference count of the old collision geometry reaches zero, the old collision geometry is destroyed. This function can be used to swap the collision geometry of bodies at runtime. | ||
== See also == | == See also == | ||
+ | [[NewtonCreateBody]] | ||
+ | [[NewtonBodyGetCollision]] | ||
− | + | [[Category:body manipulation functions]] [[Category:Newton Functions]] [[Category:Newton 3 Functions]] [[Category:Collision shape functions]] | |
− | |||
− | [[Category: |
Latest revision as of 08:02, 10 June 2019
NewtonBodySetCollision
void NewtonBodySetCollision( const NewtonBody* bodyPtr, const NewtonCollision* collisionPtr)
Usage
Assign a collision primitive to the body.
Parameters
- const NewtonBody *bodyPtr - pointer to the body.
- const collisionPtr *collisionPtr - pointer to the new collision geometry.
Return
- Nothing.
Remarks
- This function replaces a collision geometry of a body with the new collision geometry. This function increments the reference count of the collision geometry and decrements the reference count of the old collision geometry. If the reference count of the old collision geometry reaches zero, the old collision geometry is destroyed. This function can be used to swap the collision geometry of bodies at runtime.