Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]

vl::TextureMatrix Class Reference

The TextureMatrix class uses a 4x4 matrix to transform the texture coordinates of a texture unit. More...

#include <Shader.hpp>

Inheritance diagram for vl::TextureMatrix:

vl::RenderState vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 TextureMatrix (int texunit)
virtual ERenderState type () const
virtual void apply (const Camera *) const
const mat4matrix () const
const TextureMatrixsetMatrix (const mat4 &matrix)
void setUseCameraRotationInverse (bool use)
 Set this to true when you want your cubemap to appear in world space rather than eye space.
bool useCameraRotationInverse () const

Protected Attributes

mat4 mMatrix
bool mUseCameraRotationInverse


Detailed Description

The TextureMatrix class uses a 4x4 matrix to transform the texture coordinates of a texture unit.

See also:
Shader, TextureUnit, Texture, TexGen, TexParameter, Effect, Actor

Constructor & Destructor Documentation

vl::TextureMatrix::TextureMatrix ( int  texunit  )  [inline]


Member Function Documentation

virtual const char* vl::TextureMatrix::className (  )  [inline, virtual]

Returns the name of the class.

Reimplemented from vl::RenderState.

virtual ERenderState vl::TextureMatrix::type (  )  const [inline, virtual]

Reimplemented from vl::RenderState.

void TextureMatrix::apply ( const Camera camera  )  const [virtual]

Implements vl::RenderState.

const mat4& vl::TextureMatrix::matrix (  )  const [inline]

const TextureMatrix& vl::TextureMatrix::setMatrix ( const mat4 matrix  )  [inline]

void vl::TextureMatrix::setUseCameraRotationInverse ( bool  use  )  [inline]

Set this to true when you want your cubemap to appear in world space rather than eye space.

When setUseCameraRotationInverse() is true the texture matrix is computed as:

 matrix()*camera->inverseViewMatrix().as3x3() 
This way matrix() represents the transform of the texture in world coordinates, for example if you want to reorient your cubemap in world space or when you want to rotate the direction of one or more highlights prerendered in a cubemap.

bool vl::TextureMatrix::useCameraRotationInverse (  )  const [inline]


Member Data Documentation


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

Visualization Library v2010.06 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Tue Jun 1 00:57:24 2010.
Permission is granted to use this page to write and publish articles regarding Visualization Library.