Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

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. More...

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. More...

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. More...

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, iLight **&flights, int &num)=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.


Member Function Documentation

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.

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.

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.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000