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

#include <Solid.h>

Inheritance diagram for Solid:
Graphic Hoop PlanetRep ShieldRep ShipSolid TerrainApron TerrainHaze TerrainPatch

List of all members.

Public Types

enum  { NAMELEN = 64 }
- Public Types inherited from Graphic
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

 Solid ()
virtual ~Solid ()
virtual void Render (Video *video, DWORD flags)
virtual void SelectDetail (Projector *p)
virtual void ProjectScreenRect (Projector *p)
virtual void Update ()
ModelGetModel () const
void GetAllTextures (List< Bitmap > &textures)
virtual bool IsDynamic () const
virtual void SetDynamic (bool d)
virtual void SetLuminous (bool l)
virtual void SetOrientation (const Matrix &o)
virtual void SetOrientation (const Solid &match)
const MatrixOrientation () const
float Roll () const
float Pitch () const
float Yaw () const
virtual bool IsSolid () const
virtual void CreateShadows (int nlights=1)
virtual void UpdateShadows (List< Light > &lights)
List< Shadow > & GetShadows ()
bool Load (const char *mag_file, double scale=1.0)
bool Load (ModelFile *loader, double scale=1.0)
void UseModel (Model *model)
void ClearModel ()
bool Rescale (double scale)
virtual int CollidesWith (Graphic &o)
virtual int CheckRayIntersection (Point pt, Point vpn, double len, Point &ipt, bool treat_translucent_polys_as_solid=true)
virtual PolyGetIntersectionPoly () const
virtual void DeletePrivateData ()
virtual void InvalidateSurfaceData ()
virtual void InvalidateSegmentData ()
- Public Member Functions inherited from Graphic
 Graphic ()
virtual ~Graphic ()
int operator== (const Graphic &g) const
int operator< (const Graphic &g) const
int operator<= (const Graphic &g) const
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 bool Translucent () const
virtual bool CastsShadow () const
virtual void SetShadow (bool s)
virtual bool IsSprite () const
virtual bool IsBolt () const
virtual bool IsQuad () const
const RectScreenRect () const
virtual SceneGetScene () const
virtual void SetScene (Scene *s)
virtual bool CheckVisibility (Projector &projector)

Static Public Member Functions

static const char * TYPENAME ()
static bool IsCollisionEnabled ()
static void EnableCollision (bool enable)
- Static Public Member Functions inherited from Graphic
static int Nearer (Graphic *a, Graphic *b)
static int Farther (Graphic *a, Graphic *b)

Protected Attributes

Modelmodel
bool own_model
float roll
float pitch
float yaw
Matrix orientation
Polyintersection_poly
List< Shadowshadows
- Protected Attributes inherited from Graphic
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]

Additional Inherited Members

- Static Protected Attributes inherited from Graphic
static int id_key = 1

Detailed Description

Definition at line 37 of file Solid.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NAMELEN 

Definition at line 42 of file Solid.h.


Constructor & Destructor Documentation

Solid::Solid ( )

Definition at line 129 of file Solid.cpp.

Solid::~Solid ( )
virtual

Definition at line 139 of file Solid.cpp.


Member Function Documentation

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

Reimplemented from Graphic.

Reimplemented in PlanetRep, TerrainPatch, TerrainApron, and TerrainHaze.

Definition at line 390 of file Solid.cpp.

void Solid::ClearModel ( )

Definition at line 521 of file Solid.cpp.

int Solid::CollidesWith ( Graphic o)
virtual

Reimplemented from Graphic.

Reimplemented in TerrainPatch, and TerrainApron.

Definition at line 290 of file Solid.cpp.

void Solid::CreateShadows ( int  nlights = 1)
virtual

Definition at line 620 of file Solid.cpp.

void Solid::DeletePrivateData ( )
virtual

Definition at line 667 of file Solid.cpp.

void Solid::EnableCollision ( bool  enable)
static

Definition at line 36 of file Solid.cpp.

void Solid::GetAllTextures ( List< Bitmap > &  textures)

Definition at line 751 of file Solid.cpp.

virtual Poly* Solid::GetIntersectionPoly ( ) const
inlinevirtual

Definition at line 86 of file Solid.h.

Model* Solid::GetModel ( ) const
inline

Definition at line 57 of file Solid.h.

List<Shadow>& Solid::GetShadows ( )
inline

Definition at line 74 of file Solid.h.

void Solid::InvalidateSegmentData ( )
virtual

Definition at line 701 of file Solid.cpp.

void Solid::InvalidateSurfaceData ( )
virtual

Definition at line 676 of file Solid.cpp.

bool Solid::IsCollisionEnabled ( )
static

Definition at line 35 of file Solid.cpp.

bool Solid::IsDynamic ( ) const
virtual

Definition at line 733 of file Solid.cpp.

virtual bool Solid::IsSolid ( ) const
inlinevirtual

Reimplemented from Graphic.

Definition at line 69 of file Solid.h.

bool Solid::Load ( const char *  mag_file,
double  scale = 1.0 
)

Definition at line 548 of file Solid.cpp.

bool Solid::Load ( ModelFile loader,
double  scale = 1.0 
)

Definition at line 570 of file Solid.cpp.

const Matrix& Solid::Orientation ( ) const
inline

Definition at line 65 of file Solid.h.

float Solid::Pitch ( ) const
inline

Definition at line 67 of file Solid.h.

void Solid::ProjectScreenRect ( Projector p)
virtual

Reimplemented from Graphic.

Definition at line 237 of file Solid.cpp.

void Solid::Render ( Video video,
DWORD  flags 
)
virtual

Reimplemented from Graphic.

Reimplemented in PlanetRep, TerrainPatch, ShipSolid, TerrainApron, TerrainHaze, and ShieldRep.

Definition at line 212 of file Solid.cpp.

bool Solid::Rescale ( double  scale)

Definition at line 591 of file Solid.cpp.

float Solid::Roll ( ) const
inline

Definition at line 66 of file Solid.h.

void Solid::SelectDetail ( Projector p)
virtual

Reimplemented in TerrainPatch.

Definition at line 230 of file Solid.cpp.

void Solid::SetDynamic ( bool  d)
virtual

Definition at line 742 of file Solid.cpp.

void Solid::SetLuminous ( bool  l)
virtual

Reimplemented from Graphic.

Definition at line 163 of file Solid.cpp.

void Solid::SetOrientation ( const Matrix o)
virtual

Reimplemented from Graphic.

Definition at line 157 of file Solid.cpp.

void Solid::SetOrientation ( const Solid match)
virtual

Definition at line 200 of file Solid.cpp.

static const char* Solid::TYPENAME ( )
inlinestatic

Reimplemented from Graphic.

Reimplemented in ShipSolid.

Definition at line 40 of file Solid.h.

void Solid::Update ( )
virtual

Reimplemented from Graphic.

Reimplemented in TerrainApron, and Hoop.

Definition at line 150 of file Solid.cpp.

void Solid::UpdateShadows ( List< Light > &  lights)
virtual

Definition at line 628 of file Solid.cpp.

void Solid::UseModel ( Model model)

Definition at line 534 of file Solid.cpp.

float Solid::Yaw ( ) const
inline

Definition at line 68 of file Solid.h.


Member Data Documentation

Poly* Solid::intersection_poly
protected

Definition at line 99 of file Solid.h.

Model* Solid::model
protected

Definition at line 94 of file Solid.h.

Matrix Solid::orientation
protected

Definition at line 98 of file Solid.h.

bool Solid::own_model
protected

Definition at line 95 of file Solid.h.

float Solid::pitch
protected

Definition at line 97 of file Solid.h.

float Solid::roll
protected

Definition at line 97 of file Solid.h.

List<Shadow> Solid::shadows
protected

Definition at line 101 of file Solid.h.

float Solid::yaw
protected

Definition at line 97 of file Solid.h.


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