Quad Pang
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes
Quad Class Reference

Quad is abstraction of 3D graphical object. More...

#include <Quad.h>

Inheritance diagram for Quad:
Quad_impl Quad_impl Arrow Arrow Ball Ball Bongo Bongo Box Box Hitti Hitti Arrow Arrow Ball Ball Bongo Bongo Box Box Hitti Hitti

List of all members.

Public Member Functions

virtual bool Init (XRes *resource, XCongo *xcongo)=0
 Read Quad from resource file.
virtual bool Display ()=0
 Draw itself in global cotext. Since quads are intented to be used with opengl, drawing context is global.
virtual bool Move (const double new_pos[3])=0
 Move quad posotion to new_pos.
virtual bool Forse (const double forse[3])=0
 Chage Quad's direction of moving with forse.
virtual void RegisterListener (QuadListener *listener)=0
 Assign listener to this quad.
virtual bool SetActive (bool activity)=0
 Set query Quad activity state.
virtual bool IsActive () const =0
virtual const char * ClassName () const =0
 Used for RTTI.
virtual double Mass () const =0
 Weight of object.
virtual const double * Direction () const =0
 Direction of moving.
virtual const double * Color () const =0
 Color of object.
virtual ~Quad ()
virtual bool Init (XRes *resource, XCongo *xcongo)=0
 Read Quad from resource file.
virtual bool Display ()=0
 Draw itself in global cotext. Since quads are intented to be used with opengl, drawing context is global.
virtual bool Move (const double new_pos[3])=0
 Move quad posotion to new_pos.
virtual bool Forse (const double forse[3])=0
 Chage Quad's direction of moving with forse.
virtual void RegisterListener (QuadListener *listener)=0
 Assign listener to this quad.
virtual bool SetActive (bool activity)=0
 Set query Quad activity state.
virtual bool IsActive () const =0
virtual const char * ClassName () const =0
 Used for RTTI.
virtual double Mass () const =0
 Weight of object.
virtual const double * Direction () const =0
 Direction of moving.
virtual const double * Color () const =0
 Color of object.
virtual ~Quad ()

Static Public Attributes

static const double MASS_INFINITE = -1
 TODO: Comment MASS_INFINITE.

Detailed Description

Quad is abstraction of 3D graphical object.

It is an interface enforcing several pattern behaviors: Init() from resource, EventListener, RTTI and ofcourse Display.

See also:
Arrow, Ball, Bongo, Box, Hitti.

Definition at line 30 of file Quad.h.


Constructor & Destructor Documentation

virtual Quad::~Quad ( ) [inline, virtual]

Definition at line 126 of file Quad.h.

{}
virtual Quad::~Quad ( ) [inline, virtual]

Definition at line 126 of file Quad.h.

{}

Member Function Documentation

virtual const char* Quad::ClassName ( ) const [pure virtual]

Used for RTTI.

Returns:
Name of the actual class.
See also:
Factory

Implemented in Quad_impl, Quad_impl, Hitti, Hitti, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

Referenced by CollisionMaster::Collision(), Engine::LoadLevel(), and CollisionMaster::UpdateCollisions().

virtual const char* Quad::ClassName ( ) const [pure virtual]

Used for RTTI.

Returns:
Name of the actual class.
See also:
Factory

Implemented in Quad_impl, Quad_impl, Hitti, Hitti, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

virtual const double* Quad::Color ( ) const [pure virtual]

Color of object.

Returns:
4 double elements (red, green, blue, alpha)

Implemented in Quad_impl, and Quad_impl.

virtual const double* Quad::Color ( ) const [pure virtual]

Color of object.

Returns:
4 double elements (red, green, blue, alpha)

Implemented in Quad_impl, and Quad_impl.

virtual const double* Quad::Direction ( ) const [pure virtual]

Direction of moving.

Implemented in Quad_impl, and Quad_impl.

virtual const double* Quad::Direction ( ) const [pure virtual]

Direction of moving.

Implemented in Quad_impl, and Quad_impl.

Referenced by CollisionMaster::UpdateCollisions().

virtual bool Quad::Display ( ) [pure virtual]

Draw itself in global cotext. Since quads are intented to be used with opengl, drawing context is global.

Returns:
true if ok, false on error.

Implemented in Quad_impl, Quad_impl, Hitti, Hitti, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

virtual bool Quad::Display ( ) [pure virtual]

Draw itself in global cotext. Since quads are intented to be used with opengl, drawing context is global.

Returns:
true if ok, false on error.

Implemented in Quad_impl, Quad_impl, Hitti, Hitti, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

virtual bool Quad::Forse ( const double  forse[3]) [pure virtual]

Chage Quad's direction of moving with forse.

If mass is MASS_INFINITE then forse will not move the objet

Returns:
true if object changed it's direction, false if not.

Implemented in Quad_impl, Quad_impl, Hitti, and Hitti.

Referenced by CollisionMaster::UpdateCollisions().

virtual bool Quad::Forse ( const double  forse[3]) [pure virtual]

Chage Quad's direction of moving with forse.

If mass is MASS_INFINITE then forse will not move the objet

Returns:
true if object changed it's direction, false if not.

Implemented in Quad_impl, Quad_impl, Hitti, and Hitti.

virtual bool Quad::Init ( XRes resource,
XCongo xcongo 
) [pure virtual]

Read Quad from resource file.

Parameters:
resourceResource file contained description of Quad object.
xcongoGlobal settings file contained parameters not specific to this quad.
Returns:
true if ok, false on error.

Implemented in Quad_impl, Quad_impl, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

Referenced by Factory::CreateQuad().

virtual bool Quad::Init ( XRes resource,
XCongo xcongo 
) [pure virtual]

Read Quad from resource file.

Parameters:
resourceResource file contained description of Quad object.
xcongoGlobal settings file contained parameters not specific to this quad.
Returns:
true if ok, false on error.

Implemented in Quad_impl, Quad_impl, Arrow, Arrow, Box, Box, Ball, Ball, Bongo, and Bongo.

virtual bool Quad::IsActive ( ) const [pure virtual]

Implemented in Quad_impl, and Quad_impl.

virtual bool Quad::IsActive ( ) const [pure virtual]
virtual double Quad::Mass ( ) const [pure virtual]

Weight of object.

Implemented in Quad_impl, and Quad_impl.

virtual double Quad::Mass ( ) const [pure virtual]

Weight of object.

Implemented in Quad_impl, and Quad_impl.

virtual bool Quad::Move ( const double  new_pos[3]) [pure virtual]

Move quad posotion to new_pos.

Returns:
true if object is moved, false if not.

Implemented in Quad_impl, Quad_impl, Hitti, and Hitti.

Referenced by CollisionMaster::UpdateCollisions().

virtual bool Quad::Move ( const double  new_pos[3]) [pure virtual]

Move quad posotion to new_pos.

Returns:
true if object is moved, false if not.

Implemented in Quad_impl, Quad_impl, Hitti, and Hitti.

virtual void Quad::RegisterListener ( QuadListener listener) [pure virtual]

Assign listener to this quad.

When something happend to quad (Quad moves). It will notify listening object.

Implemented in Quad_impl, and Quad_impl.

virtual void Quad::RegisterListener ( QuadListener listener) [pure virtual]

Assign listener to this quad.

When something happend to quad (Quad moves). It will notify listening object.

Implemented in Quad_impl, and Quad_impl.

virtual bool Quad::SetActive ( bool  activity) [pure virtual]

Set query Quad activity state.

If Quad is not active, then other object should't change it's state.

Returns:
Activity state before this change.

Implemented in Quad_impl, and Quad_impl.

Referenced by CollisionMaster::AddToDeleteList().

virtual bool Quad::SetActive ( bool  activity) [pure virtual]

Set query Quad activity state.

If Quad is not active, then other object should't change it's state.

Returns:
Activity state before this change.

Implemented in Quad_impl, and Quad_impl.


Member Data Documentation

static const double Quad::MASS_INFINITE = -1 [static]

TODO: Comment MASS_INFINITE.

Definition at line 34 of file Quad.h.


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