SmallChange
1.0.0
A collection of extensions to Coin3D
|
The Coinboard class is a shape node which faces geometry towards the camera. More...
#include <Coinboard.h>
Public Types | |
enum | ShapeType { TRIANGLES , QUADS , TRIANGLE_STRIP , TRIANGLE_FAN } |
Public Member Functions | |
Coinboard (void) | |
virtual void | getPrimitiveCount (SoGetPrimitiveCountAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFVec3f | axisOfRotation |
SoMFVec3f | coord |
SoSFInt32 | frontAxis |
SoSFVec3f | normal |
SoMFInt32 | numVertices |
SoMFVec3f | position |
SoSFEnum | shapeType |
SoMFVec4f | texCoord |
Protected Member Functions | |
virtual | ~Coinboard () |
virtual void | computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er) |
virtual void | generatePrimitives (SoAction *action) |
The Coinboard class is a shape node which faces geometry towards the camera.
If the position field contains more than one value, the shape is rendered several times with a translation as specified in position. This makes it possible to have multiple equal billboards at different positions. Very useful for rendering particles or a forest of trees etc.
When picking, each triangle in each billboard will have an SoFaceDetail. The face index will (for now) always be 0, while the part index will the position index used for the billboard.
Coinboard::Coinboard | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor.
This is a Coin method. It calculates the bounding box of the front facing shapes.
This is a Coin method. It should generate primitives, but is currently not implemented.
|
virtual |
This is a Coin method. It should return the number of primitives, float maxval = coords[0][0]; but is currently not implemented.
|
virtual |
This is a Coin method. It renders all shapes facing the camera.
SoSFVec3f Coinboard::axisOfRotation |
Use this to lock rotation around one axis. Default is [0,1,0]. Set to [0,0,0] to rotate freely.
SoMFVec3f Coinboard::coord |
The coordinates that will be sent to GL.
SoSFInt32 Coinboard::frontAxis |
The axis which should be directed towards the camera. This can be either 0 (positive x-axis), 1 (positive y-axis) or 2 (positive z-axis).
SoSFVec3f Coinboard::normal |
The normal per vertex. Will be used when you have as many normals as normal coordinates.
SoMFInt32 Coinboard::numVertices |
To draw several shapes per position, supply the number of vertices for each shape here. The default is one value with -1, which means all coordinates should be used for the one shape specified by the coords field.
SoMFVec3f Coinboard::position |
The positions where shapes should be replicated. Default is [0,0,0].
SoSFEnum Coinboard::shapeType |
Shape type. Default value is TRIANGLES.
SoMFVec4f Coinboard::texCoord |
The texture coordinates per vertex. Will be used when you have as many texture coordinates as normal coordinates.