CrystalSpace

Public API Reference

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

iIsoView Struct Reference

A view on the isometric world. More...

#include <iso.h>

Inheritance diagram for iIsoView:

iBase List of all members.

Public Methods

virtual iIsoEngineGetEngine () const=0
 Get the iso engine this view belongs to. More...

virtual void SetWorld (iIsoWorld *world)=0
 Set world to use. More...

virtual iIsoWorldGetWorld () const=0
 Get world shown in view. More...

virtual void SetRect (const csRect &rect)=0
 Set the rectangle on the screen to draw to. More...

virtual const csRectGetRect () const=0
 Get the rectangle on the screen to draw to. More...

virtual void SetAxes (float xscale, float yscale, float zscale, float zskew, float xskew)=0
 Set the axis of the view on the world. More...

virtual const csVector2GetScroll () const=0
 See the screen position scrolled to. More...

virtual csVector3 GetViewScroll () const=0
 See the world position scrolled to (as shown in center of viewport). More...

virtual void SetScroll (const csVector3 &worldpos, const csVector2 &coord)=0
 Set the scroll position. Show world space pos as screen space coord. More...

virtual void MoveScroll (const csVector3 &delta)=0
 Move the scroll position by delta (in world space). More...

virtual void W2S (const csVector3 &world, csVector2 &screen) const=0
 Transform world space coordinate into a screen coordinate. More...

virtual void W2S (const csVector3 &world, csVector3 &screen) const=0
 Transform world space coordinate into a screen coordinate. More...

virtual void S2W (const csVector2 &screen, csVector3 &world) const=0
 Transform screen coordinate into a world space coordinate. More...

virtual void Draw ()=0
 Draw the view onto the screen. More...

virtual iCameraGetFakeCamera (const csVector3 &center, iIsoRenderView *rview)=0
 Return a fake iCamera implementation, that approximates isometric near the given position (in world space). More...


Detailed Description

A view on the isometric world.

Can be used to render a specific portion of an isoWorld onto a particular part of the screen.

The axes are aligned like this +y | ./+z | ./ | ./ |/ \. \. \. \+x

Definition at line 288 of file iso.h.


Member Function Documentation

virtual void iIsoView::Draw   [pure virtual]
 

Draw the view onto the screen.

Call this when in 3d mode (with the engine->getBeginDrawFlags passed)

virtual iIsoEngine* iIsoView::GetEngine   const [pure virtual]
 

Get the iso engine this view belongs to.

virtual iCamera* iIsoView::GetFakeCamera const csVector3   center,
iIsoRenderView   rview
[pure virtual]
 

Return a fake iCamera implementation, that approximates isometric near the given position (in world space).

The renderview is also used. This is a very partial implementation of iCamera. For Internal Use!

virtual const csRect& iIsoView::GetRect   const [pure virtual]
 

Get the rectangle on the screen to draw to.

virtual const csVector2& iIsoView::GetScroll   const [pure virtual]
 

See the screen position scrolled to.

virtual csVector3 iIsoView::GetViewScroll   const [pure virtual]
 

See the world position scrolled to (as shown in center of viewport).

virtual iIsoWorld* iIsoView::GetWorld   const [pure virtual]
 

Get world shown in view.

virtual void iIsoView::MoveScroll const csVector3   delta [pure virtual]
 

Move the scroll position by delta (in world space).

virtual void iIsoView::S2W const csVector2   screen,
csVector3   world
const [pure virtual]
 

Transform screen coordinate into a world space coordinate.

The world space coordinate will have y=0.

virtual void iIsoView::SetAxes float    xscale,
float    yscale,
float    zscale,
float    zskew,
float    xskew
[pure virtual]
 

Set the axis of the view on the world.

The scale is in pixels, and must be > 0. Default is g3d->height/16. The skew values determine the angle of the z and x axis. it is the amount of vertical change per horizontal change. 1.0 gives perfect isometrical view, 0.5 flattens the lines. skew values must be > 0. For a nice y scale, (sqrt(xskew*xskew+1+sqrt(yskew*yskew+1)/2 can compensate for the lengthening and shortening of the axes due to the skewing.

virtual void iIsoView::SetRect const csRect   rect [pure virtual]
 

Set the rectangle on the screen to draw to.

virtual void iIsoView::SetScroll const csVector3   worldpos,
const csVector2   coord
[pure virtual]
 

Set the scroll position. Show world space pos as screen space coord.

virtual void iIsoView::SetWorld iIsoWorld   world [pure virtual]
 

Set world to use.

virtual void iIsoView::W2S const csVector3   world,
csVector3   screen
const [pure virtual]
 

Transform world space coordinate into a screen coordinate.

The returned z value can be used for a zbuffer, is bigger when further away.

virtual void iIsoView::W2S const csVector3   world,
csVector2   screen
const [pure virtual]
 

Transform world space coordinate into a screen coordinate.


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