Neo  0.5.0
Developer Documentation
Neo::PhysicsProperties Class Reference

The PhysicsProperties class contains all physical properties an object can possibly possess. More...

#include <OEntity.h>

Public Member Functions

 PhysicsProperties (void)
 
 PhysicsProperties (const PhysicsProperties &physicsProperties)
 
 ~PhysicsProperties (void)
 
void deleteConstraint (void)
 Deletes the physics constraint from memory. More...
 
PhysicsConstraintcreateConstraint (void)
 
PhysicsConstraintgetConstraint (void)
 Retrieves a pointer to the physics constraint object. More...
 
void setShapeId (unsigned int shapeId)
 Changes the physics shape ID that is given out by the physics context. More...
 
unsigned int getShapeId (void)
 Retrieves the current physics ID. More...
 
void setCollisionObjectId (unsigned int collisionObjectId)
 Changes the collision object ID used by the physics context. More...
 
unsigned int getCollisionObjectId (void)
 Retrieves the current collision object ID that is used by the physics context. More...
 
void setCollisionShape (COLLISION_SHAPE_TYPE collisionShape)
 Changes the collision shape used for collision detection. More...
 
COLLISION_SHAPE_TYPE getCollisionShape (void)
 Retrieves the current collision shape that is used for collision detection. More...
 
void setGhost (bool ghost)
 Sets the ghost property to the given value. More...
 
bool isGhost (void)
 Checks if the given object is a physical "ghost". More...
 
void setMass (float mass)
 Changes the mass. More...
 
float getMass (void)
 Retrieves the mass of the object. More...
 
void setFriction (float friction)
 Changes the friction coefficient used for calculations. More...
 
float getFriction (void)
 Retrieves the current friction value. More...
 
void setRestitution (float restitution)
 Changes the restitution coefficient used for calculations. More...
 
float getRestitution (void)
 Retrieves the current restitution value. More...
 
void setLinearDamping (float linearDamping)
 Changes the linear damping coefficient used for calculations. More...
 
float getLinearDamping (void)
 Retrieves the current linear damping value. More...
 
void setAngularDamping (float angularDamping)
 Changes the angular damping coefficient used for calculations. More...
 
float getAngularDamping (void)
 Retrieves the current angular damping value. More...
 
void setAngularFactor (float angularFactor)
 Changes the angular factor coefficient used for calculations. More...
 
float getAngularFactor (void)
 Retrieves the current angular factor value. More...
 
void setLinearFactor (const Vector3 &linearFactor)
 Changes the linear factor coefficient used for calculations. More...
 
Vector3getLinearFactor (void)
 Retrieves the current linear factor value. More...
 

Detailed Description

The PhysicsProperties class contains all physical properties an object can possibly possess.

Constructor & Destructor Documentation

Neo::PhysicsProperties::PhysicsProperties ( void  )
Neo::PhysicsProperties::PhysicsProperties ( const PhysicsProperties physicsProperties)
Neo::PhysicsProperties::~PhysicsProperties ( void  )

Member Function Documentation

PhysicsConstraint* Neo::PhysicsProperties::createConstraint ( void  )
void Neo::PhysicsProperties::deleteConstraint ( void  )

Deletes the physics constraint from memory.

float Neo::PhysicsProperties::getAngularDamping ( void  )
inline

Retrieves the current angular damping value.

Returns
The current value.
float Neo::PhysicsProperties::getAngularFactor ( void  )
inline

Retrieves the current angular factor value.

Returns
The current value.
unsigned int Neo::PhysicsProperties::getCollisionObjectId ( void  )
inline

Retrieves the current collision object ID that is used by the physics context.

Returns
the collision object ID.
COLLISION_SHAPE_TYPE Neo::PhysicsProperties::getCollisionShape ( void  )
inline

Retrieves the current collision shape that is used for collision detection.

Returns
the collision shape.
PhysicsConstraint* Neo::PhysicsProperties::getConstraint ( void  )
inline

Retrieves a pointer to the physics constraint object.

Returns
The PhysicsConstraint object.
float Neo::PhysicsProperties::getFriction ( void  )
inline

Retrieves the current friction value.

Returns
The current value.
float Neo::PhysicsProperties::getLinearDamping ( void  )
inline

Retrieves the current linear damping value.

Returns
The current value.
Vector3* Neo::PhysicsProperties::getLinearFactor ( void  )
inline

Retrieves the current linear factor value.

Returns
The current value.
float Neo::PhysicsProperties::getMass ( void  )
inline

Retrieves the mass of the object.

Returns
The mass.
See also
setMass
float Neo::PhysicsProperties::getRestitution ( void  )
inline

Retrieves the current restitution value.

Returns
The current value.
unsigned int Neo::PhysicsProperties::getShapeId ( void  )
inline

Retrieves the current physics ID.

Returns
The shape ID.
bool Neo::PhysicsProperties::isGhost ( void  )
inline

Checks if the given object is a physical "ghost".

A ghost is an object that has physical properties in a scene but does not actively react to collisions. This property is useful for implementing triggers and items that detect collision but do not react with the player.

Returns
A boolean value.
void Neo::PhysicsProperties::setAngularDamping ( float  angularDamping)
inline

Changes the angular damping coefficient used for calculations.

Parameters
restitutionThe new value.
void Neo::PhysicsProperties::setAngularFactor ( float  angularFactor)
inline

Changes the angular factor coefficient used for calculations.

Parameters
restitutionThe new value.
void Neo::PhysicsProperties::setCollisionObjectId ( unsigned int  collisionObjectId)
inline

Changes the collision object ID used by the physics context.

Parameters
collisionObjectIdThe new collision object ID.
void Neo::PhysicsProperties::setCollisionShape ( COLLISION_SHAPE_TYPE  collisionShape)
inline

Changes the collision shape used for collision detection.

Parameters
collisionShapeThe new shape.
void Neo::PhysicsProperties::setFriction ( float  friction)
inline

Changes the friction coefficient used for calculations.

Parameters
frictionThe new value.
void Neo::PhysicsProperties::setGhost ( bool  ghost)
inline

Sets the ghost property to the given value.

Parameters
ghostThe new value.
See also
isGhost
void Neo::PhysicsProperties::setLinearDamping ( float  linearDamping)
inline

Changes the linear damping coefficient used for calculations.

Parameters
restitutionThe new value.
void Neo::PhysicsProperties::setLinearFactor ( const Vector3 linearFactor)
inline

Changes the linear factor coefficient used for calculations.

Parameters
restitutionThe new value.
void Neo::PhysicsProperties::setMass ( float  mass)
inline

Changes the mass.

The mass of an object is needed for it to react to physical collisions. If the mass is set to 0 the object will be static and will not react to any collision or force applied to it.

Parameters
massThe new mass.
void Neo::PhysicsProperties::setRestitution ( float  restitution)
inline

Changes the restitution coefficient used for calculations.

Parameters
restitutionThe new value.
void Neo::PhysicsProperties::setShapeId ( unsigned int  shapeId)
inline

Changes the physics shape ID that is given out by the physics context.

Parameters
shapeIDThe new shape ID.

The documentation for this class was generated from the following file: