Back to bsyte

TextureMapper Class Reference

Projiziert eine Texture aus dem 3D Raum in den 2D Raum. More...

#include <TextureMapper.h>

Collaboration diagram for TextureMapper:

List of all members.

Public Member Functions

void dump ()
 Dump.
virtual ~TextureMapper ()
 Destruktor.
void useZBuffer (bool useZBuffer)
 useZBuffer
void render (float d, Triangle &t, BYTE *pane, float *ZBuffer, int width, int height)

Static Public Member Functions

static TextureMappergetInstance ()
 Liefert die Singleton-Instanz.

Public Attributes

Vec m_p0
Vec m_p1
Vec m_p2
float m_d
float x0
float y0
float z0
float c0
float uc0
float vc0
float x1
float y1
float z1
float c1
float uc1
float vc1
float x2
float y2
float z2
float c2
float uc2
float vc2

Protected Member Functions

 TextureMapper ()
 Konstruktor.

Private Member Functions

void project (float d, Vec p0, Vec p1, Vec p2)
void addOffset ()
void sortVertices ()
void gradients ()
void render ()
void renderSegment (int y1, int y2)
void renderLine (int y, int x1, int x2, float cs, float ucs, float vcs)
 Mit Z-Buffer und für 3-Byte Pixel (RGB)
void renderLine_Alpha (int y, int x1, int x2, float cs, float ucs, float vcs)
 Mit Z-Buffer und für 4-Byte Pixel (RGBA01)
void renderLine_NoZBuffer (int y, int x1, int x2, float cs, float ucs, float vcs)
 Ohne Z-Buffer und nur fuer 3-Byte Pixel (RGB)

Private Attributes

Trianglem_tri
int m_xmax
int m_ymax
int m_tex_width
int m_tex_height
BYTE m_rgbIntensity [256][256]
bool debugFlag
int msg_count
Texturem_tex
Surfacem_surface
int m_height
int m_height_1
int m_width
int m_alpha
float * m_ZBuffer
float dc_dx
float dc_dy
float duc_dx
float duc_dy
float dvc_dx
float dvc_dy
float dx_dy_a
float dc_dy_a
float duc_dy_a
float dvc_dy_a
float dx_dy_b
float dc_dy_b
float duc_dy_b
float dvc_dy_b
float xa
float xb
float ca
float uca
float vca
BYTE * m_planePixels
bool m_useZBuffer

Static Private Attributes

static TextureMapper_instance = 0

Detailed Description

Projiziert eine Texture aus dem 3D Raum in den 2D Raum.


Constructor & Destructor Documentation

TextureMapper::TextureMapper ( ) [protected]

Konstruktor.

Here is the call graph for this function:

Here is the caller graph for this function:

TextureMapper::~TextureMapper ( ) [virtual]

Destruktor.


Member Function Documentation

void TextureMapper::addOffset ( ) [private]

Here is the caller graph for this function:

void TextureMapper::dump ( void  )

Dump.

Here is the call graph for this function:

TextureMapper * TextureMapper::getInstance ( ) [static]

Liefert die Singleton-Instanz.

Returns:
Pointer auf die Instanz

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureMapper::gradients ( ) [private]

Here is the caller graph for this function:

void TextureMapper::project ( float  d,
Vec  p0,
Vec  p1,
Vec  p2 
) [private]

Here is the caller graph for this function:

void TextureMapper::render ( ) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureMapper::render ( float  d,
Triangle t,
BYTE *  pane,
float *  ZBuffer,
int  width,
int  height 
)

Here is the call graph for this function:

void TextureMapper::renderLine ( int  y,
int  x1,
int  x2,
float  cs,
float  ucs,
float  vcs 
) [inline, private]

Mit Z-Buffer und für 3-Byte Pixel (RGB)

Here is the caller graph for this function:

void TextureMapper::renderLine_Alpha ( int  y,
int  x1,
int  x2,
float  cs,
float  ucs,
float  vcs 
) [inline, private]

Mit Z-Buffer und für 4-Byte Pixel (RGBA01)

Here is the caller graph for this function:

void TextureMapper::renderLine_NoZBuffer ( int  y,
int  x1,
int  x2,
float  cs,
float  ucs,
float  vcs 
) [inline, private]

Ohne Z-Buffer und nur fuer 3-Byte Pixel (RGB)

Here is the caller graph for this function:

void TextureMapper::renderSegment ( int  y1,
int  y2 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureMapper::sortVertices ( ) [private]

Here is the caller graph for this function:

void TextureMapper::useZBuffer ( bool  useZBuffer)

useZBuffer

Here is the caller graph for this function:


Member Data Documentation

TextureMapper * TextureMapper::_instance = 0 [static, private]
float TextureMapper::ca [private]
float TextureMapper::dc_dx [private]
float TextureMapper::dc_dy [private]
float TextureMapper::dc_dy_a [private]
float TextureMapper::dc_dy_b [private]
bool TextureMapper::debugFlag [private]
float TextureMapper::duc_dx [private]
float TextureMapper::duc_dy [private]
float TextureMapper::duc_dy_a [private]
float TextureMapper::duc_dy_b [private]
float TextureMapper::dvc_dx [private]
float TextureMapper::dvc_dy [private]
float TextureMapper::dvc_dy_a [private]
float TextureMapper::dvc_dy_b [private]
float TextureMapper::dx_dy_a [private]
float TextureMapper::dx_dy_b [private]
int TextureMapper::m_alpha [private]
int TextureMapper::m_height [private]
BYTE TextureMapper::m_rgbIntensity[256][256] [private]
int TextureMapper::m_width [private]
int TextureMapper::m_xmax [private]
int TextureMapper::m_ymax [private]
float* TextureMapper::m_ZBuffer [private]
int TextureMapper::msg_count [private]
float TextureMapper::uca [private]
float TextureMapper::vca [private]
float TextureMapper::xa [private]
float TextureMapper::xb [private]

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