MercuryObject Class Reference

[actor] Base Object (abstract) More...

#include <MercuryObject.h>

Inheritance diagram for MercuryObject:

Inheritance graph
[legend]
Collaboration diagram for MercuryObject:

Collaboration graph
[legend]
List of all members.

Public Types

enum  HALIGN { LEFT = 0, CENTER, RIGHT }
enum  VALIGN { TOP = 0, VCENTER, BOTTOM }

Public Member Functions

 MercuryObject ()
 MercuryObject (const MString &name)
virtual ~MercuryObject ()
virtual void Init ()
void CalculateRealColor ()
void SetName (const MString &name)
virtual void SortDrawOrder ()
virtual void AddObject (MercuryObject *object, bool bParentDelete=false)
virtual bool RemoveObject (MercuryObject *object, bool bAllowDelete=true)
virtual bool ReplaceObject (MercuryObject *object, MercuryObject *newobject)
void Destroy ()
void SetMaterial (MercuryMaterial *material)
void SetDiffuse (const MercuryColor &c)
void SetDiffusef (float r, float g, float b, float a)
void SetEmissive (const MercuryColor &c)
void SetEmissivef (float r, float g, float b, float a)
void SetSpecular (const MercuryColor &c)
void SetSpecularf (float r, float g, float b, float a)
void SetAmbient (const MercuryColor &c)
void SetAmbientf (float r, float g, float b, float a)
const MStringGetName () const
const MercuryMaterialGetMaterial () const
const MercuryMaterialGetFinalMaterial () const
const MercuryColorGetDiffuse ()
const MercuryColorGetEmissive ()
const MercuryColorGetSpecular ()
const MercuryColorGetAmbient ()
void GetDiffusef (float &r, float &g, float &b, float &a)
virtual MercuryObjectSpawn (const MString &sClass, const MString &sName, PROJECTIONTYPE projection=PERSPECTIVE)
unsigned int GetNumChildren () const
virtual void SetHAlignment (HALIGN alignment)
HALIGN GetHAlignment () const
virtual void SetVAlignment (VALIGN alignment)
VALIGN GetVAlignment () const
virtual void Prerender ()
 Add another object to this object's children.
virtual void Render ()
virtual void CustomRender ()
void ComputeCull ()
bool IsCulled () const
virtual void Update (const float dTime)
 [internal] Update (call this update last when abstracting because Update can destroy the object)
virtual void SetDrawOrder (int order)
 Set this object's projection type (and all of its children).
virtual void Draw ()
 [internal] Draw (CALL FIRST when using abstracted draw commands)
 CLASS_RTTI (MercuryObject, MercuryMessageHandler)
virtual void Clonize ()
bool IsInitalized () const
float GetScaledRadius () const
State GetState () const
MercuryGLStateGetGLState ()
void ComputeInheritedGLState ()
MercuryGLState GetInheritedGLState ()

Public Attributes

MercuryTweenState Tweening
 Complete tweening state.
MDeque< ParentHoldPairm_objects

Protected Attributes

bool m_bClone
bool m_bMarkedForDestroy
unsigned int m_polys
MString m_name
int m_width
int m_height
bool m_drawable
bool m_culled
MercuryMaterial m_finalMaterial
MercuryMaterialm_pMaterial
State m_state
MercuryGLState m_glState
bool m_initalized

Private Attributes

MercuryMaterial m_modColor
MercuryMaterial m_realColor
HALIGN m_halignment
VALIGN m_valignment
MercuryGLState m_inheretedGLState

Classes

struct  ParentHoldPair
 [internal] Data structure to hold information about objects More...

Detailed Description

[actor] Base Object (abstract)

Definition at line 28 of file MercuryObject.h.


Member Enumeration Documentation

enum MercuryObject::HALIGN

Enumerator:
LEFT 
CENTER 
RIGHT 

Definition at line 42 of file MercuryObject.h.

enum MercuryObject::VALIGN

Enumerator:
TOP 
VCENTER 
BOTTOM 

Definition at line 48 of file MercuryObject.h.


Constructor & Destructor Documentation

MercuryObject::MercuryObject (  ) 

Definition at line 8 of file MercuryObject.cpp.

MercuryObject::MercuryObject ( const MString name  ) 

Definition at line 15 of file MercuryObject.cpp.

MercuryObject::~MercuryObject (  )  [virtual]

Definition at line 51 of file MercuryObject.cpp.


Member Function Documentation

void MercuryObject::Init (  )  [virtual]

Reimplemented from MercuryObjectBase.

Reimplemented in BetaBetaMari, ExplodingCokeCan, MercuryDynTex, MercuryLight, MercuryMesh, MercuryODEWorld, MercuryParticleField, MercuryScreen, MercurySprite, MercurySwapObject, MercuryText, Projectile, VirtualProjectile, RaceCar, ScreenCopper, ScreenDebugOverlay, ScreenExample2DSS, ScreenFPS, ScreenFPS2, ScreenGameForBlind, ScreenHelloWorld, ScreenJunq, TextList, ObjectControlPane, MercuryTextPrompt, ScreenMapEditor, ScreenNetTester, ScreenODETest, ScreenOutdoors, ScreenRallyRace, ScreenSound, ScreenTest, and ScreenHgTitle.

Definition at line 23 of file MercuryObject.cpp.

void MercuryObject::CalculateRealColor (  ) 

void MercuryObject::SetName ( const MString name  ) 

void MercuryObject::SortDrawOrder (  )  [virtual]

Definition at line 217 of file MercuryObject.cpp.

void MercuryObject::AddObject ( MercuryObject object,
bool  bParentDelete = false 
) [virtual]

Definition at line 190 of file MercuryObject.cpp.

virtual bool MercuryObject::RemoveObject ( MercuryObject object,
bool  bAllowDelete = true 
) [virtual]

Reimplemented in MercuryODEWorld, and MercuryScreen.

virtual bool MercuryObject::ReplaceObject ( MercuryObject object,
MercuryObject newobject 
) [virtual]

void MercuryObject::Destroy (  )  [inline]

Definition at line 68 of file MercuryObject.h.

void MercuryObject::SetMaterial ( MercuryMaterial material  )  [inline]

Definition at line 69 of file MercuryObject.h.

void MercuryObject::SetDiffuse ( const MercuryColor c  )  [inline]

Definition at line 70 of file MercuryObject.h.

void MercuryObject::SetDiffusef ( float  r,
float  g,
float  b,
float  a 
) [inline]

Definition at line 71 of file MercuryObject.h.

void MercuryObject::SetEmissive ( const MercuryColor c  )  [inline]

Definition at line 72 of file MercuryObject.h.

void MercuryObject::SetEmissivef ( float  r,
float  g,
float  b,
float  a 
) [inline]

Definition at line 73 of file MercuryObject.h.

void MercuryObject::SetSpecular ( const MercuryColor c  )  [inline]

Definition at line 74 of file MercuryObject.h.

void MercuryObject::SetSpecularf ( float  r,
float  g,
float  b,
float  a 
) [inline]

Definition at line 75 of file MercuryObject.h.

void MercuryObject::SetAmbient ( const MercuryColor c  )  [inline]

Definition at line 76 of file MercuryObject.h.

void MercuryObject::SetAmbientf ( float  r,
float  g,
float  b,
float  a 
) [inline]

Definition at line 77 of file MercuryObject.h.

const MString& MercuryObject::GetName (  )  const [inline]

Definition at line 78 of file MercuryObject.h.

const MercuryMaterial* MercuryObject::GetMaterial (  )  const [inline]

Definition at line 79 of file MercuryObject.h.

const MercuryMaterial& MercuryObject::GetFinalMaterial (  )  const [inline]

Definition at line 80 of file MercuryObject.h.

const MercuryColor& MercuryObject::GetDiffuse (  )  [inline]

Definition at line 81 of file MercuryObject.h.

const MercuryColor& MercuryObject::GetEmissive (  )  [inline]

Definition at line 82 of file MercuryObject.h.

const MercuryColor& MercuryObject::GetSpecular (  )  [inline]

Definition at line 83 of file MercuryObject.h.

const MercuryColor& MercuryObject::GetAmbient (  )  [inline]

Definition at line 84 of file MercuryObject.h.

void MercuryObject::GetDiffusef ( float &  r,
float &  g,
float &  b,
float &  a 
)

virtual MercuryObject* MercuryObject::Spawn ( const MString sClass,
const MString sName,
PROJECTIONTYPE  projection = PERSPECTIVE 
) [virtual]

Reimplemented in MercuryScreen.

unsigned int MercuryObject::GetNumChildren (  )  const [inline]

Definition at line 87 of file MercuryObject.h.

virtual void MercuryObject::SetHAlignment ( HALIGN  alignment  )  [inline, virtual]

Definition at line 93 of file MercuryObject.h.

HALIGN MercuryObject::GetHAlignment (  )  const [inline]

Definition at line 94 of file MercuryObject.h.

virtual void MercuryObject::SetVAlignment ( VALIGN  alignment  )  [inline, virtual]

Definition at line 95 of file MercuryObject.h.

VALIGN MercuryObject::GetVAlignment (  )  const [inline]

Definition at line 96 of file MercuryObject.h.

void MercuryObject::Prerender (  )  [virtual]

Add another object to this object's children.

MercuryObject takes on an object and a ParentDelete. if bParentDelete == true, then the parent you are adding object to will delete object when the parent is deleted.

Reimplemented in MercuryCamera, MercuryDynTex, and MercuryTexture.

Definition at line 98 of file MercuryObject.cpp.

void MercuryObject::Render (  )  [virtual]

Reimplemented in MercuryCamera, MercuryLight, MercuryScreen, MercuryTexture, and ScreenMapEditor.

Definition at line 149 of file MercuryObject.cpp.

void MercuryObject::CustomRender (  )  [virtual]

Reimplemented in MercuryDynTex, MercuryParticleField, and MercuryText.

Definition at line 171 of file MercuryObject.cpp.

void MercuryObject::ComputeCull (  ) 

Definition at line 129 of file MercuryObject.cpp.

bool MercuryObject::IsCulled (  )  const [inline]

Definition at line 111 of file MercuryObject.h.

void MercuryObject::Update ( const float  dTime  )  [virtual]

[internal] Update (call this update last when abstracting because Update can destroy the object)

Reimplemented in BetaBetaMari, ExplodingCokeCan, MercuryDynTex, MercuryLoadableModel, MercuryODEObjectLoadable, MercuryODEWorld, MercuryParticleField, MercuryScreen, ODEFluid, Projectile, ScreenCopper, ScreenExample2DSS, ScreenFPS, ScreenFPS2, ScreenGameForBlind, ScreenHelloWorld, ScreenJunq, ObjectControlPane, MercuryTextPrompt, ScreenMapEditor, ScreenNetTester, ScreenODETest, MercurySkyBox, ScreenRallyRace, ScreenSound, ScreenTest, and ScreenHgTitle.

Definition at line 65 of file MercuryObject.cpp.

void MercuryObject::SetDrawOrder ( int  order  )  [virtual]

Set this object's projection type (and all of its children).

Reimplemented from MercuryObjectBase.

Definition at line 208 of file MercuryObject.cpp.

virtual void MercuryObject::Draw (  )  [inline, virtual]

[internal] Draw (CALL FIRST when using abstracted draw commands)

Reimplemented in MercuryLight, MercuryMesh, MercurySprite, MercuryTexture, ScreenCopper, ScreenExample2DSS, ScreenNetTester, ScreenODETest, and ScreenSound.

Definition at line 123 of file MercuryObject.h.

MercuryObject::CLASS_RTTI ( MercuryObject  ,
MercuryMessageHandler   
)

virtual void MercuryObject::Clonize (  )  [inline, virtual]

If you've copied an object but you know you are a clone, you can call this function to prevent a crash when you are destroyed.

Definition at line 128 of file MercuryObject.h.

bool MercuryObject::IsInitalized (  )  const [inline]

Definition at line 130 of file MercuryObject.h.

float MercuryObject::GetScaledRadius (  )  const [inline]

Definition at line 132 of file MercuryObject.h.

State MercuryObject::GetState (  )  const [inline]

Definition at line 133 of file MercuryObject.h.

MercuryGLState& MercuryObject::GetGLState (  )  [inline]

Definition at line 134 of file MercuryObject.h.

void MercuryObject::ComputeInheritedGLState (  ) 

Definition at line 142 of file MercuryObject.cpp.

MercuryGLState MercuryObject::GetInheritedGLState (  )  [inline]

Definition at line 137 of file MercuryObject.h.


Member Data Documentation

MercuryTweenState MercuryObject::Tweening

Complete tweening state.

Definition at line 119 of file MercuryObject.h.

MDeque<ParentHoldPair> MercuryObject::m_objects

Definition at line 120 of file MercuryObject.h.

bool MercuryObject::m_bClone [protected]

Definition at line 140 of file MercuryObject.h.

bool MercuryObject::m_bMarkedForDestroy [protected]

Definition at line 141 of file MercuryObject.h.

unsigned int MercuryObject::m_polys [protected]

Definition at line 142 of file MercuryObject.h.

MString MercuryObject::m_name [protected]

Definition at line 143 of file MercuryObject.h.

int MercuryObject::m_width [protected]

Definition at line 145 of file MercuryObject.h.

int MercuryObject::m_height [protected]

Definition at line 145 of file MercuryObject.h.

bool MercuryObject::m_drawable [protected]

Definition at line 147 of file MercuryObject.h.

bool MercuryObject::m_culled [protected]

Definition at line 148 of file MercuryObject.h.

MercuryMaterial MercuryObject::m_finalMaterial [protected]

Definition at line 150 of file MercuryObject.h.

MercuryMaterial* MercuryObject::m_pMaterial [protected]

Definition at line 151 of file MercuryObject.h.

State MercuryObject::m_state [protected]

Definition at line 156 of file MercuryObject.h.

MercuryGLState MercuryObject::m_glState [protected]

Definition at line 157 of file MercuryObject.h.

bool MercuryObject::m_initalized [protected]

Definition at line 158 of file MercuryObject.h.

MercuryMaterial MercuryObject::m_modColor [private]

Definition at line 161 of file MercuryObject.h.

MercuryMaterial MercuryObject::m_realColor [private]

Definition at line 162 of file MercuryObject.h.

HALIGN MercuryObject::m_halignment [private]

Definition at line 165 of file MercuryObject.h.

VALIGN MercuryObject::m_valignment [private]

Definition at line 166 of file MercuryObject.h.

MercuryGLState MercuryObject::m_inheretedGLState [private]

Definition at line 168 of file MercuryObject.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo