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

#include <Sky.h>

Inheritance diagram for PlanetRep:
Solid Graphic

List of all members.

Public Member Functions

 PlanetRep (const char *img_west, const char *img_glow, double rad, const Vec3 &pos, double tscale=1, const char *rngname=0, double minrad=0, double maxrad=0, Color atmos=Color::Black, const char *img_gloss=0)
virtual ~PlanetRep ()
virtual Color Atmosphere () const
virtual void SetAtmosphere (Color a)
virtual void SetDaytime (bool d)
virtual void SetStarSystem (StarSystem *system)
virtual void Render (Video *video, DWORD flags)
virtual int CheckRayIntersection (Point pt, Point vpn, double len, Point &ipt, bool treat_translucent_polys_as_solid=true)
- Public Member Functions inherited from Solid
 Solid ()
virtual ~Solid ()
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 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)

Protected Member Functions

void CreateSphere (double radius, int nrings, int nsections, double minrad, double maxrad, int rsections, double tscale)

Protected Attributes

Materialmtl_surf
Materialmtl_limb
Materialmtl_ring
int has_ring
int ring_verts
int ring_polys
double ring_rad
double body_rad
Color atmosphere
bool daytime
StarSystemstar_system
- Protected Attributes inherited from Solid
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

- Public Types inherited from Solid
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
}
- Static Public Member Functions inherited from Solid
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)

Detailed Description

Definition at line 66 of file Sky.h.


Constructor & Destructor Documentation

PlanetRep::PlanetRep ( const char *  img_west,
const char *  img_glow,
double  rad,
const Vec3 pos,
double  tscale = 1,
const char *  rngname = 0,
double  minrad = 0,
double  maxrad = 0,
Color  atmos = Color::Black,
const char *  img_gloss = 0 
)

Definition at line 213 of file Sky.cpp.

PlanetRep::~PlanetRep ( )
virtual

Definition at line 317 of file Sky.cpp.


Member Function Documentation

virtual Color PlanetRep::Atmosphere ( ) const
inlinevirtual

Definition at line 75 of file Sky.h.

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

Reimplemented from Solid.

Definition at line 646 of file Sky.cpp.

void PlanetRep::CreateSphere ( double  radius,
int  nrings,
int  nsections,
double  minrad,
double  maxrad,
int  rsections,
double  tscale 
)
protected

Definition at line 324 of file Sky.cpp.

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

Reimplemented from Solid.

Definition at line 706 of file Sky.cpp.

virtual void PlanetRep::SetAtmosphere ( Color  a)
inlinevirtual

Definition at line 76 of file Sky.h.

void PlanetRep::SetDaytime ( bool  d)
virtual

Definition at line 682 of file Sky.cpp.

void PlanetRep::SetStarSystem ( StarSystem system)
virtual

Definition at line 698 of file Sky.cpp.


Member Data Documentation

Color PlanetRep::atmosphere
protected

Definition at line 98 of file Sky.h.

double PlanetRep::body_rad
protected

Definition at line 97 of file Sky.h.

bool PlanetRep::daytime
protected

Definition at line 99 of file Sky.h.

int PlanetRep::has_ring
protected

Definition at line 93 of file Sky.h.

Material* PlanetRep::mtl_limb
protected

Definition at line 91 of file Sky.h.

Material* PlanetRep::mtl_ring
protected

Definition at line 92 of file Sky.h.

Material* PlanetRep::mtl_surf
protected

Definition at line 90 of file Sky.h.

int PlanetRep::ring_polys
protected

Definition at line 95 of file Sky.h.

double PlanetRep::ring_rad
protected

Definition at line 96 of file Sky.h.

int PlanetRep::ring_verts
protected

Definition at line 94 of file Sky.h.

StarSystem* PlanetRep::star_system
protected

Definition at line 101 of file Sky.h.


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