CEL

Public API Reference

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

iBillboard Struct Reference

A billboard (2D image on screen). More...

#include <tools/billboard.h>

List of all members.

Public Member Functions

virtual const char * GetName () const =0
 Get the name of this billboard.
virtual csFlags & GetFlags ()=0
 Get flags for this billboard.
virtual bool SetMaterialName (const char *matname)=0
 Set material for this billboard.
virtual bool SetMaterialNameFast (const char *matname)=0
 Set material for this billboard.
virtual const char * GetMaterialName ()=0
 Get material name.
virtual void SetSize (int w, int h)=0
 Set the size of this billboard in pixels.
virtual void GetSize (int &w, int &h)=0
 Get the size of this billboard in billboard space.
virtual void GetImageSize (int &w, int &h)=0
 Get the size of the image on this billboard in billboard space.
virtual void SetPosition (int x, int y)=0
 Set the position of the top-left corner of this billboard.
virtual void MoveToPosition (csTicks delta, int x, int y)=0
 During the given time, slowly move the billboard to the given position.
virtual void GetPosition (int &x, int &y) const =0
 Get the position of the top-left corner of this billboard.
virtual void Move (int dx, int dy)=0
 Relative move.
virtual void StackTop ()=0
 Bring this billboard to the top of the stack (first visible).
virtual void StackBottom ()=0
 Bring this billboard to the bottom of the stack.
virtual void StackUp ()=0
 Bring this billboard one closer to the top of the stack (first visible).
virtual void StackDown ()=0
 Bring this billboard one closer to the bottom of the stack.
virtual void SetUVTopLeft (const csVector2 &uv)=0
 Set the top-left coordinate of the texture (default 0,0).
virtual const csVector2 & GetUVTopLeft () const =0
 Get the top-left coordinate of the texture (default 0,0).
virtual void SetUVBottomRight (const csVector2 &uv)=0
 Set the bottom-right coordinate of the texture (default 1,1).
virtual const csVector2 & GetUVBottomRight () const =0
 Get the bottom-right coordinate of the texture (default 1,1).
virtual void SetColor (const csColor &c)=0
 Set the color for this billboard (default white).
virtual const csColor & GetColor () const =0
 Get the color for this billboard (default white).
virtual void SetLayer (iBillboardLayer *layer)=0
 Set the layer to use for this billboard.
virtual iBillboardLayerGetLayer () const =0
 Get the layer that is used by this billboard.
virtual void AddEventHandler (iBillboardEventHandler *evh)=0
 Add an event handler to this billboard.
virtual void RemoveEventHandler (iBillboardEventHandler *evh)=0
 Remove an event handler from this billboard.


Detailed Description

A billboard (2D image on screen).

Billboards work in a coordinate system independent of the size of the screen. This coordinate system basically works on a virtual screen with size 307200 x 307200. These values were chosen because they can fit most other standard resolutions without requiring fractions (i.e. a 1280x1024 screen is exactly 307200/240 x 307200/300). For convenience we call this coordinate system 'billboard space'.

Definition at line 127 of file billboard.h.


Member Function Documentation

virtual void iBillboard::AddEventHandler iBillboardEventHandler evh  )  [pure virtual]
 

Add an event handler to this billboard.

virtual const csColor& iBillboard::GetColor  )  const [pure virtual]
 

Get the color for this billboard (default white).

virtual csFlags& iBillboard::GetFlags  )  [pure virtual]
 

Get flags for this billboard.

virtual void iBillboard::GetImageSize int &  w,
int &  h
[pure virtual]
 

Get the size of the image on this billboard in billboard space.

virtual iBillboardLayer* iBillboard::GetLayer  )  const [pure virtual]
 

Get the layer that is used by this billboard.

virtual const char* iBillboard::GetMaterialName  )  [pure virtual]
 

Get material name.

virtual const char* iBillboard::GetName  )  const [pure virtual]
 

Get the name of this billboard.

virtual void iBillboard::GetPosition int &  x,
int &  y
const [pure virtual]
 

Get the position of the top-left corner of this billboard.

Uses billboard space.

virtual void iBillboard::GetSize int &  w,
int &  h
[pure virtual]
 

Get the size of this billboard in billboard space.

virtual const csVector2& iBillboard::GetUVBottomRight  )  const [pure virtual]
 

Get the bottom-right coordinate of the texture (default 1,1).

Range from 0,0 - 1,1.

virtual const csVector2& iBillboard::GetUVTopLeft  )  const [pure virtual]
 

Get the top-left coordinate of the texture (default 0,0).

Range from 0,0 - 1,1.

virtual void iBillboard::Move int  dx,
int  dy
[pure virtual]
 

Relative move.

Uses billboard space.

virtual void iBillboard::MoveToPosition csTicks  delta,
int  x,
int  y
[pure virtual]
 

During the given time, slowly move the billboard to the given position.

If 'delta' is 0 then this function is equivalent to calling SetPosition(). Calling this function while another move is in progress has the effect of clearing that previous move. Uses billboard space.

virtual void iBillboard::RemoveEventHandler iBillboardEventHandler evh  )  [pure virtual]
 

Remove an event handler from this billboard.

virtual void iBillboard::SetColor const csColor &  c  )  [pure virtual]
 

Set the color for this billboard (default white).

virtual void iBillboard::SetLayer iBillboardLayer layer  )  [pure virtual]
 

Set the layer to use for this billboard.

virtual bool iBillboard::SetMaterialName const char *  matname  )  [pure virtual]
 

Set material for this billboard.

Returns false on failure.

virtual bool iBillboard::SetMaterialNameFast const char *  matname  )  [pure virtual]
 

Set material for this billboard.

Returns false on failure. This is a faster version which does not recompute the clickmap (unless there is no clickmap yet).

virtual void iBillboard::SetPosition int  x,
int  y
[pure virtual]
 

Set the position of the top-left corner of this billboard.

Uses billboard space.

virtual void iBillboard::SetSize int  w,
int  h
[pure virtual]
 

Set the size of this billboard in pixels.

virtual void iBillboard::SetUVBottomRight const csVector2 &  uv  )  [pure virtual]
 

Set the bottom-right coordinate of the texture (default 1,1).

Range from 0,0 - 1,1.

virtual void iBillboard::SetUVTopLeft const csVector2 &  uv  )  [pure virtual]
 

Set the top-left coordinate of the texture (default 0,0).

Range from 0,0 - 1,1.

virtual void iBillboard::StackBottom  )  [pure virtual]
 

Bring this billboard to the bottom of the stack.

virtual void iBillboard::StackDown  )  [pure virtual]
 

Bring this billboard one closer to the bottom of the stack.

virtual void iBillboard::StackTop  )  [pure virtual]
 

Bring this billboard to the top of the stack (first visible).

virtual void iBillboard::StackUp  )  [pure virtual]
 

Bring this billboard one closer to the top of the stack (first visible).


The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4