Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | List of all members
BIAS::Primitives Class Reference

Helper class for creating primitives. More...

#include <OpenGLFramework/Utils/Primitives.hh>

Static Public Member Functions

static void AddPlain2DQuadVertices (float *supplementedArray, unsigned int offset, unsigned int stride)
 Vertex Order:
3–2
| |
0–1
. More...
 
static void AddPlain2DTextureCoordinates (float *supplementedArray, unsigned int offset, unsigned int stride, bool flip=false)
 Vertex Order:
3–2
| |
0–1
. More...
 
static void AddRelativeQuadPatches (const unsigned int referenceWidth, const unsigned int referenceHeight, const std::vector< unsigned int > &posX, const std::vector< unsigned int > &posY, const unsigned int hw, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, const bool flip)
 Calculates 2D patches in the image plane suited for rendering with identity rendering parameters, patches are valid for a reference resolution and symmetrically centered around a pixel position. More...
 
static void AddRelativeQuadPatchOverImageLine (const unsigned int referenceWidth, const unsigned int referenceHeight, const unsigned int linePos, const unsigned int hw, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, const bool flip)
 Adds a patch suited for rendering with identity rendering parameters that exactly fits over an image line in the image plane. More...
 
static void LocalNormalizedPointCloud (const BIAS::ProjectionParametersPerspective &ppp, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, bool normalizeZ, bool invertS)
 
static void LocalNormalizedTriangleMesh (const BIAS::ProjectionParametersPerspective &pppSource, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, bool normalizeZ, bool invertS)
 
static void LocalNormalizedTriangleStrip (const BIAS::ProjectionParametersPerspective &pppSource, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, bool normalizeZ=false)
 
static void LocalNormalizedVertexCloud (const BIAS::ProjectionParametersPerspective &ppp, BIAS::glfVertexBuffer &vb, bool normalizeZ, bool invertS)
 Generates a vertex list of textured 3d vertices. More...
 
static void LocalPerspectivePatches (const BIAS::ProjectionParametersPerspective &ppp, const std::vector< unsigned int > &posX, const std::vector< unsigned int > &posY, const unsigned int hw, glfVertexBuffer &vb, glfElementBuffer &eb)
 
static void LocalPerspectivePatchOverLine (const BIAS::ProjectionParametersPerspective &ppp, const unsigned int posY, const unsigned int hw, glfVertexBuffer &vb, glfElementBuffer &eb)
 Patch encloses a region around a complete image line. More...
 
static void LocalPerspectiveQuad (const BIAS::ProjectionParametersPerspective &ppp, BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb)
 
static void PlainQuad2DWithTexture2D (BIAS::glfVertexBuffer &vb, BIAS::glfElementBuffer &eb, bool flip=false)
 Vertex Order:
3–2
| |
0–1
. More...
 

Detailed Description

Helper class for creating primitives.

Author
bartczak 04/2008

Definition at line 43 of file Primitives.hh.

Member Function Documentation

void Primitives::AddPlain2DQuadVertices ( float *  supplementedArray,
unsigned int  offset,
unsigned int  stride 
)
static

Vertex Order:
3–2
| |
0–1
.

Vertex Coordinates:
(-1, 1) – (1, 1)
| |
| |
| |
(-1,-1) – (1, -1)

Attention
memory space must be allocated properly!

Definition at line 287 of file Primitives.cpp.

void Primitives::AddPlain2DTextureCoordinates ( float *  supplementedArray,
unsigned int  offset,
unsigned int  stride,
bool  flip = false 
)
static

Vertex Order:
3–2
| |
0–1
.

unflipped texture coordinates:
(0,1) – (1,1)
| |
| |
(0,0) – (1,0)

Attention
memory space must be allocated properly!

Definition at line 315 of file Primitives.cpp.

void Primitives::AddRelativeQuadPatches ( const unsigned int  referenceWidth,
const unsigned int  referenceHeight,
const std::vector< unsigned int > &  posX,
const std::vector< unsigned int > &  posY,
const unsigned int  hw,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
const bool  flip 
)
static

Calculates 2D patches in the image plane suited for rendering with identity rendering parameters, patches are valid for a reference resolution and symmetrically centered around a pixel position.

Definition at line 107 of file Primitives.cpp.

References BIAS::glfVertexFormat::AddAttribute(), BIAS::glfVertexFormat::ATTRIB_POSITION, BIAS::glfVertexFormat::ATTRIB_TEXCOORD, BIAS::glfVertexBuffer::Create(), and BIAS::glfElementBuffer::Create().

Referenced by AddRelativeQuadPatchOverImageLine(), and BIAS::SimpleMultiPassFragmentShader::EvaluateOnlyPatches().

void Primitives::AddRelativeQuadPatchOverImageLine ( const unsigned int  referenceWidth,
const unsigned int  referenceHeight,
const unsigned int  linePos,
const unsigned int  hw,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
const bool  flip 
)
static

Adds a patch suited for rendering with identity rendering parameters that exactly fits over an image line in the image plane.

Definition at line 39 of file Primitives.cpp.

References BIAS::glfVertexFormat::AddAttribute(), AddRelativeQuadPatches(), BIAS::glfVertexFormat::ATTRIB_POSITION, BIAS::glfVertexFormat::ATTRIB_TEXCOORD, BIAS::glfVertexBuffer::Create(), and BIAS::glfElementBuffer::Create().

Referenced by BIAS::SimpleMultiPassFragmentShader::EvaluateOnlyLine().

void Primitives::LocalNormalizedPointCloud ( const BIAS::ProjectionParametersPerspective ppp,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
bool  normalizeZ,
bool  invertS 
)
static
void Primitives::LocalNormalizedTriangleMesh ( const BIAS::ProjectionParametersPerspective pppSource,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
bool  normalizeZ,
bool  invertS 
)
static
void Primitives::LocalNormalizedTriangleStrip ( const BIAS::ProjectionParametersPerspective pppSource,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
bool  normalizeZ = false 
)
static
void Primitives::LocalNormalizedVertexCloud ( const BIAS::ProjectionParametersPerspective ppp,
BIAS::glfVertexBuffer vb,
bool  normalizeZ,
bool  invertS 
)
static

Generates a vertex list of textured 3d vertices.

Their vertex coordinates can be interpreted as the optical ray directions belonging to their respective pixel centers in camera coordinates. The vertex array is constructed row wise starting with the top pixel row.

Definition at line 532 of file Primitives.cpp.

References BIAS::glfVertexFormat::AddAttribute(), BIAS::glfVertexFormat::ATTRIB_POSITION, BIAS::glfVertexFormat::ATTRIB_TEXCOORD, BIAS::glfVertexBuffer::Create(), BIAS::ProjectionParametersBase::GetImageSize(), BIAS::HomgPoint2D, and BIAS::ProjectionParametersPerspective::UnProjectLocal().

void Primitives::LocalPerspectivePatches ( const BIAS::ProjectionParametersPerspective ppp,
const std::vector< unsigned int > &  posX,
const std::vector< unsigned int > &  posY,
const unsigned int  hw,
glfVertexBuffer vb,
glfElementBuffer eb 
)
static
void Primitives::LocalPerspectivePatchOverLine ( const BIAS::ProjectionParametersPerspective ppp,
const unsigned int  posY,
const unsigned int  hw,
glfVertexBuffer vb,
glfElementBuffer eb 
)
static
void Primitives::LocalPerspectiveQuad ( const BIAS::ProjectionParametersPerspective ppp,
BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb 
)
static
void Primitives::PlainQuad2DWithTexture2D ( BIAS::glfVertexBuffer vb,
BIAS::glfElementBuffer eb,
bool  flip = false 
)
static

Vertex Order:
3–2
| |
0–1
.

Vertex Coordinates:
(-1, 1) – (1, 1)
| |
| |
| |
(-1,-1) – (1, -1)
unflipped texture coordinates:
(0,1) – (1,1)
| |
| |
(0,0) – (1,0)
Generates the quad.

Definition at line 263 of file Primitives.cpp.

References BIAS::glfVertexFormat::AddAttribute(), BIAS::glfVertexFormat::ATTRIB_POSITION, BIAS::glfVertexFormat::ATTRIB_TEXCOORD, BIAS::glfVertexBuffer::Create(), and BIAS::glfElementBuffer::Create().

Referenced by BIAS::PlainPerPixelProcessing::InitPrimitiveData_(), BIAS::PerPixelProcessingBase::InitPrimitiveData_(), and BIAS::TemplateSpecializedBatch::InitPrimitiveData_().


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