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

#include <Selector.h>

Inheritance diagram for Selector:
Graphic

List of all members.

Public Types

enum  SELECT_MODE { SELECT_REMOVE = -1, SELECT_REPLACE = 0, SELECT_APPEND = 1 }
- 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

 Selector (Selection *s=0)
virtual ~Selector ()
virtual void Render (Video *video, DWORD flags)
virtual bool CheckVisibility (Projector &projector)
void Clear ()
void Begin (Model *m, int mode, int select_mode=SELECT_REPLACE)
void AddMark (CPoint &p)
void End ()
bool IsActive () const
int GetViewMode () const
SelectionGetSelection () const
void UseModel (Model *m)
void SelectAll (int select_mode=SELECT_REPLACE)
void SelectInverse ()
void SelectSurface (Surface *s, int select_mode=SELECT_REPLACE)
void SelectVert (Surface *s, int v, int select_mode=SELECT_REPLACE)
void SelectPoly (Poly *p, int select_mode=SELECT_REPLACE)
void SelectMaterial (Material *m, int select_mode=SELECT_REPLACE)
void Reselect ()
- 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 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)

Protected Types

enum  { MAX_MARK = 4096 }

Protected Attributes

int view_mode
int nmarks
CPoint marks [MAX_MARK]
int select_mode
bool own_selection
Selectionselection
Modelmodel
- 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 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 29 of file Selector.h.


Member Enumeration Documentation

anonymous enum
protected
Enumerator:
MAX_MARK 

Definition at line 61 of file Selector.h.

Enumerator:
SELECT_REMOVE 
SELECT_REPLACE 
SELECT_APPEND 

Definition at line 35 of file Selector.h.


Constructor & Destructor Documentation

Selector::Selector ( Selection s = 0)

Definition at line 26 of file Selector.cpp.

Selector::~Selector ( )
virtual

Definition at line 41 of file Selector.cpp.


Member Function Documentation

void Selector::AddMark ( CPoint &  p)

Definition at line 95 of file Selector.cpp.

void Selector::Begin ( Model m,
int  mode,
int  select_mode = SELECT_REPLACE 
)

Definition at line 86 of file Selector.cpp.

virtual bool Selector::CheckVisibility ( Projector projector)
inlinevirtual

Reimplemented from Graphic.

Definition at line 39 of file Selector.h.

void Selector::Clear ( )

Definition at line 79 of file Selector.cpp.

void Selector::End ( )

Definition at line 102 of file Selector.cpp.

Selection* Selector::GetSelection ( ) const
inline

Definition at line 48 of file Selector.h.

int Selector::GetViewMode ( ) const
inline

Definition at line 47 of file Selector.h.

bool Selector::IsActive ( ) const
inline

Definition at line 46 of file Selector.h.

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

Reimplemented from Graphic.

Definition at line 52 of file Selector.cpp.

void Selector::Reselect ( )

Definition at line 365 of file Selector.cpp.

void Selector::SelectAll ( int  select_mode = SELECT_REPLACE)

Definition at line 219 of file Selector.cpp.

void Selector::SelectInverse ( )

Definition at line 244 of file Selector.cpp.

void Selector::SelectMaterial ( Material m,
int  select_mode = SELECT_REPLACE 
)

Definition at line 335 of file Selector.cpp.

void Selector::SelectPoly ( Poly p,
int  select_mode = SELECT_REPLACE 
)

Definition at line 319 of file Selector.cpp.

void Selector::SelectSurface ( Surface s,
int  select_mode = SELECT_REPLACE 
)

Definition at line 275 of file Selector.cpp.

void Selector::SelectVert ( Surface s,
int  v,
int  select_mode = SELECT_REPLACE 
)

Definition at line 303 of file Selector.cpp.

void Selector::UseModel ( Model m)

Definition at line 208 of file Selector.cpp.


Member Data Documentation

CPoint Selector::marks[MAX_MARK]
protected

Definition at line 65 of file Selector.h.

Model* Selector::model
protected

Definition at line 70 of file Selector.h.

int Selector::nmarks
protected

Definition at line 64 of file Selector.h.

bool Selector::own_selection
protected

Definition at line 68 of file Selector.h.

int Selector::select_mode
protected

Definition at line 66 of file Selector.h.

Selection* Selector::selection
protected

Definition at line 69 of file Selector.h.

int Selector::view_mode
protected

Definition at line 63 of file Selector.h.


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