Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Graphic Class Reference

#include <Graphic.h>

Inheritance diagram for Graphic:
Bolt Dust Grid Grid Particles QuantumFlash Selection Selector Solid Sprite Stars TerrainClouds Trail

List of all members.

Public Types

enum  TYPE {
  OTHER, SOLID, SPRITE, BOLT,
  QUAD
}
enum  RENDER_FLAGS {
  RENDER_SOLID = 0x0001, RENDER_ALPHA = 0x0002, RENDER_ADDITIVE = 0x0004, RENDER_FIRST_LIGHT = 0x1000,
  RENDER_ADD_LIGHT = 0x2000
}

Public Member Functions

 Graphic ()
virtual ~Graphic ()
int operator== (const Graphic &g) const
int operator< (const Graphic &g) const
int operator<= (const Graphic &g) const
virtual void Render (Video *video, DWORD flags)
virtual void Update ()
virtual void SetOrientation (const Matrix &o)
virtual int CollidesWith (Graphic &o)
int Identity () const
const char * Name () const
bool IsVisible () const
void SetVisible (bool v)
float Radius () const
Point Location () const
virtual void MoveTo (const Point &p)
virtual void TranslateBy (const Point &ref)
virtual float Depth () const
virtual void SetDepth (float d)
virtual int IsInfinite () const
virtual void SetInfinite (bool b)
virtual int IsForeground () const
virtual void SetForeground (bool f)
virtual int IsBackground () const
virtual void SetBackground (bool b)
virtual int Hidden () const
virtual int Life () const
virtual void Destroy ()
virtual void Hide ()
virtual void Show ()
virtual bool Luminous () const
virtual void SetLuminous (bool l)
virtual bool Translucent () const
virtual bool CastsShadow () const
virtual void SetShadow (bool s)
virtual bool IsSolid () const
virtual bool IsSprite () const
virtual bool IsBolt () const
virtual bool IsQuad () const
virtual void ProjectScreenRect (Projector *p)
const RectScreenRect () const
virtual SceneGetScene () const
virtual void SetScene (Scene *s)
virtual int CheckRayIntersection (Point pt, Point vpn, double len, Point &ipt, bool treat_translucent_polys_as_solid=true)
virtual bool CheckVisibility (Projector &projector)

Static Public Member Functions

static const char * TYPENAME ()
static int Nearer (Graphic *a, Graphic *b)
static int Farther (Graphic *a, Graphic *b)

Protected Attributes

int id
Point loc
float depth
float radius
int life
bool visible
bool infinite
bool foreground
bool background
bool hidden
bool trans
bool shadow
bool luminous
Rect screen_rect
Scenescene
char name [32]

Static Protected Attributes

static int id_key = 1

Detailed Description

Definition at line 35 of file Graphic.h.


Member Enumeration Documentation

Enumerator:
RENDER_SOLID 
RENDER_ALPHA 
RENDER_ADDITIVE 
RENDER_FIRST_LIGHT 
RENDER_ADD_LIGHT 

Definition at line 42 of file Graphic.h.

Enumerator:
OTHER 
SOLID 
SPRITE 
BOLT 
QUAD 

Definition at line 40 of file Graphic.h.


Constructor & Destructor Documentation

Graphic::Graphic ( )

Definition at line 26 of file Graphic.cpp.

Graphic::~Graphic ( )
virtual

Definition at line 42 of file Graphic.cpp.


Member Function Documentation

virtual bool Graphic::CastsShadow ( ) const
inlinevirtual

Definition at line 95 of file Graphic.h.

int Graphic::CheckRayIntersection ( Point  pt,
Point  vpn,
double  len,
Point ipt,
bool  treat_translucent_polys_as_solid = true 
)
virtual

Reimplemented in Solid, PlanetRep, TerrainPatch, TerrainApron, and TerrainHaze.

Definition at line 134 of file Graphic.cpp.

bool Graphic::CheckVisibility ( Projector projector)
virtual

Reimplemented in Particles, Selection, and Selector.

Definition at line 154 of file Graphic.cpp.

int Graphic::CollidesWith ( Graphic o)
virtual

Reimplemented in Solid, TerrainPatch, TerrainClouds, TerrainApron, and Grid.

Definition at line 120 of file Graphic.cpp.

virtual float Graphic::Depth ( ) const
inlinevirtual

Definition at line 75 of file Graphic.h.

void Graphic::Destroy ( )
virtual

Definition at line 109 of file Graphic.cpp.

int Graphic::Farther ( Graphic a,
Graphic b 
)
static

Definition at line 99 of file Graphic.cpp.

virtual Scene* Graphic::GetScene ( ) const
inlinevirtual

Definition at line 105 of file Graphic.h.

virtual int Graphic::Hidden ( ) const
inlinevirtual

Definition at line 87 of file Graphic.h.

virtual void Graphic::Hide ( )
inlinevirtual

Reimplemented in Dust.

Definition at line 90 of file Graphic.h.

int Graphic::Identity ( ) const
inline

Definition at line 65 of file Graphic.h.

virtual int Graphic::IsBackground ( ) const
inlinevirtual

Definition at line 84 of file Graphic.h.

virtual bool Graphic::IsBolt ( ) const
inlinevirtual

Reimplemented in Bolt.

Definition at line 100 of file Graphic.h.

virtual int Graphic::IsForeground ( ) const
inlinevirtual

Definition at line 82 of file Graphic.h.

virtual int Graphic::IsInfinite ( ) const
inlinevirtual

Definition at line 80 of file Graphic.h.

virtual bool Graphic::IsQuad ( ) const
inlinevirtual

Definition at line 101 of file Graphic.h.

virtual bool Graphic::IsSolid ( ) const
inlinevirtual

Reimplemented in Solid.

Definition at line 98 of file Graphic.h.

virtual bool Graphic::IsSprite ( ) const
inlinevirtual

Reimplemented in Sprite.

Definition at line 99 of file Graphic.h.

bool Graphic::IsVisible ( ) const
inline

Definition at line 67 of file Graphic.h.

virtual int Graphic::Life ( ) const
inlinevirtual

Definition at line 88 of file Graphic.h.

Point Graphic::Location ( ) const
inline

Definition at line 71 of file Graphic.h.

virtual bool Graphic::Luminous ( ) const
inlinevirtual

Reimplemented in TerrainClouds, and TerrainApron.

Definition at line 92 of file Graphic.h.

virtual void Graphic::MoveTo ( const Point p)
inlinevirtual

Definition at line 72 of file Graphic.h.

const char* Graphic::Name ( ) const
inline

Definition at line 66 of file Graphic.h.

int Graphic::Nearer ( Graphic a,
Graphic b 
)
static

Definition at line 89 of file Graphic.cpp.

int Graphic::operator< ( const Graphic g) const

Definition at line 46 of file Graphic.cpp.

int Graphic::operator<= ( const Graphic g) const

Definition at line 61 of file Graphic.cpp.

int Graphic::operator== ( const Graphic g) const
inline

Definition at line 53 of file Graphic.h.

void Graphic::ProjectScreenRect ( Projector p)
virtual

Reimplemented in Solid.

Definition at line 143 of file Graphic.cpp.

float Graphic::Radius ( ) const
inline

Definition at line 69 of file Graphic.h.

virtual void Graphic::Render ( Video video,
DWORD  flags 
)
inlinevirtual
const Rect& Graphic::ScreenRect ( ) const
inline

Definition at line 104 of file Graphic.h.

virtual void Graphic::SetBackground ( bool  b)
inlinevirtual

Definition at line 85 of file Graphic.h.

virtual void Graphic::SetDepth ( float  d)
inlinevirtual

Definition at line 76 of file Graphic.h.

virtual void Graphic::SetForeground ( bool  f)
inlinevirtual

Definition at line 83 of file Graphic.h.

void Graphic::SetInfinite ( bool  b)
virtual

Definition at line 78 of file Graphic.cpp.

virtual void Graphic::SetLuminous ( bool  l)
inlinevirtual

Reimplemented in Solid.

Definition at line 93 of file Graphic.h.

virtual void Graphic::SetOrientation ( const Matrix o)
inlinevirtual

Reimplemented in Solid, Bolt, and QuantumFlash.

Definition at line 60 of file Graphic.h.

virtual void Graphic::SetScene ( Scene s)
inlinevirtual

Definition at line 106 of file Graphic.h.

virtual void Graphic::SetShadow ( bool  s)
inlinevirtual

Definition at line 96 of file Graphic.h.

void Graphic::SetVisible ( bool  v)
inline

Definition at line 68 of file Graphic.h.

virtual void Graphic::Show ( )
inlinevirtual

Reimplemented in Dust.

Definition at line 91 of file Graphic.h.

virtual void Graphic::TranslateBy ( const Point ref)
inlinevirtual

Reimplemented in Particles, Bolt, ShieldRep, and ShipSolid.

Definition at line 73 of file Graphic.h.

virtual bool Graphic::Translucent ( ) const
inlinevirtual

Reimplemented in TerrainClouds, and TerrainApron.

Definition at line 94 of file Graphic.h.

static const char* Graphic::TYPENAME ( )
inlinestatic

Reimplemented in Solid, Selection, ShipSolid, Sprite, and Bolt.

Definition at line 38 of file Graphic.h.

virtual void Graphic::Update ( )
inlinevirtual

Reimplemented in Solid, Sprite, TerrainClouds, TerrainApron, Bolt, and Hoop.

Definition at line 59 of file Graphic.h.


Member Data Documentation

bool Graphic::background
protected

Definition at line 125 of file Graphic.h.

float Graphic::depth
protected

Definition at line 118 of file Graphic.h.

bool Graphic::foreground
protected

Definition at line 124 of file Graphic.h.

bool Graphic::hidden
protected

Definition at line 126 of file Graphic.h.

int Graphic::id
protected

Definition at line 116 of file Graphic.h.

int Graphic::id_key = 1
staticprotected

Definition at line 114 of file Graphic.h.

bool Graphic::infinite
protected

Definition at line 123 of file Graphic.h.

int Graphic::life
protected

Definition at line 120 of file Graphic.h.

Point Graphic::loc
protected

Definition at line 117 of file Graphic.h.

bool Graphic::luminous
protected

Definition at line 129 of file Graphic.h.

char Graphic::name[32]
protected

Definition at line 133 of file Graphic.h.

float Graphic::radius
protected

Definition at line 119 of file Graphic.h.

Scene* Graphic::scene
protected

Definition at line 132 of file Graphic.h.

Rect Graphic::screen_rect
protected

Definition at line 131 of file Graphic.h.

bool Graphic::shadow
protected

Definition at line 128 of file Graphic.h.

bool Graphic::trans
protected

Definition at line 127 of file Graphic.h.

bool Graphic::visible
protected

Definition at line 122 of file Graphic.h.


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