CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iIsoGrid Struct Reference

a grid - part of the world. More...

#include <iso.h>

Inheritance diagram for iIsoGrid:

iBase List of all members.

Public Methods

virtual iIsoWorldGetWorld () const=0
 the the world that this grid is part of.

virtual void SetSpace (int minx, int minz, float miny=-1.0, float maxy=+10.0)=0
 set the minumum x and minimum z world coordinates for this grid.

virtual bool Contains (const csVector3 &pos)=0
 does this grid contain given position?

virtual const csBox3GetBox () const=0
 get the bounding box for the grid

virtual int GetWidth () const=0
 get the width of the grid

virtual int GetHeight () const=0
 get the height of the grid

virtual void GetGridOffset (int &minx, int &miny) const=0
 get the grid offset

virtual iIsoCellGetGridCell (int x, int y)=0
 get a cell by index

virtual void SetGroundMult (int multx, int multy)=0
 Set the ground level precision, default is 1,1 you give a multiplier, each cell in the grid then has multx x multy ground values.

virtual int GetGroundMultX () const=0
 get the x mult

virtual int GetGroundMultY () const=0
 get the y mult

virtual void SetGroundValue (int x, int y, int gr_x, int gr_y, float val)=0
 Set a ground value for cell, and subground index grx, gry.

virtual float GetGroundValue (int x, int y, int gr_x, int gr_y)=0
 get a ground value, same syntax as SetGroundValue.

virtual float GetGroundValue (int x, int y)=0
 same, but pass ground indices (cellx*multx+gr_x, celly*multy+gr_y).

virtual bool GroundHitBeam (const csVector3 &src, const csVector3 &dest)=0
 test if src can reach dest without intersecting the ground.

virtual void SetAllLight (const csColor &color)=0
 Set all the lighting in the grid to given color.

virtual void SetAllStaticLight (const csColor &color)=0
 Set all the static lighting in the grid to given color.

virtual void RegisterLight (iIsoLight *light)=0
 register a light with this grid

virtual void UnRegisterLight (iIsoLight *light)=0
 unregister a light with this grid

virtual void RegisterDynamicLight (iIsoLight *light)=0
 register a dynamic light with this grid

virtual void UnRegisterDynamicLight (iIsoLight *light)=0
 unregister a dynamic light with this grid

virtual void GetFakeLights (const csVector3 &pos, csArray< iLight * > &flights)=0
 get a list of fake iLight interfaces for a spot on the grid

virtual void AddSprite (iIsoSprite *sprite)=0
 Add a sprite to this grid.

virtual void AddSprite (iIsoSprite *sprite, const csVector3 &pos)=0
 Add a sprite to this grid at a given position (used internally).

virtual void RemoveSprite (iIsoSprite *sprite)=0
 Remove a sprite from this grid.

virtual void MoveSprite (iIsoSprite *sprite, const csVector3 &oldpos, const csVector3 &newpos)=0
 Move a sprite already in this grid, give previous and new position (used internally by IsoSprite).

virtual void Draw (iIsoRenderView *rview)=0
 Draw using given renderview.


Detailed Description

a grid - part of the world.

Contains a number of cells. contains sort of a screenfull of world space. it has a width in number of cells - laying in the z direction. and it has a height in number of cells - laying in the x direction.

Definition at line 161 of file iso.h.


Member Function Documentation

virtual void iIsoGrid::AddSprite iIsoSprite   sprite,
const csVector3   pos
[pure virtual]
 

Add a sprite to this grid at a given position (used internally).

virtual void iIsoGrid::AddSprite iIsoSprite   sprite [pure virtual]
 

Add a sprite to this grid.

virtual bool iIsoGrid::Contains const csVector3   pos [pure virtual]
 

does this grid contain given position?

virtual void iIsoGrid::Draw iIsoRenderView   rview [pure virtual]
 

Draw using given renderview.

virtual const csBox3& iIsoGrid::GetBox   [pure virtual]
 

get the bounding box for the grid

virtual void iIsoGrid::GetFakeLights const csVector3   pos,
csArray< iLight * > &    flights
[pure virtual]
 

get a list of fake iLight interfaces for a spot on the grid

virtual iIsoCell* iIsoGrid::GetGridCell int    x,
int    y
[pure virtual]
 

get a cell by index

virtual void iIsoGrid::GetGridOffset int &    minx,
int &    miny
const [pure virtual]
 

get the grid offset

virtual int iIsoGrid::GetGroundMultX   [pure virtual]
 

get the x mult

virtual int iIsoGrid::GetGroundMultY   [pure virtual]
 

get the y mult

virtual float iIsoGrid::GetGroundValue int    x,
int    y
[pure virtual]
 

same, but pass ground indices (cellx*multx+gr_x, celly*multy+gr_y).

virtual float iIsoGrid::GetGroundValue int    x,
int    y,
int    gr_x,
int    gr_y
[pure virtual]
 

get a ground value, same syntax as SetGroundValue.

virtual int iIsoGrid::GetHeight   [pure virtual]
 

get the height of the grid

virtual int iIsoGrid::GetWidth   [pure virtual]
 

get the width of the grid

virtual iIsoWorld* iIsoGrid::GetWorld   [pure virtual]
 

the the world that this grid is part of.

virtual bool iIsoGrid::GroundHitBeam const csVector3   src,
const csVector3   dest
[pure virtual]
 

test if src can reach dest without intersecting the ground.

virtual void iIsoGrid::MoveSprite iIsoSprite   sprite,
const csVector3   oldpos,
const csVector3   newpos
[pure virtual]
 

Move a sprite already in this grid, give previous and new position (used internally by IsoSprite).

virtual void iIsoGrid::RegisterDynamicLight iIsoLight   light [pure virtual]
 

register a dynamic light with this grid

virtual void iIsoGrid::RegisterLight iIsoLight   light [pure virtual]
 

register a light with this grid

virtual void iIsoGrid::RemoveSprite iIsoSprite   sprite [pure virtual]
 

Remove a sprite from this grid.

virtual void iIsoGrid::SetAllLight const csColor   color [pure virtual]
 

Set all the lighting in the grid to given color.

virtual void iIsoGrid::SetAllStaticLight const csColor   color [pure virtual]
 

Set all the static lighting in the grid to given color.

virtual void iIsoGrid::SetGroundMult int    multx,
int    multy
[pure virtual]
 

Set the ground level precision, default is 1,1 you give a multiplier, each cell in the grid then has multx x multy ground values.

This resets the groundmap.

virtual void iIsoGrid::SetGroundValue int    x,
int    y,
int    gr_x,
int    gr_y,
float    val
[pure virtual]
 

Set a ground value for cell, and subground index grx, gry.

0 < grx < multx, 0 < gry < multy. x,y are cell indices. the value is the height of the floor. Walls have a high value.

virtual void iIsoGrid::SetSpace int    minx,
int    minz,
float    miny = -1.0,
float    maxy = +10.0
[pure virtual]
 

set the minumum x and minimum z world coordinates for this grid.

After the call the grid occupies the space in the world from (minx, miny, minz) to (minx+height, maxy, minz+width) Because cells are aligned at the whole numbers, minx and minz must be whole numbers too. Contents are not shifted, so use when empty.

virtual void iIsoGrid::UnRegisterDynamicLight iIsoLight   light [pure virtual]
 

unregister a dynamic light with this grid

virtual void iIsoGrid::UnRegisterLight iIsoLight   light [pure virtual]
 

unregister a light with this grid


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18