Physics4K  2013-06-04
Physics4K is the next great evolution in 2D physics engines. built upon the C++ Game Framework, it is going to take the next generation gaming world by storm.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
PK::Shape Class Reference

#include <Shape.h>

Inheritance diagram for PK::Shape:
PK::Box PK::Circle

Public Member Functions

void SetForce (Vector2f force)
 
ShapeType GetType ()
 

Public Attributes

Vector2f Position
 
float Rotation
 
float Friction
 
float Mass
 
float InvMass
 
float InertiaTensor
 
float InvInertiaTensor
 
Vector2f Velocity
 
float AngularVelocity
 
Vector2f Force
 

Protected Member Functions

 Shape ()
 
 Shape (float xPos, float yPos, float rotation, float friction, float mas, float intertiaTensor)
 
void ZeroForce ()
 

Protected Attributes

ShapeType Type
 

Friends

class World
 

Constructor & Destructor Documentation

Shape::Shape ( )
protected

Create an instance of a Shape object

Shape::Shape ( float  xPos,
float  yPos,
float  rotation,
float  friction,
float  mass,
float  inertiaTensor 
)
protected

Create an instance of a Shape object

Member Function Documentation

ShapeType Shape::GetType ( )

Gets the currennt Type of shape this is

void Shape::SetForce ( Vector2f  force)

Set a static external force to be applied to the shape next update

Force to be applied

void Shape::ZeroForce ( )
protected

Reset the external force to zero

Friends And Related Function Documentation

friend class World
friend

Member Data Documentation

float PK::Shape::AngularVelocity

Current angular velocity of the shape

Vector2f PK::Shape::Force

External force to be applied to the system

float PK::Shape::Friction

Coefficient of friction for the object

float PK::Shape::InertiaTensor
float PK::Shape::InvInertiaTensor

1 / the Inertia Tensor (used for calculations)

float PK::Shape::InvMass

1 / Mass of the shape (used for calculations)

float PK::Shape::Mass

Mass of the shape

Vector2f PK::Shape::Position

Position of the shape

float PK::Shape::Rotation

Rotation of the shape in radians

ShapeType PK::Shape::Type
protected

Type of shape this shape is

Vector2f PK::Shape::Velocity

Current velocity of the shape


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