Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csPolyTexFlat Class Reference

This structure contains all required information for flat-shaded (do not mix with flat-colored!) texture mapped (or flat-shaded) polygons. More...

#include <polygon.h>

Inheritance diagram for csPolyTexFlat:

csPolyTexType iPolyTexType iBase csPolyTexGouraud List of all members.

Public Methods

virtual int GetTextureType ()
 Return a type for the kind of texturing used.

void Setup (csPolygon3D *iParent)
 Setup this lighting structure with the right number of vertices, taken from parent object. More...

virtual void Setup (iPolygon3D *iParent)
 Setup this lighting structure with the right number of vertices, taken from parent object. More...

virtual void SetUV (int i, float u, float v)
 Set an (u,v) texture coordinate for the specified vertex of this polygon. More...

virtual void ClearUV ()
 Clear all (u,v) coordinates.

virtual csVector2GetUVCoords ()
 Get the pointer to the vertex uv coordinates.

 SCF_DECLARE_IBASE_EXT (csPolyTexType)

Public Attributes

csPolyTexFlat::eiPolyTexFlat  scfiPolyTexFlat

Protected Methods

 csPolyTexFlat ()
 Constructor.

virtual ~csPolyTexFlat ()
 Destructor.


Friends

class  csPolygon3D

Detailed Description

This structure contains all required information for flat-shaded (do not mix with flat-colored!) texture mapped (or flat-shaded) polygons.


Member Function Documentation

void csPolyTexFlat::SetUV ( int i,
float u,
float v ) [virtual]
 

Set an (u,v) texture coordinate for the specified vertex of this polygon.

This function may only be called after all vertices have been added. As soon as this function is used this polygon will be rendered using a different technique (perspective incorrect texture mapping and Gouroud shading). This is useful for triangulated objects for which the triangles are very small and also for drawing very far away polygons for which perspective correctness is not needed (sky polygons for example).

void csPolyTexFlat::Setup ( iPolygon3D * iParent ) [virtual]
 

Setup this lighting structure with the right number of vertices, taken from parent object.

The contents of U/V array are not destroyed, if it was previously allocated.

Reimplemented in csPolyTexGouraud.

void csPolyTexFlat::Setup ( csPolygon3D * iParent )
 

Setup this lighting structure with the right number of vertices, taken from parent object.

The contents of U/V array are not destroyed, if it was previously allocated.

Reimplemented in csPolyTexGouraud.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000