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

Polygon Class Reference

Simply a polygon-class. More...

#include <polygon.h>

List of all members.

Public Methods

 Polygon (Mesh *p, RV_Poly *d)
 Polygon (Mesh *, FILE *, bool is_IM, bool is_Instance)
 Polygon (Mesh *, Polygon *)
void setTransparency (rvulong)
void setSurface (rvlong)
void turnInvisible (void)
bool isInvisible (void)
void setNoColl (void)
bool isNoColl (void)
int numverts (void)
void setTEColor (rvulong)
void write (FILE *, bool is_IM, bool is_Instance)
int detTEPart (void)
void shiftVIndices (rvushort)
bool isInTexture (rvshort page, rvfloat ulo, rvfloat uhi, rvfloat vlo, rvfloat vhi)
int vertidx (int)

Public Attributes

Meshparent
rvlong surface
rvlong ncp_type
EnvMapType envmap
RVColor env_color
RV_Poly data
rvfloat lower_coll

Private Methods

bool teheur_BlueWall (void)
bool teheur_Lamp (void)
bool teheur_Floor (void)
bool teheur_Floor2 (void)
bool teheur_RWall (void)
bool teheur_Box (void)
bool teheur_CarImage (void)
bool teheur_Pipe (void)
bool teheur_BCeil (void)
bool teheur_BRail (void)

Friends

class  PolygonModifier


Detailed Description

Simply a polygon-class.


Constructor & Destructor Documentation

Polygon::Polygon ( Mesh * m,
RV_Poly * d )
 

Polygon::Polygon ( Mesh * p,
FILE * f,
bool is_IM,
bool is_Instance )
 

Polygon::Polygon ( Mesh * m,
Polygon * p )
 

ctor.

creates an exact copy. Only difference is the parent pointer.


Member Function Documentation

int Polygon::detTEPart ( void )
 

obsolete

bool Polygon::isInTexture ( rvshort page,
rvfloat ulo,
rvfloat uhi,
rvfloat vlo,
rvfloat vhi )
 

bool Polygon::isInvisible ( void )
 

bool Polygon::isNoColl ( void )
 

int Polygon::numverts ( void )
 

number of vertices for this polygon

Returns:
  • 3 if poly is a triangle
  • 4 if poly is a quad

void Polygon::setNoColl ( void )
 

void Polygon::setSurface ( rvlong s )
 

sets the surface type for the polygon

void Polygon::setTEColor ( rvulong color )
 

void Polygon::setTransparency ( rvulong t )
 

sets the transparency for the whole polygon, and sets the bits for alpha-channel based transparency

If argument is 255, disables transparency and clears the transparency-bits

void Polygon::shiftVIndices ( rvushort plus )
 

bool Polygon::teheur_BCeil ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "bridge ceiling". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_BRail ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "bridge railing". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_BlueWall ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "blue wall". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_Box ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "box pile". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_CarImage ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "car images". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_Floor ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "green floor". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_Floor2 ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "outside floor". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_Lamp ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "ceiling lamps". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_Pipe ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "pipe end". Simply calls isInTexture().

For internal use only.

bool Polygon::teheur_RWall ( void ) [private]
 

hack: heuristic to detect whether the poly belongs to the lego part "room wall". Simply calls isInTexture().

For internal use only.

void Polygon::turnInvisible ( void )
 

int Polygon::vertidx ( int idx )
 

returns the vertex index indicated by the argument.

advantage is that it "wraps over": For a triangle, vertidx(0), vertidx(3) and vertidx(-3) return all the same

void Polygon::write ( FILE * f,
bool is_IM,
bool is_Instance )
 


Friends And Related Function Documentation

class PolygonModifier [friend]
 


Member Data Documentation

RV_Poly Polygon::data
 

RVColor Polygon::env_color
 

EnvMapType Polygon::envmap
 

rvfloat Polygon::lower_coll
 

lower collision data, if this is a vertical axis-aligned quad poly

rvlong Polygon::ncp_type
 

extra bits to include in the .ncp file

Mesh * Polygon::parent
 

rvlong Polygon::surface
 

surface type as written to the .ncp file, or SURF_NOCOLL for non-solid polys


The documentation for this class was generated from the following files:
Generated at Fri Jul 26 09:34:00 2002 for rvtmod/rvglue by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000