# class neAnimatedBody

Properties | Spatial Properties | Others Functions
SetCollisionID GetCollisionID SetUserData GetUserData | GetPos SetPos GetRotationM3 GetRotationQ SetRotation SetRotation GetTransform | GetGeometryCount AddGeometry RemoveGeometry BeginIterateGeometry GetNextGeometry BreakGeometry AddSensor RemoveSensor BeginIterateSensor GetNextSensor UpdateBoundingInfo CollideConnected CollideConnected Active Active Active

void SetCollisionID(s32 cid);
s32 GetCollisionID();

Set and retrieve the collision ID of the animated body. The collision ID, along with the neCollisionTable, determines how the animated body will respond when a collision has occured with other objects in the simulation. See also neCollisionTable.

<back to top>

void SetUserData(u32 userData);
u32 GetUserData();

Set and retrieve the user data property. This is a u32 value, used to store game-specific information associated with the animated body.

<back to top>

neV3 GetPos();
void SetPos(const neV3 & p);
neM3 GetRotationM3();
neQ GetRotationQ();
void SetRotation(const neM3 & m);
void SetRotation(const neQ & q);
neT3 GetTransform();

Set and retrieve spatial states for the animated body with these functions.

<back to top>

s32 GetGeometryCount();
neGeometry * AddGeometry();
neBool RemoveGeometry(neGeometry * g);
void BeginIterateGeometry();
neGeometry * GetNextGeometry();

Use these functions to create and retrieve neGeometry objects for the animated body. The collection neGeometry, belonging to an animated body, defines the body's collision boundary. It also defines the animated body's breaking behaviour. An animated body can also exist without any neGeomtry assigned to it; it just wont collide with anything in the simulation. All neGeometry objects within an animated body will be freed automatcally when the animated body is freed. See also neGeometry.

<back to top>

neRigidBody * BreakGeometry(neGeometry * g);

Breaks off the geometry object, which must belong to the rigid body. Returns the newly created rigid body.

<back to top>

neSensor * AddSensor();
neBool RemoveSensor(neSensor * s);
void BeginIterateSensor();
neSensor * GetNextSensor();

Use these functions to create and retrieve neSensor objects for the animated body. See neSensor.

<back to top>

void UpdateBoundingInfo();

Update the internal bounding information of the animated body. Whenever the user changes geometry and/or sensors of the animated body, by adding, removing, or modifying geometry and/or sensors, this function needs to be called to update the internal bounding information.

<back to top>

void CollideConnected(neBool yes);
neBool CollideConnected();

Define whether or not an animated body will collide with another body connected to it via joints (neJoint). The behaviour defined by this function overrides the behaviour defined by the neCollisionTable.

<back to top>

void Active(neBool yes, neRigidBody * hint = NULL);
void Active(neBool yes, neAnimatedBody * hint = NULL);
neBool Active();

Activate or deactivate the animated body. When an animated body is deactivated, the simulator will not perform a collision test on the animated body.

When activating (yes == true), an optional hint can be supplied. The hint should be a rigid body or an animated body near where the animated body being activated is. This can help speed up the introduction of the new activated animated body into the simulation.

<back to top>