class neGeometry

General Collision Model Breakage
SetTransform
GetTransform
SetMaterialIndex
GetMaterialIndex

SetUserData
GetUserData
SetBoxSize
GetBoxSize

SetSphereDiameter
GetSphereDiameter

SetCylinder
GetCylinder
SetBreakageFlag
GetBreakageFlag

SetBreakageMass
GetBreakageMass
SetBreakageInertiaTensor
GetBreakageInertiaTensor

SetBreakageMagnitude
GetBreakageMagnitude

SetBreakageAbsorption
GetBreakageAbsorption

SetBreakageNeighbourRadius
GetBreakageNeighbourRadius

void SetTransform(neT3 & t);
neT3 GetTransform();

Set and retrieve the transform of the geometry. The transform defines the geometry's position and orientation relative to its host body object. The transform is defined in the host body's space.

<back to top>


void SetMaterialIndex(s32 index);
s32
GetMaterialIndex();

Set and retrieve the material index for the geometry. The material index refers to a material defined in the neSimulator using the function neSimulator::SetMaterial. During a collision, the materials of the two colliding geometries are used to calculate the correct collision response.

<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 geometry.

<back to top>


void SetBoxSize(f32 width, f32 height, f32 depth);
void
SetBoxSize(const neV3 & boxSize);
neBool
GetBoxSize(neV3 & boxSize);

Set the geometry to a box and set its dimension.

GetBoxSize retrieves the dimension if the geometry is box. Otherwise it returns false.

<back to top>


void SetSphereDiameter(f32 diameter);
neBool
GetSphereDiameter(f32 & diameter);

Specify and retrieve the diameter of a sphere primitive.

GetSphereDiameter returns false if the geometry is not a sphere.

<back to top>


void SetCylinder(f32 diameter, f32 height);
neBool
GetCylinder(f32 & diameter, f32 & height);

Specify and retrieve the dimension of a cylinder primitive.

GetCylinder returns false if the geometry is not a cylinder.

<back to top>


void SetBreakageFlag(neBreakFlag flag);
neBreakFlag
GetBreakageFlag();

typedef enum
{
  
NE_BREAK_DISABLE,
  
NE_BREAK_NORMAL,
  
NE_BREAK_ALL,
  
NE_BREAK_NEIGHBOUR,

   NE_BREAK_NORMAL_PARTICLE,
    NE_BREAK_ALL_PARTICLE
,
  
NE_BREAK_NEIGHBOUR_PARTICLE,
} neBreakFlag;

Specify and retrieve the breaking behaviour of the geometry.

NE_BREAK_DISABLE 

    The geometry does not break off upon collision

NE_BREAK_NORMAL 

    Normal breakage mode. Only this geometry will break when a suitably large collision has occurred.

NE_BREAK_ALL 

    When this geometry breaks off, all geometries within the current object, with break the flag not equal to NE_BREAK_DISABLE, will also break off.

NE_BREAK_NEIGHBOUR

    When this geometry breaks off, its neighbours within a certain radius will also break off. This radius is specified by SetBreakageNeighbourRadius.

The XXX_PARTICLE flags are the same as the above, except that they specify the new object spawned from the geometry will be a rigid particle, rather than a rigid body.

<back to top>


void SetBreakageMass();
f32
GetBreakageMass();
void
SetBreakageInertiaTensor(const neV3 & tensor);
neV3
GetBreakageInertiaTensor();

Specify and retrieve the mass and inertia mass tensor of the object spawned from the breakage.

<back to top>


void SetBreakageMagnitude(f32 mag);
f32
GetBreakageMagnitude();

Specify and retrieve the magnitude of the collision impulse required to break this geometry.

<back to top>


void SetBreakageAbsorption(f32 absorb);
f32
GetBreakageAbsorption();

Specify and retrieve the amount of absorption the breaking of this geometry has. 

<back to top>


void SetBreakageNeighbourRadius(f32 radius);
f32
GetBreakageNeighbourRadius();

Specify and retrieve the radius within which other geometries within the same body will also break when a breakage occurs.

<back to top>