MezzanineEngine March 18, 2012

Mezzanine::WorldObjectPhysicsSettings Class Reference

This is a base helper class for configuring physics settings of a world object. More...

#include <worldobjectphysicssettings.h>

Inheritance diagram for Mezzanine::WorldObjectPhysicsSettings:
Mezzanine::NonTriggerPhysicsSettings Mezzanine::ActorBasePhysicsSettings Mezzanine::ActorRigidPhysicsSettings Mezzanine::ActorSoftPhysicsSettings

List of all members.

Public Member Functions

 WorldObjectPhysicsSettings (WorldObject *WO, btCollisionObject *PhysicsObject)
 Standard Constructor.
virtual ~WorldObjectPhysicsSettings ()
 Class destructor.
virtual WorldObjectActivationState GetActivationState () const
 How activated or deactivated is the object.
virtual Whole GetCollisionGroup () const
 Gets the actors collision group.
virtual Whole GetCollisionMask () const
 Gets the actors collision mask.
virtual bool GetCollisionResponse () const
 Will this respond to 3d collisions.
virtual CollisionShapeGetCollisionShape () const
 Gets the collision shape currently in use by this actor.
virtual bool IsActive () const
 Checks if the object is active in the simulation.
virtual bool IsKinematic () const
 Is the actir kinematic.
virtual bool IsStatic () const
 Is the actor static.
virtual bool IsStaticOrKinematic () const
 Checks of the actor is static or kinematic.
virtual void ProtoDeSerialize (const xml::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it.
virtual void ProtoSerialize (xml::Node &CurrentRoot) const
 Convert this class to an xml::Node ready for serialization.
virtual void SetActivationState (const WorldObjectActivationState &State, bool Force=false)
 Sets the activation state of the actor.
virtual void SetCollisionGroupAndMask (const Whole &Group, const Whole &Mask)
 Set the collision group and mask for the actor to determine what it should collide with.
virtual void SetCollisionShape (CollisionShape *Shape)
 Sets the collision shape to be used.

Static Public Member Functions

static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized.

Protected Member Functions

void AssignShape (CollisionShape *Shape)
 Assigns a shape to the appropriate objects.

Protected Attributes

Whole CollisionGroup
 A number of World Objects will use this in conjuction with the physics system.
Whole CollisionMask
 Stores the kind of World Objects that can collide with each other.
WorldObjectParent
 The World Object this belongs to.
btCollisionObject * WorldObjectCO
 Physics Object of the World Object.
CollisionShapeWorldObjectShape
 The physics shape of the World Object.

Detailed Description

This is a base helper class for configuring physics settings of a world object.

This class contains functions for the configuring of physics specific settings of a world object. This class can only configure the world objects physics. For configuring world object graphics, see WorldObjectGraphicsSettings.

Definition at line 63 of file worldobjectphysicssettings.h.


Constructor & Destructor Documentation

Mezzanine::WorldObjectPhysicsSettings::WorldObjectPhysicsSettings ( WorldObject WO,
btCollisionObject *  PhysicsObject 
)

Standard Constructor.

Parameters:
WOThe World Object this settings class configures.
PhysicsObjectThe physics object belonging to the World Object this class configures.

Definition at line 63 of file worldobjectphysicssettings.cpp.


Member Function Documentation

WorldObjectActivationState Mezzanine::WorldObjectPhysicsSettings::GetActivationState ( ) const [virtual]

How activated or deactivated is the object.

Returns:
A Mezzanine::ActorActivationState that describes whether the actor is part of the calculated simulation or not.

Definition at line 146 of file worldobjectphysicssettings.cpp.

Whole Mezzanine::WorldObjectPhysicsSettings::GetCollisionGroup ( ) const [virtual]

Gets the actors collision group.

Returns:
Returns a Whole representing the collision group this actor is set to.

Definition at line 103 of file worldobjectphysicssettings.cpp.

Whole Mezzanine::WorldObjectPhysicsSettings::GetCollisionMask ( ) const [virtual]

Gets the actors collision mask.

Returns:
Returns a Whole representing what other collision groups this actor should collide with.

Definition at line 108 of file worldobjectphysicssettings.cpp.

bool Mezzanine::WorldObjectPhysicsSettings::GetCollisionResponse ( ) const [virtual]

Will this respond to 3d collisions.

Returns:
False is it does not respond to collisions, True if it will

Definition at line 128 of file worldobjectphysicssettings.cpp.

CollisionShape * Mezzanine::WorldObjectPhysicsSettings::GetCollisionShape ( ) const [virtual]

Gets the collision shape currently in use by this actor.

Returns:
Returns a pointer to the collision shape being used.

Definition at line 87 of file worldobjectphysicssettings.cpp.

bool Mezzanine::WorldObjectPhysicsSettings::IsActive ( ) const [virtual]

Checks if the object is active in the simulation.

Returns:
Returns true if the object is active, false if it's deactivated(at rest).

Definition at line 133 of file worldobjectphysicssettings.cpp.

bool Mezzanine::WorldObjectPhysicsSettings::IsKinematic ( ) const [virtual]

Is the actir kinematic.

Returns:
True if the actor is kinematic false if it is not.

Definition at line 113 of file worldobjectphysicssettings.cpp.

bool Mezzanine::WorldObjectPhysicsSettings::IsStatic ( ) const [virtual]

Is the actor static.

Returns:
True if the actor is Static false if it is not.

Definition at line 118 of file worldobjectphysicssettings.cpp.

bool Mezzanine::WorldObjectPhysicsSettings::IsStaticOrKinematic ( ) const [virtual]

Checks of the actor is static or kinematic.

Checks of the actor is static or kinematic, returns true if it is either.

Returns:
Returns true if the actor is static or kinematic.

Definition at line 123 of file worldobjectphysicssettings.cpp.

void Mezzanine::WorldObjectPhysicsSettings::ProtoDeSerialize ( const xml::Node OneNode) [virtual]

Take the data stored in an XML and overwrite this instance of this object with it.

Parameters:
OneNodeand xml::Node containing the data.

Reimplemented in Mezzanine::ActorBasePhysicsSettings, Mezzanine::ActorRigidPhysicsSettings, and Mezzanine::NonTriggerPhysicsSettings.

Definition at line 201 of file worldobjectphysicssettings.cpp.

void Mezzanine::WorldObjectPhysicsSettings::ProtoSerialize ( xml::Node CurrentRoot) const [virtual]

Convert this class to an xml::Node ready for serialization.

Parameters:
CurrentRootThe point in the XML hierarchy that all this quaternion should be appended to.

Reimplemented in Mezzanine::ActorBasePhysicsSettings, Mezzanine::ActorRigidPhysicsSettings, and Mezzanine::NonTriggerPhysicsSettings.

Definition at line 154 of file worldobjectphysicssettings.cpp.

String Mezzanine::WorldObjectPhysicsSettings::SerializableName ( ) [static]

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns:
A string containing "ActorBasePhysicsSettings"

Reimplemented in Mezzanine::ActorBasePhysicsSettings, Mezzanine::ActorRigidPhysicsSettings, and Mezzanine::NonTriggerPhysicsSettings.

Definition at line 231 of file worldobjectphysicssettings.cpp.

void Mezzanine::WorldObjectPhysicsSettings::SetActivationState ( const WorldObjectActivationState State,
bool  Force = false 
) [virtual]

Sets the activation state of the actor.

Parameters:
StateThe activation state to set for the actor. See the ActorActivationState enum for more info.
ForceWhether or not you want to force the state. Some states may not apply based on the condition of the actor if this is set to false.

Definition at line 140 of file worldobjectphysicssettings.cpp.

void Mezzanine::WorldObjectPhysicsSettings::SetCollisionGroupAndMask ( const Whole Group,
const Whole Mask 
) [virtual]

Set the collision group and mask for the actor to determine what it should collide with.

These values are automatically calculated for you with some sane default values. Only edit these if you know what you are doing.

Parameters:
GroupThe group to which this actor belongs.
MaskThe other groups to which this actor should collide with.

Definition at line 92 of file worldobjectphysicssettings.cpp.

void Mezzanine::WorldObjectPhysicsSettings::SetCollisionShape ( CollisionShape Shape) [virtual]

Sets the collision shape to be used.

Parameters:
ShapeThe shape to be applied.

Reimplemented in Mezzanine::ActorRigidPhysicsSettings, and Mezzanine::ActorSoftPhysicsSettings.

Definition at line 81 of file worldobjectphysicssettings.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines