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

#include <Particles.h>

Inheritance diagram for Particles:
Graphic

List of all members.

Public Member Functions

 Particles (Bitmap *bitmap, int np, const Vec3 &base_loc, const Vec3 &vel, float base_speed=500.0f, float drag=1.0f, float scale=1.0f, float bloom=0.0f, float decay=100.0f, float release=1.0f, bool cont=false, bool trail=true, bool rise=false, int blend=3, int nframes=1)
virtual ~Particles ()
virtual void Render (Video *video, DWORD flags)
virtual void ExecFrame (double seconds)
virtual void TranslateBy (const Point &ref)
virtual bool CheckVisibility (Projector &projector)
virtual bool IsEmitting () const
virtual void StopEmitting ()
- 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
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 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)

Protected Attributes

int nparts
int nverts
int blend
bool continuous
bool trailing
bool rising
bool emitting
float base_speed
float max_speed
float drag
float release_rate
float decay
float min_scale
float max_scale
float extra
Point ref_loc
Point offset
Pointvelocity
Pointpart_loc
Pointrelease
float * timestamp
float * intensity
float * scale
float * angle
BYTE * frame
Spritepoint_sprite
- 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 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 Graphic
static const char * TYPENAME ()
static int Nearer (Graphic *a, Graphic *b)
static int Farther (Graphic *a, Graphic *b)
- Static Protected Attributes inherited from Graphic
static int id_key = 1

Detailed Description

Definition at line 25 of file Particles.h.


Constructor & Destructor Documentation

Particles::Particles ( Bitmap bitmap,
int  np,
const Vec3 base_loc,
const Vec3 vel,
float  base_speed = 500.0f,
float  drag = 1.0f,
float  scale = 1.0f,
float  bloom = 0.0f,
float  decay = 100.0f,
float  release = 1.0f,
bool  cont = false,
bool  trail = true,
bool  rise = false,
int  blend = 3,
int  nframes = 1 
)

Definition at line 29 of file Particles.cpp.

Particles::~Particles ( )
virtual

Definition at line 96 of file Particles.cpp.


Member Function Documentation

bool Particles::CheckVisibility ( Projector projector)
virtual

Reimplemented from Graphic.

Definition at line 211 of file Particles.cpp.

void Particles::ExecFrame ( double  seconds)
virtual

Definition at line 111 of file Particles.cpp.

virtual bool Particles::IsEmitting ( ) const
inlinevirtual

Definition at line 51 of file Particles.h.

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

Reimplemented from Graphic.

Definition at line 235 of file Particles.cpp.

virtual void Particles::StopEmitting ( )
inlinevirtual

Definition at line 52 of file Particles.h.

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

Reimplemented from Graphic.

Definition at line 48 of file Particles.h.


Member Data Documentation

float* Particles::angle
protected

Definition at line 80 of file Particles.h.

float Particles::base_speed
protected

Definition at line 63 of file Particles.h.

int Particles::blend
protected

Definition at line 57 of file Particles.h.

bool Particles::continuous
protected

Definition at line 58 of file Particles.h.

float Particles::decay
protected

Definition at line 67 of file Particles.h.

float Particles::drag
protected

Definition at line 65 of file Particles.h.

bool Particles::emitting
protected

Definition at line 61 of file Particles.h.

float Particles::extra
protected

Definition at line 70 of file Particles.h.

BYTE* Particles::frame
protected

Definition at line 81 of file Particles.h.

float* Particles::intensity
protected

Definition at line 78 of file Particles.h.

float Particles::max_scale
protected

Definition at line 69 of file Particles.h.

float Particles::max_speed
protected

Definition at line 64 of file Particles.h.

float Particles::min_scale
protected

Definition at line 68 of file Particles.h.

int Particles::nparts
protected

Definition at line 55 of file Particles.h.

int Particles::nverts
protected

Definition at line 56 of file Particles.h.

Point Particles::offset
protected

Definition at line 73 of file Particles.h.

Point* Particles::part_loc
protected

Definition at line 75 of file Particles.h.

Sprite* Particles::point_sprite
protected

Definition at line 83 of file Particles.h.

Point Particles::ref_loc
protected

Definition at line 72 of file Particles.h.

Point* Particles::release
protected

Definition at line 76 of file Particles.h.

float Particles::release_rate
protected

Definition at line 66 of file Particles.h.

bool Particles::rising
protected

Definition at line 60 of file Particles.h.

float* Particles::scale
protected

Definition at line 79 of file Particles.h.

float* Particles::timestamp
protected

Definition at line 77 of file Particles.h.

bool Particles::trailing
protected

Definition at line 59 of file Particles.h.

Point* Particles::velocity
protected

Definition at line 74 of file Particles.h.


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