Engine
Sphere Class Reference

A sphere. More...

#include <sphere.h>

Inheritance diagram for Sphere:
Model PhysicsEntity

Public Member Functions

 Sphere ()
 
 ~Sphere ()
 
 Sphere (GLfloat radius, Vector3Gf position, Vector3Gf velocity, GLfloat mass, Quaternion orientation, Vector3Gf angular_velocity, Material material)
 
void OnUpdateFromBuffers ()
 
- Public Member Functions inherited from Model
Eigen::Matrix< GLfloat, 4, 4 > GetModelMatrix ()
 
void SetModelMatrix (Eigen::Matrix< GLfloat, 4, 4 > model)
 
Mesh GetMesh ()
 
Material GetMaterial ()
 
Eigen::Matrix< GLfloat, 3, 3 > GetNormalMatrix ()
 
- Public Member Functions inherited from PhysicsEntity
GLint GetId () const
 
Vector3Gf GetPosition ()
 
void SetPosition (Vector3Gf x)
 
void SetNextPosition (Vector3Gf x)
 
Vector3Gf GetNextPosition ()
 
Vector3Gf GetVelocity ()
 
void SetVelocity (Vector3Gf v)
 
void SetNextVelocity (Vector3Gf v)
 
Vector3Gf GetNextVelocity ()
 
GLfloat GetMass ()
 
Quaternion GetOrientation ()
 
void SetOrientation (Quaternion q)
 
Quaternion GetNextOrientation ()
 
void SetNextOrientation (Quaternion q)
 
Vector3Gf GetAngularVelocity ()
 
void SetAngularVelocity (Vector3Gf w)
 
Vector3Gf GetNextAngularVelocity ()
 
void SetNextAngularVelocity (Vector3Gf w)
 
void UpdateFromBuffers ()
 

Additional Inherited Members

- Protected Member Functions inherited from Model
 Model ()
 
- Protected Member Functions inherited from PhysicsEntity
 PhysicsEntity ()
 
 PhysicsEntity (Vector3Gf position, Vector3Gf velocity, GLfloat mass, Quaternion orientation, Vector3Gf angular_velocity)
 
virtual ~PhysicsEntity ()
 
- Protected Attributes inherited from Model
Mesh m_mesh
 
Eigen::Matrix< GLfloat, 4, 4 > m_model_matrix
 
Material m_material
 
Eigen::Matrix< GLfloat, 3, 3 > m_normal_matrix
 
- Protected Attributes inherited from PhysicsEntity
GLuint m_id
 
Vector3Gf m_position
 
Vector3Gf m_next_position
 
Vector3Gf m_velocity
 
Vector3Gf m_next_velocity
 
GLfloat m_mass
 
Quaternion m_orientation
 
Quaternion m_next_orientation
 
Vector3Gf m_next_angular_velocity
 
Vector3Gf m_angular_velocity
 

Detailed Description

A sphere.

A Sphere is defined by a center and a radius. Sphere extends both Model and PhysicsEntity. As such is will be rendered to the screen and act under the influence of forces

Constructor & Destructor Documentation

Sphere::Sphere ( )

Constructs a Sphere of radius 1.0, mass 1.0, centered at the origin

Sphere::~Sphere ( )

Deconstructs a sphere

Sphere::Sphere ( GLfloat  radius,
Vector3Gf  position,
Vector3Gf  velocity,
GLfloat  mass,
Quaternion  orientation,
Vector3Gf  angular_velocity,
Material  material 
)

Constructs a sphere

Parameters
radiusradius of the Sphere
positionposition of the Sphere (ie its center)
velocityvelocity of the Sphere
massmass of the Sphere
orientationorientation of the Sphere
angular_velocityangular_velocity of the Sphere
materialmaterial properties for the sphere

Member Function Documentation

void Sphere::OnUpdateFromBuffers ( )
virtual

Loads the next position and velocity values from their respective buffers

Reimplemented from PhysicsEntity.


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