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

A 4x4 matrix in native OpenGL format. More...

#include <OpenGLFramework/Base/glfMatrix.hh>

+ Inheritance diagram for BIAS::glfMatrix:
+ Collaboration diagram for BIAS::glfMatrix:

Public Member Functions

const GLfloat * GetArray () const
 
 glfMatrix ()
 The constructor leaves the matrix undefined! More...
 
 glfMatrix (GLfloat m0, GLfloat m1, GLfloat m2, GLfloat m3, GLfloat m4, GLfloat m5, GLfloat m6, GLfloat m7, GLfloat m8, GLfloat m9, GLfloat m10, GLfloat m11, GLfloat m12, GLfloat m13, GLfloat m14, GLfloat m15)
 Constructor that initializes the entries of the matrix. More...
 
virtual void Load () const
 Loads the matrix in OpenGL. More...
 
void MakeAffineInverse (const glfMatrix &a)
 Computes the inverse of the matrix, assuming it is an affine transformation with an orthonormal linear part. More...
 
virtual ~glfMatrix ()
 
Initialization methods similar to glIdentity, glRotate etc.
void MakeIdentity ()
 
void MakeRotation (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 
void MakeTranslation (GLfloat x, GLfloat y, GLfloat z)
 
void MakeScalation (GLfloat x, GLfloat y, GLfloat z)
 
void MakeFrustum (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal)
 
void MakeOrtho (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal)
 
void MakePerspective (GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
 
void MakeLookAt (GLfloat eyeX, GLfloat eyeY, GLfloat eyeZ, GLfloat centerX, GLfloat centerY, GLfloat centerZ, GLfloat upX, GLfloat upY, GLfloat upZ)
 
void Make (const Matrix4x4< float > &a)
 Initializes the glf matrix from a BIAS matrix. More...
 
void Make (const Matrix4x4< double > &a)
 
void MakeAffine (const Matrix3x3< float > &r, const Vector3< float > &t)
 Initializes the render matrix as an affine mapping. More...
 
void MakeAffine (const Matrix3x3< double > &r, const Vector3< double > &t)
 
void MakeTextureMatrix (const ProjectionParametersPerspective &params, bool flip=false)
 Conversion from ProjectionParametersPerspective. More...
 
void MakeViewMatrix (const ProjectionParametersBase &params)
 
void MakeViewMatrixNew (const ProjectionParametersBase &params)
 
void MakeProjectionMatrix (const ProjectionParametersPerspective &params, GLfloat nearZZ, GLfloat farZ, bool useIdealK=false)
 
void MakeProjectionMatrix (ProjectionParametersPerspective params, GLfloat nearZ, GLfloat farZ, unsigned int x0, unsigned int y0, unsigned int width, unsigned int height, bool useIdealK=false)
 
void MakeProjectionMatrixNew (const ProjectionParametersPerspective &params, GLfloat nearZ, GLfloat farZ, unsigned int x0, unsigned int y0, unsigned int width, unsigned int height, bool useIdealK=false, bool flip=false)
 
void MakeProjectionMatrixNew (const ProjectionParametersPerspective &params, GLfloat nearZ, GLfloat farZ, bool flip=false)
 
void MakeTextureMatrixNew (const ProjectionParametersPerspective &params, bool flip)
 
void TransformPoint (const Vector3< float > &in, Vector3< float > &out) const
 Transforms a point by the matrix. More...
 
void TransformPoint (const Vector3< double > &in, Vector3< double > &out) const
 
Matrix multiplications.
void Multiply (const glfMatrix &a)
 
void operator*= (const glfMatrix &a)
 
glfMatrix operator* (const glfMatrix &a)
 
void Multiply (Vector4< float > vIn, Vector4< float > &vOut)
 
void Multiply (Vector4< double > vIn, Vector4< double > &vOut)
 

Static Public Member Functions

static unsigned int Matrix2DIndexToRep (unsigned int row, unsigned int column)
 

Static Public Attributes

static const glfMatrix IDENTITY
 The identity matrix. More...
 

Friends

std::ostream & operator<< (std::ostream &s, const glfMatrix &m)
 

Detailed Description

A 4x4 matrix in native OpenGL format.

Author
jkollmann

Definition at line 41 of file glfMatrix.hh.

Constructor & Destructor Documentation

glfMatrix::glfMatrix ( )

The constructor leaves the matrix undefined!

Definition at line 57 of file glfMatrix.cpp.

glfMatrix::glfMatrix ( GLfloat  m0,
GLfloat  m1,
GLfloat  m2,
GLfloat  m3,
GLfloat  m4,
GLfloat  m5,
GLfloat  m6,
GLfloat  m7,
GLfloat  m8,
GLfloat  m9,
GLfloat  m10,
GLfloat  m11,
GLfloat  m12,
GLfloat  m13,
GLfloat  m14,
GLfloat  m15 
)

Constructor that initializes the entries of the matrix.

Definition at line 61 of file glfMatrix.cpp.

virtual BIAS::glfMatrix::~glfMatrix ( )
inlinevirtual

Definition at line 57 of file glfMatrix.hh.

Member Function Documentation

const GLfloat* BIAS::glfMatrix::GetArray ( ) const
inline

Definition at line 171 of file glfMatrix.hh.

Referenced by BIAS::glfShaderProgram::SetUniform().

void glfMatrix::Load ( ) const
virtual

Loads the matrix in OpenGL.

Reimplemented in BIAS::glfPassiveRenderMatrix.

Definition at line 540 of file glfMatrix.cpp.

Referenced by BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_().

void glfMatrix::Make ( const Matrix4x4< float > &  a)

Initializes the glf matrix from a BIAS matrix.

Definition at line 193 of file glfMatrix.cpp.

Referenced by Make(), MakeProjectionMatrix(), MakeProjectionMatrixNew(), MakeTextureMatrix(), MakeTextureMatrixNew(), MakeViewMatrix(), and MakeViewMatrixNew().

void glfMatrix::Make ( const Matrix4x4< double > &  a)

Definition at line 201 of file glfMatrix.cpp.

References Make().

void glfMatrix::MakeAffine ( const Matrix3x3< float > &  r,
const Vector3< float > &  t 
)

Initializes the render matrix as an affine mapping.

Definition at line 206 of file glfMatrix.cpp.

Referenced by MakeAffine().

void glfMatrix::MakeAffine ( const Matrix3x3< double > &  r,
const Vector3< double > &  t 
)

Definition at line 214 of file glfMatrix.cpp.

References MakeAffine().

void glfMatrix::MakeAffineInverse ( const glfMatrix a)

Computes the inverse of the matrix, assuming it is an affine transformation with an orthonormal linear part.

Definition at line 219 of file glfMatrix.cpp.

void glfMatrix::MakeFrustum ( GLfloat  left,
GLfloat  right,
GLfloat  bottom,
GLfloat  top,
GLfloat  nearVal,
GLfloat  farVal 
)

Definition at line 115 of file glfMatrix.cpp.

void glfMatrix::MakeIdentity ( )
void glfMatrix::MakeLookAt ( GLfloat  eyeX,
GLfloat  eyeY,
GLfloat  eyeZ,
GLfloat  centerX,
GLfloat  centerY,
GLfloat  centerZ,
GLfloat  upX,
GLfloat  upY,
GLfloat  upZ 
)
void glfMatrix::MakeOrtho ( GLfloat  left,
GLfloat  right,
GLfloat  bottom,
GLfloat  top,
GLfloat  nearVal,
GLfloat  farVal 
)

Definition at line 131 of file glfMatrix.cpp.

void glfMatrix::MakePerspective ( GLfloat  fovy,
GLfloat  aspect,
GLfloat  zNear,
GLfloat  zFar 
)

Definition at line 147 of file glfMatrix.cpp.

void glfMatrix::MakeProjectionMatrix ( const ProjectionParametersPerspective params,
GLfloat  nearZZ,
GLfloat  farZ,
bool  useIdealK = false 
)
void glfMatrix::MakeProjectionMatrix ( ProjectionParametersPerspective  params,
GLfloat  nearZ,
GLfloat  farZ,
unsigned int  x0,
unsigned int  y0,
unsigned int  width,
unsigned int  height,
bool  useIdealK = false 
)
void glfMatrix::MakeProjectionMatrixNew ( const ProjectionParametersPerspective params,
GLfloat  nearZ,
GLfloat  farZ,
unsigned int  x0,
unsigned int  y0,
unsigned int  width,
unsigned int  height,
bool  useIdealK = false,
bool  flip = false 
)
void glfMatrix::MakeProjectionMatrixNew ( const ProjectionParametersPerspective params,
GLfloat  nearZ,
GLfloat  farZ,
bool  flip = false 
)
void glfMatrix::MakeRotation ( GLfloat  angle,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 77 of file glfMatrix.cpp.

void glfMatrix::MakeScalation ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 107 of file glfMatrix.cpp.

void glfMatrix::MakeTextureMatrix ( const ProjectionParametersPerspective params,
bool  flip = false 
)

Conversion from ProjectionParametersPerspective.

Parameters
fliphas to be used if a gl rendered texture is used but BIAS ProjectionParameters, since up and down interpretation is the other way around (got it?). flip does not have to be true if an BIAS image is uploaded without a previous call to BIAS::ImageBase::Flip(). (However it afterall depends on what you want to achieve!)

Definition at line 231 of file glfMatrix.cpp.

References BIAS::CoordinateTransform3D::GetGlobalToLocalTransform(), BIAS::ProjectionParametersBase::GetImageSize(), BIAS::ProjectionParametersPerspective::GetK(), BIAS::ProjectionParametersBase::GetPose(), Make(), BIAS::Matrix4x4< T >::Mult(), and BIAS::Matrix< T >::SetZero().

void glfMatrix::MakeTextureMatrixNew ( const ProjectionParametersPerspective params,
bool  flip 
)
void glfMatrix::MakeTranslation ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 99 of file glfMatrix.cpp.

Referenced by MakeLookAt().

void glfMatrix::MakeViewMatrix ( const ProjectionParametersBase params)
void glfMatrix::MakeViewMatrixNew ( const ProjectionParametersBase params)
unsigned int glfMatrix::Matrix2DIndexToRep ( unsigned int  row,
unsigned int  column 
)
static

Definition at line 524 of file glfMatrix.cpp.

Referenced by Multiply().

void glfMatrix::Multiply ( const glfMatrix a)

Definition at line 499 of file glfMatrix.cpp.

void BIAS::glfMatrix::Multiply ( Vector4< float >  vIn,
Vector4< float > &  vOut 
)
void glfMatrix::Multiply ( BIAS::Vector4< double >  vIn,
BIAS::Vector4< double > &  vOut 
)

Definition at line 529 of file glfMatrix.cpp.

References Matrix2DIndexToRep().

glfMatrix glfMatrix::operator* ( const glfMatrix a)

Definition at line 509 of file glfMatrix.cpp.

void glfMatrix::operator*= ( const glfMatrix a)

Definition at line 504 of file glfMatrix.cpp.

void glfMatrix::TransformPoint ( const Vector3< float > &  in,
Vector3< float > &  out 
) const

Transforms a point by the matrix.

Definition at line 480 of file glfMatrix.cpp.

Referenced by TransformPoint().

void glfMatrix::TransformPoint ( const Vector3< double > &  in,
Vector3< double > &  out 
) const

Definition at line 492 of file glfMatrix.cpp.

References TransformPoint().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const glfMatrix m 
)
friend

Definition at line 160 of file glfMatrix.hh.

Member Data Documentation

const glfMatrix glfMatrix::IDENTITY
static

The identity matrix.

Definition at line 158 of file glfMatrix.hh.

Referenced by BIAS::glfBatch::glfBatch(), and MakeIdentity().


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