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

#include <Explosion.h>

Inheritance diagram for Explosion:
SimObject SimObserver Physical

List of all members.

Public Types

enum  Type {
  SHIELD_FLASH = 1, HULL_FLASH = 2, BEAM_FLASH = 3, SHOT_BLAST = 4,
  HULL_BURST = 5, HULL_FIRE = 6, PLASMA_LEAK = 7, SMOKE_TRAIL = 8,
  SMALL_FIRE = 9, SMALL_EXPLOSION = 10, LARGE_EXPLOSION = 11, LARGE_BURST = 12,
  NUKE_EXPLOSION = 13, QUANTUM_FLASH = 14, HYPER_FLASH = 15
}
- Public Types inherited from SimObject
enum  TYPES {
  SIM_SHIP = 100, SIM_SHOT, SIM_DRONE, SIM_EXPLOSION,
  SIM_DEBRIS, SIM_ASTEROID
}
- Public Types inherited from Physical
enum  { NAMELEN = 48 }

Public Member Functions

 Explosion (int type, const Vec3 &pos, const Vec3 &vel, float exp_scale, float part_scale, SimRegion *rgn=0, SimObject *source=0)
virtual ~Explosion ()
virtual void ExecFrame (double seconds)
ParticlesGetParticles ()
virtual void Activate (Scene &scene)
virtual void Deactivate (Scene &scene)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
- Public Member Functions inherited from SimObject
 SimObject ()
 SimObject (const char *n, int t=0)
virtual ~SimObject ()
virtual SimRegionGetRegion () const
virtual void SetRegion (SimRegion *rgn)
virtual void Notify ()
virtual void Register (SimObserver *obs)
virtual void Unregister (SimObserver *obs)
virtual DWORD GetObjID () const
virtual void SetObjID (DWORD id)
virtual bool IsHostileTo (const SimObject *o) const
- Public Member Functions inherited from Physical
 Physical ()
 Physical (const char *n, int t=0)
virtual ~Physical ()
int operator== (const Physical &p) const
virtual void AeroFrame (double seconds)
virtual void ArcadeFrame (double seconds)
virtual void AngularFrame (double seconds)
virtual void LinearFrame (double seconds)
virtual void CalcFlightPath ()
virtual void MoveTo (const Point &new_loc)
virtual void TranslateBy (const Point &ref)
virtual void ApplyForce (const Point &force)
virtual void ApplyTorque (const Point &torque)
virtual void SetThrust (double t)
virtual void SetTransX (double t)
virtual void SetTransY (double t)
virtual void SetTransZ (double t)
virtual void SetHeading (double r, double p, double y)
virtual void LookAt (const Point &dst)
virtual void ApplyRoll (double roll_acc)
virtual void ApplyPitch (double pitch_acc)
virtual void ApplyYaw (double yaw_acc)
virtual int CollidesWith (Physical &o)
virtual void InflictDamage (double damage, int type=0)
int Identity () const
int Type () const
const char * Name () const
Point Location () const
Point Heading () const
Point LiftLine () const
Point BeamLine () const
Point Velocity () const
Point Acceleration () const
double Thrust () const
double TransX () const
double TransY () const
double TransZ () const
double Drag () const
double Roll () const
double Pitch () const
double Yaw () const
Point Rotation () const
double Alpha () const
double FlightPathYawAngle () const
double FlightPathPitchAngle () const
double Radius () const
double Mass () const
double Integrity () const
double Life () const
double Shake () const
const PointVibration () const
const CameraCam () const
GraphicRep () const
LightLightSrc () const
DirectorGetDirector () const
virtual void SetAngularRates (double r, double p, double y)
virtual void GetAngularRates (double &r, double &p, double &y)
virtual void SetAngularDrag (double r, double p, double y)
virtual void GetAngularDrag (double &r, double &p, double &y)
virtual void GetAngularThrust (double &r, double &p, double &y)
virtual void SetVelocity (const Point &v)
virtual void SetAbsoluteOrientation (double roll, double pitch, double yaw)
virtual void CloneCam (const Camera &cam)
virtual void SetDrag (double d)
virtual void SetPrimary (const Point &loc, double mass)
virtual void SetGravity (double g)
virtual void SetBaseDensity (double d)
virtual double GetBaseDensity () const
virtual double GetDensity () const
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Static Public Member Functions

static const char * TYPENAME ()
static void Initialize ()
static void Close ()

Protected Attributes

int type
Particlesparticles
float scale
float scale1
float scale2
SimObjectsource
Point mount_rel
- Protected Attributes inherited from SimObject
SimRegionregion
List< SimObserverobservers
DWORD objid
bool active
bool notifying
- Protected Attributes inherited from Physical
int id
int obj_type
char name [NAMELEN]
Camera cam
Point velocity
Point arcade_velocity
Point accel
float thrust
float trans_x
float trans_y
float trans_z
float drag
float roll
float pitch
float yaw
float dr
float dp
float dy
float dr_acc
float dp_acc
float dy_acc
float dr_drg
float dp_drg
float dy_drg
float flight_path_yaw
float flight_path_pitch
Point primary_loc
double primary_mass
float g_accel
float Do
float CL
float CD
float alpha
float stall
bool lat_thrust
bool straight
float shake
Point vibration
float roll_rate
float pitch_rate
float yaw_rate
double life
float radius
float mass
float integrity
Graphicrep
Lightlight
Directordir
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Detailed Description

Definition at line 31 of file Explosion.h.


Member Enumeration Documentation

Enumerator:
SHIELD_FLASH 
HULL_FLASH 
BEAM_FLASH 
SHOT_BLAST 
HULL_BURST 
HULL_FIRE 
PLASMA_LEAK 
SMOKE_TRAIL 
SMALL_FIRE 
SMALL_EXPLOSION 
LARGE_EXPLOSION 
LARGE_BURST 
NUKE_EXPLOSION 
QUANTUM_FLASH 
HYPER_FLASH 

Definition at line 37 of file Explosion.h.


Constructor & Destructor Documentation

Explosion::Explosion ( int  type,
const Vec3 pos,
const Vec3 vel,
float  exp_scale,
float  part_scale,
SimRegion rgn = 0,
SimObject source = 0 
)

Definition at line 61 of file Explosion.cpp.

Explosion::~Explosion ( )
virtual

Definition at line 136 of file Explosion.cpp.


Member Function Documentation

void Explosion::Activate ( Scene scene)
virtual

Reimplemented from SimObject.

Definition at line 568 of file Explosion.cpp.

void Explosion::Close ( )
static

Definition at line 487 of file Explosion.cpp.

void Explosion::Deactivate ( Scene scene)
virtual

Reimplemented from SimObject.

Definition at line 602 of file Explosion.cpp.

void Explosion::ExecFrame ( double  seconds)
virtual

Reimplemented from Physical.

Definition at line 509 of file Explosion.cpp.

const char * Explosion::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 160 of file Explosion.cpp.

Particles* Explosion::GetParticles ( )
inline

Definition at line 63 of file Explosion.h.

void Explosion::Initialize ( )
static

Definition at line 173 of file Explosion.cpp.

static const char* Explosion::TYPENAME ( )
inlinestatic

Reimplemented from SimObject.

Definition at line 35 of file Explosion.h.

bool Explosion::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 144 of file Explosion.cpp.


Member Data Documentation

Point Explosion::mount_rel
protected

Definition at line 80 of file Explosion.h.

Particles* Explosion::particles
protected

Definition at line 73 of file Explosion.h.

float Explosion::scale
protected

Definition at line 75 of file Explosion.h.

float Explosion::scale1
protected

Definition at line 76 of file Explosion.h.

float Explosion::scale2
protected

Definition at line 77 of file Explosion.h.

SimObject* Explosion::source
protected

Definition at line 79 of file Explosion.h.

int Explosion::type
protected

Definition at line 72 of file Explosion.h.


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