# 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:

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 mat4 & | matrix () const
const TextureMatrix & | setMatrix (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

mat4 vl::TextureMatrix::mMatrix`[protected]`

bool vl::TextureMatrix::mUseCameraRotationInverse`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Shader.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Shader.cpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:41 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.