CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csLightMapMapping Struct Reference

This structure holds mapping information to map the lightmap on a polygon. More...

#include <polygon.h>

List of all members.

Public Methods

float GetFDU () const
 Get the u-value of the textures bounding box' lower left corner. More...

float GetFDV () const
 Get the v-value of the textures bounding box' lower left corner. More...

int GetWidth () const
 Get width of lit texture (power of 2). More...

int GetHeight () const
 Get height of lit texture. More...

int GetShiftU () const
 Get the power of the lowest power of 2 that is not smaller than the texture bounding box' width. More...

int GetIMinU () const
 Get the rounded u-value of the textures bounding box' lower left corner. More...

int GetIMinV () const
 Get the rounded v-value of the textures bounding box' lower left corner. More...

void GetTextureBox (float &fMinU, float &fMinV, float &fMaxU, float &fMaxV) const
 Get texture box. More...

int GetOriginalWidth () const
 Get original width. More...


Public Attributes

csMatrix3 m_obj2tex
 Transformation from object to texture space. More...

csVector3 v_obj2tex
 Translation from object to texture space. More...

int Imin_u
 Bounding box of corresponding polygon in 2D texture space. More...

int Imin_v
 Bounding box of corresponding polygon in 2D texture space. More...

float Fmin_u
 fp bounding box (0..1 texture space). More...

float Fmin_v
 fp bounding box (0..1 texture space). More...

float Fmax_u
 fp bounding box (0..1 texture space). More...

float Fmax_v
 fp bounding box (0..1 texture space). More...

int w
 Width of lighted texture ('w' is a power of 2). More...

int h
 Height of lighted texture. More...

int w_orig
 Original width (not a power of 2) (w_orig <= w). More...


Detailed Description

This structure holds mapping information to map the lightmap on a polygon.

You can get it from the iPolygonTexture below.

Definition at line 310 of file polygon.h.


Member Function Documentation

float csLightMapMapping::GetFDU   const [inline]
 

Get the u-value of the textures bounding box' lower left corner.

Definition at line 349 of file polygon.h.

float csLightMapMapping::GetFDV   const [inline]
 

Get the v-value of the textures bounding box' lower left corner.

Definition at line 351 of file polygon.h.

int csLightMapMapping::GetHeight   const [inline]
 

Get height of lit texture.

Definition at line 355 of file polygon.h.

References h.

int csLightMapMapping::GetIMinU   const [inline]
 

Get the rounded u-value of the textures bounding box' lower left corner.

Definition at line 364 of file polygon.h.

References Imin_u.

int csLightMapMapping::GetIMinV   const [inline]
 

Get the rounded v-value of the textures bounding box' lower left corner.

Definition at line 366 of file polygon.h.

References Imin_v.

int csLightMapMapping::GetOriginalWidth   const [inline]
 

Get original width.

Definition at line 378 of file polygon.h.

References w_orig.

int csLightMapMapping::GetShiftU   const [inline]
 

Get the power of the lowest power of 2 that is not smaller than the texture bounding box' width.

that is: 2^shift_u >= texbbox-width > 2^(shift_u-1)

Definition at line 361 of file polygon.h.

void csLightMapMapping::GetTextureBox float &    fMinU,
float &    fMinV,
float &    fMaxU,
float &    fMaxV
const [inline]
 

Get texture box.

Definition at line 368 of file polygon.h.

References Fmax_u, Fmax_v, Fmin_u, and Fmin_v.

int csLightMapMapping::GetWidth   const [inline]
 

Get width of lit texture (power of 2).

Definition at line 353 of file polygon.h.

References w.


Member Data Documentation

float csLightMapMapping::Fmax_u
 

fp bounding box (0..1 texture space).

Definition at line 327 of file polygon.h.

Referenced by GetTextureBox.

float csLightMapMapping::Fmax_v
 

fp bounding box (0..1 texture space).

Definition at line 327 of file polygon.h.

Referenced by GetTextureBox.

float csLightMapMapping::Fmin_u
 

fp bounding box (0..1 texture space).

Definition at line 327 of file polygon.h.

Referenced by GetTextureBox.

float csLightMapMapping::Fmin_v
 

fp bounding box (0..1 texture space).

Definition at line 327 of file polygon.h.

Referenced by GetTextureBox.

int csLightMapMapping::h
 

Height of lighted texture.

Definition at line 343 of file polygon.h.

Referenced by GetHeight.

int csLightMapMapping::Imin_u
 

Bounding box of corresponding polygon in 2D texture space.

Note that the u-axis of this bounding box is made a power of 2 for efficiency reasons.

Definition at line 324 of file polygon.h.

Referenced by GetIMinU.

int csLightMapMapping::Imin_v
 

Bounding box of corresponding polygon in 2D texture space.

Note that the u-axis of this bounding box is made a power of 2 for efficiency reasons.

Definition at line 324 of file polygon.h.

Referenced by GetIMinV.

csMatrix3 csLightMapMapping::m_obj2tex
 

Transformation from object to texture space.

Definition at line 313 of file polygon.h.

csVector3 csLightMapMapping::v_obj2tex
 

Translation from object to texture space.

Definition at line 315 of file polygon.h.

int csLightMapMapping::w
 

Width of lighted texture ('w' is a power of 2).

Definition at line 340 of file polygon.h.

Referenced by GetWidth.

int csLightMapMapping::w_orig
 

Original width (not a power of 2) (w_orig <= w).

Definition at line 346 of file polygon.h.

Referenced by GetOriginalWidth.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14