iBallState Struct Reference
This interface describes the API for the ball mesh object. More...
#include <imesh/ball.h>
Inheritance diagram for iBallState:

Public Member Functions | |
virtual void | ApplyLightSpot (const csVector3 &position, float size, float **gradient)=0 |
Create a lightspot on the colours of the dome. | |
virtual void | ApplyVertGradient (float horizon_height, float zenith_height, float **gradient)=0 |
Set the colours of the dome to a gradient, vertically. | |
virtual csColor | GetColor () const =0 |
Get the color. | |
virtual iMaterialWrapper * | GetMaterialWrapper () const =0 |
Get material of ball. | |
virtual uint | GetMixMode () const =0 |
Get mix mode. | |
virtual void | GetRadius (float &radx, float &rady, float &radz) const =0 |
Get radius x, y and z. | |
virtual int | GetRimVertices () const =0 |
Get number of vertices on outer circle of ball. | |
virtual const csVector3 & | GetShift () const =0 |
Get shift x, y and z. | |
virtual bool | IsCylindricalMapping () const =0 |
Test if cylindrical texture mapping is used. | |
virtual bool | IsLighting () const =0 |
Is lighting enabled. | |
virtual bool | IsReversed () const =0 |
Get reversed mode. | |
virtual bool | IsTopOnly () const =0 |
Only top half. | |
virtual void | PaintSky (float time, float **dayvert, float **nightvert, float **topsun, float **sunset)=0 |
Animate the ball as a skydome for earth. | |
virtual void | SetColor (const csColor &col)=0 |
Set the color to use. Will be added to the lighting values. | |
virtual void | SetCylindricalMapping (bool m)=0 |
Use cylindrical texture mapping. | |
virtual void | SetLighting (bool l)=0 |
Set lighting. | |
virtual void | SetMaterialWrapper (iMaterialWrapper *material)=0 |
Set material of ball. | |
virtual void | SetMixMode (uint mode)=0 |
Set mix mode. | |
virtual void | SetRadius (float radx, float rady, float radz)=0 |
Set x, y, and z radius of ball. | |
virtual void | SetReversed (bool r)=0 |
Set reversed mode (i.e. sphere visible from inside out). | |
virtual void | SetRimVertices (int num)=0 |
Set number of vertices on outer circle of ball. | |
virtual void | SetShift (float shiftx, float shifty, float shiftz)=0 |
Set shift of ball. | |
virtual void | SetTopOnly (bool t)=0 |
Only show top half. |
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:
- Ball mesh object plugin (crystalspace.mesh.object.ball)
- iMeshObjectFactory::NewInstance()
- Ball Loader plugin (crystalspace.mesh.loader.ball)
- Ball Loader plugin (crystalspace.mesh.loader.factory.ball)
Definition at line 52 of file ball.h.
Member Function Documentation
|
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. |
|
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. |
|
Get the color.
|
|
Get material of ball.
|
|
Get mix mode.
|
|
Get radius x, y and z.
|
|
Get number of vertices on outer circle of ball.
|
|
Get shift x, y and z.
|
|
Test if cylindrical texture mapping is used.
|
|
Is lighting enabled.
|
|
Get reversed mode.
|
|
Only top half.
|
|
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. |
|
Set the color to use. Will be added to the lighting values.
|
|
Use cylindrical texture mapping.
|
|
Set lighting.
|
|
Set material of ball.
|
|
Set mix mode.
|
|
Set x, y, and z radius of ball.
|
|
Set reversed mode (i.e. sphere visible from inside out).
|
|
Set number of vertices on outer circle of ball.
|
|
Set shift of ball.
|
|
Only show top half.
|
The documentation for this struct was generated from the following file:
- imesh/ball.h
Generated for Crystal Space by doxygen 1.4.4