Boolean AND operation of two shapes. More...
#include <BooleanAnd.hpp>
Public Member Functions | |
BooleanAnd (const Tag &tag) | |
virtual void | associate () |
virtual void | draw () const |
Static Public Member Functions | |
static ShapeTraits | getTraits () |
Protected Member Functions | |
virtual void | calculateTangible () |
virtual void | renameUniforms () |
virtual void | updateBufferPoints () |
virtual void | updateBufferCoords () |
Private Attributes | |
GLfloat | points [24][3] |
GLfloat | coords [2][24][3] |
Boolean AND operation of two shapes.
XML Name
XML Attributes
operation | AND |
of | Name of a group to get shapes from |
selectable | If resulting polygons should be selectable |
XML Example
Vertex Attributes
MCVertex | Point at the vertex. |
MCNormal | Normal at the vertex. |
TexCoord0 | Texture coordinates of the first shape. |
TexCoord1 | Texture coordinates of the second shape. |
In addition, BooleanAnd will copy the uniforms of shapes in the group it is linked to, appending the index of the shape in the group to the end of the uniform's name. For instance, if the first shape in the group has a uniform named Color, the resulting uniform under BooleanAnd will be Color0. Note however that it will only copy the uniforms that are children of the shape, not ones that are siblings.
If the user wishes the resulting polygons to be in the same place as the shapes they were generated from, the user should not perform any transformations on the boolean, as the points are outputted in modelview space. The user should be sure to provide a uniform specifying the modelview projection matrix however.
void associate | ( | ) | [virtual] |
Calls base then renames the uniforms.
Reimplemented from Boolean.
void calculateTangible | ( | ) | [protected, virtual] |
Checks that the shape formed by the operation can be shown.
Implements Boolean.
void draw | ( | ) | const [virtual] |
Applies all the copied uniforms, then calls base.
Reimplemented from Boolean.
ShapeTraits getTraits | ( | ) | [static] |
Reimplemented from Hexahedron.
void renameUniforms | ( | ) | [protected, virtual] |
Appends index number to each uniform so they can be used simultaneously.
void updateBufferCoords | ( | ) | [protected, virtual] |
Updates the texture coordinates in the vertex buffer.
Implements Hexahedron.
void updateBufferPoints | ( | ) | [protected, virtual] |
Updates the points in the vertex buffer.
6-------7 /| /| 2-------3 | | 4-----|-5 |/ |/ 0-------1
Reimplemented from Hexahedron.