CrystalSpace

Public API Reference

CS::Geometry::TextureMapper Struct Reference

Class for controlling texture mapping on the generated meshes. More...

#include <cstool/primitives.h>

Inheritance diagram for CS::Geometry::TextureMapper:

List of all members.

Public Member Functions

virtual csVector2 Map (const csVector3 &point, const csVector3 &normal, size_t idx)=0
 Map a 3D coordinate and a triangle plane to 2D UV space.

Detailed Description

Class for controlling texture mapping on the generated meshes.

Implement this class and pass it to one of the csPrimitives functions to create a mesh with specific texture mapping requirements.

Definition at line 47 of file primitives.h.


Member Function Documentation

virtual csVector2 CS::Geometry::TextureMapper::Map ( const csVector3 point,
const csVector3 normal,
size_t  idx 
) [pure virtual]

Map a 3D coordinate and a triangle plane to 2D UV space.

Parameters:
point is the point in 3D space.
normal is the normal of the point that we're mapping.
idx is the index in the model.
Returns:
the resulting uv mapping.

Implemented in CS::Geometry::TableTextureMapper, and CS::Geometry::DensityTextureMapper.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1