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::Box Class Reference

#include <Box.h>

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

Public Member Functions

 Box (float xPos, float yPos, float width, float height, float rotation, float mass)
 
 Box (float xPos, float yPos, float width, float height, float rotation, float mass, float friction)
 
 ~Box ()
 
void Initialize (float xPos, float yPos, float width, float height, float rotation, float mass, float friction=0.2f)
 
Vector2f GetDimensions ()
 
- Public Member Functions inherited from PK::Shape
void SetForce (Vector2f force)
 
ShapeType GetType ()
 

Public Attributes

float Width
 
float Height
 
- Public Attributes inherited from PK::Shape
Vector2f Position
 
float Rotation
 
float Friction
 
float Mass
 
float InvMass
 
float InertiaTensor
 
float InvInertiaTensor
 
Vector2f Velocity
 
float AngularVelocity
 
Vector2f Force
 

Friends

class World
 

Additional Inherited Members

- Protected Member Functions inherited from PK::Shape
 Shape ()
 
 Shape (float xPos, float yPos, float rotation, float friction, float mas, float intertiaTensor)
 
void ZeroForce ()
 
- Protected Attributes inherited from PK::Shape
ShapeType Type
 

Constructor & Destructor Documentation

Box::Box ( float  xPos,
float  yPos,
float  width,
float  height,
float  rotation,
float  mass 
)

Create an instance of a Box object

Position of the box in the X axis Position of the box in the Y axis Width of the box Height of the box Rotation of the box in radians Mass of the box

Box::Box ( float  xPos,
float  yPos,
float  width,
float  height,
float  rotation,
float  mass,
float  friction 
)

Create an instance of a Box object

Position of the box in the X axis Position of the box in the Y axis Width of the box Height of the box Rotation of the box in radians Mass of the box Coefficient of friction for the box

Box::~Box ( )

Destroy this instance of a Box object

Member Function Documentation

Vector2f Box::GetDimensions ( )

Get the width and height of the Box as a Vector2f

void Box::Initialize ( float  xPos,
float  yPos,
float  width,
float  height,
float  rotation,
float  mass,
float  friction = 0.2f 
)

Reinitialize instance of a Box object

Position of the box in the X axis Position of the box in the Y axis Width of the box Height of the box Rotation of the box in radians Mass of the box

Friends And Related Function Documentation

friend class World
friend

Member Data Documentation

float PK::Box::Height

Height of the box

float PK::Box::Width

Width of the box


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