CrystalSpace

Public API Reference

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

iBallState Struct Reference

This interface describes the API for the ball mesh object. More...

#include <imesh/ball.h>

Inheritance diagram for iBallState:

iBase List of all members.

Public Member Functions

virtual void SetRadius (float radx, float rady, float radz)=0
 Set x, y, and z radius of ball.
virtual void GetRadius (float &radx, float &rady, float &radz) const =0
 Get radius x, y and z.
virtual void SetShift (float shiftx, float shifty, float shiftz)=0
 Set shift of ball.
virtual const csVector3GetShift () const =0
 Get shift x, y and z.
virtual void SetRimVertices (int num)=0
 Set number of vertices on outer circle of ball.
virtual int GetRimVertices () const =0
 Get number of vertices on outer circle of ball.
virtual void SetMaterialWrapper (iMaterialWrapper *material)=0
 Set material of ball.
virtual iMaterialWrapperGetMaterialWrapper () const =0
 Get material of ball.
virtual void SetMixMode (uint mode)=0
 Set mix mode.
virtual uint GetMixMode () const =0
 Get mix mode.
virtual void SetReversed (bool r)=0
 Set reversed mode (i.e. sphere visible from inside out).
virtual bool IsReversed () const =0
 Get reversed mode.
virtual void SetTopOnly (bool t)=0
 Only show top half.
virtual bool IsTopOnly () const =0
 Only top half.
virtual void SetLighting (bool l)=0
 Set lighting.
virtual bool IsLighting () const =0
 Is lighting enabled.
virtual void SetColor (const csColor &col)=0
 Set the color to use. Will be added to the lighting values.
virtual csColor GetColor () const =0
 Get the color.
virtual void SetCylindricalMapping (bool m)=0
 Use cylindrical texture mapping.
virtual bool IsCylindricalMapping () const =0
 Test if cylindrical texture mapping is used.
virtual void ApplyVertGradient (float horizon_height, float zenith_height, float **gradient)=0
 Set the colours of the dome to a gradient, vertically.
virtual void ApplyLightSpot (const csVector3 &position, float size, float **gradient)=0
 Create a lightspot on the colours of the dome.
virtual void PaintSky (float time, float **dayvert, float **nightvert, float **topsun, float **sunset)=0
 Animate the ball as a skydome for earth.

Detailed Description

This interface describes the API for the ball mesh object.

Using this you can set up the ball to whatever (ball) shape you want it to have and the appearance. The ball plugin implements this interface in addition to iMeshObject.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface: Main users of this interface:

Definition at line 52 of file ball.h.


Member Function Documentation

virtual void iBallState::ApplyLightSpot const csVector3 position,
float  size,
float **  gradient
[pure virtual]
 

Create a lightspot on the colours of the dome.

The position indicates the direction of center of the lightspot wrt. the center of the ball mesh. The size gives the size of the spot, 1.0 for the sun. The gradient is used to get the colours for the lightspot. pass 0 for a sunlike gradient.

virtual void iBallState::ApplyVertGradient float  horizon_height,
float  zenith_height,
float **  gradient
[pure virtual]
 

Set the colours of the dome to a gradient, vertically.

the horizon_height is 0, the zenith_height is 1, the gradient is then interpolated to get the colour. The gradient is specified using a float**, where entry gradient[nr] is an array of 4 elements {height, r, g, b}. The entries must be in sorted order, low to high. End with a 0 e.g. (0.0, 100.0, { {0.0, 1,0,1}, {1.0, 0,0,0}, 0} for a gradient from purple to black.

virtual csColor iBallState::GetColor  )  const [pure virtual]
 

Get the color.

virtual iMaterialWrapper* iBallState::GetMaterialWrapper  )  const [pure virtual]
 

Get material of ball.

virtual uint iBallState::GetMixMode  )  const [pure virtual]
 

Get mix mode.

virtual void iBallState::GetRadius float &  radx,
float &  rady,
float &  radz
const [pure virtual]
 

Get radius x, y and z.

virtual int iBallState::GetRimVertices  )  const [pure virtual]
 

Get number of vertices on outer circle of ball.

virtual const csVector3& iBallState::GetShift  )  const [pure virtual]
 

Get shift x, y and z.

virtual bool iBallState::IsCylindricalMapping  )  const [pure virtual]
 

Test if cylindrical texture mapping is used.

virtual bool iBallState::IsLighting  )  const [pure virtual]
 

Is lighting enabled.

virtual bool iBallState::IsReversed  )  const [pure virtual]
 

Get reversed mode.

virtual bool iBallState::IsTopOnly  )  const [pure virtual]
 

Only top half.

virtual void iBallState::PaintSky float  time,
float **  dayvert,
float **  nightvert,
float **  topsun,
float **  sunset
[pure virtual]
 

Animate the ball as a skydome for earth.

Give a time - from 0.0 to 1.0. 0.0 is sunrise, daytime after, 0.5 is sunset, night following. If you pass 0 for the gradients, a default will be used. Note that both dayvert=nightvert and topsun=sunset, and only the colors can be different in them. Thus those pairs must be of the same length, and have the same interpolation values. This condition can be satisfied for any pair of gradients, by inserting points in one into the other with the interpolated color of the other. Thus the gradient pairs are identical, save for the r,g,b values.

virtual void iBallState::SetColor const csColor col  )  [pure virtual]
 

Set the color to use. Will be added to the lighting values.

virtual void iBallState::SetCylindricalMapping bool  m  )  [pure virtual]
 

Use cylindrical texture mapping.

virtual void iBallState::SetLighting bool  l  )  [pure virtual]
 

Set lighting.

virtual void iBallState::SetMaterialWrapper iMaterialWrapper material  )  [pure virtual]
 

Set material of ball.

virtual void iBallState::SetMixMode uint  mode  )  [pure virtual]
 

Set mix mode.

virtual void iBallState::SetRadius float  radx,
float  rady,
float  radz
[pure virtual]
 

Set x, y, and z radius of ball.

virtual void iBallState::SetReversed bool  r  )  [pure virtual]
 

Set reversed mode (i.e. sphere visible from inside out).

virtual void iBallState::SetRimVertices int  num  )  [pure virtual]
 

Set number of vertices on outer circle of ball.

virtual void iBallState::SetShift float  shiftx,
float  shifty,
float  shiftz
[pure virtual]
 

Set shift of ball.

virtual void iBallState::SetTopOnly bool  t  )  [pure virtual]
 

Only show top half.


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