GLIP-Lib
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Glip::CorePipeline::GeometryPrimitives::ReversedQuad Class Reference

Geometry : the reversed quad, covering the area between (-1,-1) and (1,1). More...

#include <Geometry.hpp>

Inheritance diagram for Glip::CorePipeline::GeometryPrimitives::ReversedQuad:
Inheritance graph

Public Member Functions

 ReversedQuad (void)
 ReversedQuad constructor.
 
 ReversedQuad (const ReversedQuad &mdl)
 Copy constructor. More...
 
- Public Member Functions inherited from Glip::CorePipeline::GeometryModel
 GeometryModel (const GeometryModel &mdl)
 GeometryModel copy constructor. More...
 
unsigned int getNumVertices (void) const
 Get the number of vertices. More...
 
unsigned int getNumElements (void) const
 Get the number of GL primitives (elements). More...
 
const GLfloat & x (GLuint i) const
 Read the X coordinate of the vertex at given index. More...
 
const GLfloat & y (GLuint i) const
 Read the Y coordinate of the vertex at given index. More...
 
const GLfloat & z (GLuint i) const
 Read the Z coordinate of the vertex at given index. More...
 
const GLfloat & ny (GLuint i) const
 Access the Y coordinate of the normal at given index. More...
 
const GLfloat & u (GLuint i) const
 Access the U coordinate of the texel at given index. More...
 
const GLfloat & v (GLuint i) const
 Access the V coordinate of the texel at given index. More...
 
const GLuint & a (GLuint i) const
 Access the index of the first vertex of the element at given index. More...
 
const GLuint & b (GLuint i) const
 Access the index of the second vertex of the element at given index. More...
 
const GLuint & c (GLuint i) const
 Access the index of the third vertex of the element at given index. More...
 
bool testIndices (void) const
 Test if all the indices are valid. More...
 
bool operator== (const GeometryModel &mdl) const
 Test if two models are identical. More...
 
HdlVBOgetVBO (GLenum freq) const
 Get the VBO corresponding to this model. It is not recommended to use directly the VBO but, instead, use a GeometryInstance object. More...
 

Additional Inherited Members

- Public Types inherited from Glip::CorePipeline::GeometryModel
enum  GeometryType {
  CustomModel,
  StandardQuad,
  ReversedQuad,
  PointsGrid2D,
  PointsGrid3D,
  Unknown
}
 Description of the type of geometry (automatic). More...
 
- Static Public Member Functions inherited from Glip::CorePipeline::GeometryModel
static int getNumVerticesInPrimitive (const GLenum &_primitiveGL)
 Get the number of vertices per element for the given primitive. More...
 
static int getPrimitiveStride (const GLenum &_primitiveGL)
 Get the stride between elements of the given primitive. More...
 
- Public Attributes inherited from Glip::CorePipeline::GeometryModel
const GeometryType type
 Geometry Type.
 
const bool hasNormals
 True if it has texture coordinates attached.
 
const bool hasTexCoords
 Dimension of the geometry (either 2 or 3).
 
const int dim
 True if it has normals data attached.
 
const int numVerticesPerElement
 Number of vertices per elements of the geometry.
 
const int elementStride
 Stride between the elements.
 
const GLenum primitiveGL
 ID of the primitive for GL.
 
- Protected Member Functions inherited from Glip::CorePipeline::GeometryModel
 GeometryModel (GeometryType _type, int _dim, GLenum _primitiveGL, bool _hasNormals, bool _hasTexCoords)
 Geometry model constructor. More...
 
void reserveVertices (size_t nVertices)
 Prepare the memory to receive a number of vertices. More...
 
void increaseVerticesReservation (size_t nNewVertices)
 Prepare the memory to receive a new number of vertices. More...
 
void reserveElements (size_t nVertices)
 Prepare the memory to receive a number of elements. More...
 
void increaseElementsReservation (size_t nNewVertices)
 Prepare the memory to receive a new number of elements. More...
 
void addVertices2DInterleaved (const size_t N, const GLfloat *interleavedXY, const GLfloat *interleavedNormalsXY=NULL, const GLfloat *interleavedUV=NULL)
 Add multiple vertives in a two dimensions space (GeometryModel::dim must be equal to 2). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
void addVertices2D (const size_t N, const GLfloat *x, const GLfloat *y, const GLfloat *nx=NULL, const GLfloat *ny=NULL, const GLfloat *u=NULL, const GLfloat *v=NULL)
 Add multiple vertices in a two dimensions space (GeometryModel::dim must be equal to 2). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
GLuint addVertex2D (const GLfloat &x, const GLfloat &y, const GLfloat &nx=0.0f, const GLfloat &ny=0.0f, const GLfloat &u=0.0f, const GLfloat &v=0.0f)
 Add a vertex in a two dimensions space (GeometryModel::dim must be equal to 2). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
void addVertices3DInterleaved (const size_t N, const GLfloat *interleavedXYZ, const GLfloat *interleavedNormalsXYZ=NULL, const GLfloat *interleavedUV=NULL)
 Add multiple vertices in a three dimensions space (GeometryModel::dim must be equal to 3). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
void addVertices3D (const size_t N, const GLfloat *x, const GLfloat *y, const GLfloat *z, const GLfloat *nx=NULL, const GLfloat *ny=NULL, const GLfloat *nz=NULL, const GLfloat *u=NULL, const GLfloat *v=NULL)
 Add multiple vertices in a three dimensions space (GeometryModel::dim must be equal to 3). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
GLuint addVertex3D (const GLfloat &x, const GLfloat &y, const GLfloat &z, const GLfloat &nx=0.0f, const GLfloat &ny=0.0f, const GLfloat &nz=0.0f, const GLfloat &u=0.0f, const GLfloat &v=0.0f)
 Add a vertex in a three dimensions space (GeometryModel::dim must be equal to 3). If GeometryModel::hasTexCoords is true, then it will also use u and v to create a texel coordinate. More...
 
void addElementsInterleaved (const size_t N, GLuint *interleavedIndices)
 Add primitive elements to the model. More...
 
void addElements (const size_t N, GLuint *a, GLuint *b=NULL, GLuint *c=NULL, GLuint *d=NULL)
 Add primitive elements to the model. More...
 
GLuint addElement (GLuint a)
 Add a primitive element to the model. More...
 
GLuint addElement (GLuint a, GLuint b)
 Add a primitive element to the model. More...
 
GLuint addElement (GLuint a, GLuint b, GLuint c)
 Add a primitive element to the model. More...
 
GLuint addElement (GLuint a, GLuint b, GLuint c, GLuint d)
 Add a primitive element to the model. More...
 
GLuint addElement (const std::vector< GLuint > &indices)
 Add (a) primitive element(s) to the model. More...
 
GLfloat & x (GLuint i)
 Access the X coordinate of the vertex at given index. More...
 
GLfloat & y (GLuint i)
 Access the Y coordinate of the vertex at given index. More...
 
GLfloat & z (GLuint i)
 Access the Z coordinate of the vertex at given index. More...
 
GLfloat & nx (GLuint i)
 Access the X coordinate of the normal at given index. More...
 
GLfloat & ny (GLuint i)
 Access the Y coordinate of the normal at given index. More...
 
GLfloat & u (GLuint i)
 Access the U coordinate of the texel at given index. More...
 
GLfloat & v (GLuint i)
 Access the V coordinate of the texel at given index. More...
 
GLuint & a (GLuint i)
 Access the index of the first vertex of the element at given index. More...
 
GLuint & b (GLuint i)
 Access the index of the second vertex of the element at given index. More...
 
GLuint & c (GLuint i)
 Access the index of the third vertex of the element at given index. More...
 
void generateNormals (void)
 Automatically generate the normals. More...
 

Detailed Description

Geometry : the reversed quad, covering the area between (-1,-1) and (1,1).

Constructor & Destructor Documentation

ReversedQuad::ReversedQuad ( const ReversedQuad mdl)

Copy constructor.

Parameters
mdlOriginal model.

The documentation for this class was generated from the following files: