Box Class Reference
[Basic]

Six-sided shape with 2D texture coordinates for each face. More...

#include <Box.hpp>

Inheritance diagram for Box:
Hexahedron Shape SimpleDrawable SimpleTransformable Drawable Node Transformable NodeListener Identifiable

List of all members.

Public Member Functions

 Box (const Tag &tag)

Protected Member Functions

virtual void updateBufferCoords ()

Detailed Description

Six-sided shape with 2D texture coordinates for each face.


Member Function Documentation

void updateBufferCoords (  )  [protected, virtual]

Initializes the coordinates in the vertex buffer.

The following 2D texture coordinates are stored in an array as follows.

      01-----11      2-------3
      |       |      |       |
      |       |      |       |
      00-----10      0-------1
 

They are applied to the vertices in the vertex buffer as depicted in the following diagram. Numbers on the left are the indices of the vertices, while numbers on the right correspond to the positions in the texture coordinate array above.

            INDICES                COORDINATES
              +-------+              +-------+
             /|      /|             /|      /|
            1-------0 |            2-------3 |
     FRONT  | +-----|-+            | +-----|-+
            |/      |/             |/      |/ 
            2-------3              0-------1
              4-------5              3-------2
             /|      /|             /|      /|
            +-------+ |            +-------+ |
     BACK   | 7-----|-6            | 1-----|-0
            |/      |/             |/      |/ 
            +-------+              +-------+
              9-------+              2-------+
             /|      /|             /|      /|
            8-------+ |            3-------+ |
     LEFT   | 10----|-+            | 0-----|-+
            |/      |/             |/      |/ 
            11------+              1-------+
              +------12              +-------3
             /|      /|             /|      /|
            +------13 |            +-------2 |
     RIGHT  | +-----|15            | +-----|-1
            |/      |/             |/      |/ 
            +------14              +-------0
              17-----16              2-------3
             /|      /|             /|      /|
            18-----19 |            0-------1 |
     TOP    | +-----|-+            | +-----|-+
            |/      |/             |/      |/ 
            +-------+              +-------+
              +-------+              +-------+
             /|      /|             /|      /|
            +-------+ |            +-------+ |
     BOTTOM | 22----|23            | 0-----|-1
            |/      |/             |/      |/ 
            21-----20              2-------3  
 

Implements Hexahedron.


The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:35 2010 for Gander by  doxygen 1.6.3