7 #ifndef CAFU_SURFACE_INFO_HPP_INCLUDED
8 #define CAFU_SURFACE_INFO_HPP_INCLUDED
10 #include "Math3D/Plane3.hpp"
11 #include "Templates/Array.hpp"
32 float& operator [] (
unsigned long Index)
35 return Index==0 ? u : v;
38 const float& operator [] (
unsigned long Index)
const
41 return Index==0 ? u : v;
66 void Save_cmap(std::ostream& OutFile)
const;
Definition: SurfaceInfo.hpp:26
void Save_cmap(std::ostream &OutFile) const
Serializes this instance into a cmap file.
Definition: SurfaceInfo.cpp:111
This class holds all information that is needed in order to compute the UV texture-space coordinates ...
Definition: SurfaceInfo.hpp:51
void RotateUVAxes(float Angle)
Rotates the texture-space u- and v-axes by the given angle.
Definition: SurfaceInfo.cpp:197
void WrapTranslations()
Wraps the Trans[] members so that they are in the interval [0, 1[.
Definition: SurfaceInfo.cpp:188
static SurfaceInfoT Create_cmap(TextParserT &TP)
Named constructor for loading a SurfaceInfoT from a cmap file.
Definition: SurfaceInfo.cpp:48
void ResetUVAxes(const Plane3fT &Plane, bool FaceAligned)
Resets the texture-space u- and v-axes as appropriate for the given plane.
Definition: SurfaceInfo.cpp:164
SurfaceInfoT()
The default constructor.
Definition: SurfaceInfo.cpp:16
void AlignMaterial(const char *AlignKey, const ArrayT< Vector3fT > &Vertices)
Changes this SurfaceInfoT so that the material is aligned on the surface according to AlignKey...
Definition: SurfaceInfo.cpp:209
TexCoordGenModeT TexCoordGenMode
Determines the algorithm that is used to generate texture-coordinates for the associated map primitiv...
Definition: SurfaceInfo.hpp:86
Definition: Renderer.hpp:16
This is a class for parsing text.
Definition: TextParser.hpp:21