7.8.6 Ball Mesh Object
Written by Jorrit Tyberghein,
jorrit.tyberghein@uz.kuleuven.ac.be.
A ball is a ball shaped object made out of triangles. You can specify
the detail (i.e. number of triangles used).
Basic Structure
The following SCF class names are used (for CS_LOAD_PLUGIN()
):
-
Type plugin: `crystalspace.mesh.object.ball'
-
Loader plugin: `crystalspace.mesh.loader.ball'
-
Factory loader plugin: `crystalspace.mesh.loader.factory.ball'
Objects in this plugin implement the following SCF interfaces (get
with SCF_QUERY_INTERFACE()
):
-
MeshObject
-
Implements `iMeshObject'
-
Implements `iBallState'
-
MeshObjectFactory
-
Implements `iMeshObjectFactory'
-
MeshObjectFactory
-
Implements `iMeshObjectType'
Factory State Interface
The ball mesh object plugin has no factory state interface.
Factory Loader
The ball mesh factory loader has no parameters.
Object State Interface
`iBallState' is the SCF interface that you can
use to set/get settings for a ball object. The definition of this
interface can be found in include/imball.h
and that's also the
include file you need to include in your applications to use this plugin.
Using this interface you can access the material, blending mode (mixmode),
and radius.
Object Loader
FACTORY
- Name of the factory to use for creation of this instance.
MIXMODE
- Blending mode, one of `ADD', `ALPHA', `COPY', `KEYCOLOR',
`MULTIPLY2', `MULTIPLY', or `TRANSPARENT'.
MATERIAL
- Material to use for the ball.
NUMRIM
- Number of vertices on the rim of the ball (i.e. the number of vertices along
the equator). A good default is 6.
RADIUS
- Three parameters for x, y, and z radius.
SHIFT
- Three parameters for x, y, and z shift.
REVERSED
- Reverse the order of the triangles so that the ball is visible from the
inside instead of the outside.
TOPONLY
- Only generate the top triangles instead of two halves.
CYLINDRICAL
- Use cylindrical texture mapping instead of only a circle from the
texture (default off).
LIGHTING
- Enable/disable lighting. Default on.
COLOR
- Set the base color to use for the ball. This color will be added to the
color calculated by lighting (if lighting is enabled).
This document was generated
using texi2html