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

CLwoPolygons Class Reference

This class is a wrapper around LwoPolygons and stores additional information useful during the conversion-to-egg process. More...

#include <cLwoPolygons.h>

List of all members.

Public Types

typedef pmap< IffId, const
LwoPolygonTags * > 
PTags
typedef pmap< string, const
LwoDiscontinuousVertexMap * > 
VMad

Public Member Functions

 CLwoPolygons (LwoToEggConverter *converter, const LwoPolygons *polygons, CLwoPoints *points)
void add_ptags (const LwoPolygonTags *lwo_ptags, const LwoTags *tags)
 Associates the indicated PolygonTags and Tags with the polygons in this chunk.

void add_vmad (const LwoDiscontinuousVertexMap *lwo_vmad)
 Associates the indicated DiscontinousVertexMap with the polygons.

CLwoSurfaceget_surface (int polygon_index) const
 Returns the surface associated with the given polygon, or NULL if no surface is associated.

bool get_uv (const string &uv_name, int pi, int vi, LPoint2f &uv) const
 Returns true if there is a UV of the indicated name associated with the given vertex of the indicated polygon, false otherwise.

void make_egg ()
 Creates the egg structures associated with this Lightwave object.

void connect_egg ()
 Connects all the egg structures together.


Public Attributes

LwoToEggConverter_converter
ConstPointerTo< LwoPolygons_polygons
CLwoPoints_points
PointerTo< EggGroup_egg_group
const LwoTags_tags
PTags _ptags
const LwoPolygonTags_surf_ptags
VMad _txuv

Private Member Functions

void make_faces ()
 Generates "face" polygons, i.e.


Detailed Description

This class is a wrapper around LwoPolygons and stores additional information useful during the conversion-to-egg process.

Definition at line 51 of file cLwoPolygons.h.


Member Typedef Documentation

typedef pmap<IffId, const LwoPolygonTags *> CLwoPolygons::PTags
 

Definition at line 72 of file cLwoPolygons.h.

typedef pmap<string, const LwoDiscontinuousVertexMap *> CLwoPolygons::VMad
 

Definition at line 79 of file cLwoPolygons.h.


Constructor & Destructor Documentation

CLwoPolygons::CLwoPolygons LwoToEggConverter converter,
const LwoPolygons polygons,
CLwoPoints points
[inline]
 

Definition at line 31 of file cLwoPolygons.I.

References _surf_ptags, _tags, and NULL.


Member Function Documentation

void CLwoPolygons::add_ptags const LwoPolygonTags lwo_ptags,
const LwoTags tags
 

Associates the indicated PolygonTags and Tags with the polygons in this chunk.

This may define features such as per-polygon surfaces, parts, and smoothing groups.

Definition at line 51 of file cLwoPolygons.cxx.

References nout.

void CLwoPolygons::add_vmad const LwoDiscontinuousVertexMap lwo_vmad  ) 
 

Associates the indicated DiscontinousVertexMap with the polygons.

This can be used in conjunction with (or in place of) the VertexMap associated with the points set, to define per-polygon UV's etc.

Definition at line 86 of file cLwoPolygons.cxx.

void CLwoPolygons::connect_egg  ) 
 

Connects all the egg structures together.

Definition at line 246 of file cLwoPolygons.cxx.

References nout.

CLwoSurface * CLwoPolygons::get_surface int  polygon_index  )  const
 

Returns the surface associated with the given polygon, or NULL if no surface is associated.

Definition at line 116 of file cLwoPolygons.cxx.

References _converter, _tags, nout, and NULL.

bool CLwoPolygons::get_uv const string &  uv_name,
int  pi,
int  vi,
LPoint2f &  uv
const
 

Returns true if there is a UV of the indicated name associated with the given vertex of the indicated polygon, false otherwise.

If true, fills in uv with the value.

This performs a lookup in the optional "discontinuous" vertex mapping, which provides the ability to map different UV's per each polygon for the same vertex. If the UV is not defined here, it may also be defined in the standard vertex map, which is associated with the points themselves.

Definition at line 176 of file cLwoPolygons.cxx.

References _egg_group, _polygons, and nout.

Referenced by make_faces().

void CLwoPolygons::make_egg  ) 
 

Creates the egg structures associated with this Lightwave object.

Definition at line 210 of file cLwoPolygons.cxx.

References _points.

void CLwoPolygons::make_faces  )  [private]
 

Generates "face" polygons, i.e.

actual polygons.

Definition at line 262 of file cLwoPolygons.cxx.

References _points, CLwoPoints::get_uv(), get_uv(), CLwoSurface::get_uv_name(), LCAST, and NULL.


Member Data Documentation

LwoToEggConverter* CLwoPolygons::_converter
 

Definition at line 66 of file cLwoPolygons.h.

Referenced by get_surface().

PointerTo< EggGroup > CLwoPolygons::_egg_group
 

Definition at line 69 of file cLwoPolygons.h.

Referenced by get_uv().

CLwoPoints* CLwoPolygons::_points
 

Definition at line 68 of file cLwoPolygons.h.

Referenced by make_egg(), and make_faces().

ConstPointerTo< LwoPolygons > CLwoPolygons::_polygons
 

Definition at line 67 of file cLwoPolygons.h.

Referenced by get_uv().

PTags CLwoPolygons::_ptags
 

Definition at line 73 of file cLwoPolygons.h.

const LwoPolygonTags* CLwoPolygons::_surf_ptags
 

Definition at line 75 of file cLwoPolygons.h.

Referenced by CLwoPolygons().

const LwoTags* CLwoPolygons::_tags
 

Definition at line 71 of file cLwoPolygons.h.

Referenced by CLwoPolygons(), and get_surface().

VMad CLwoPolygons::_txuv
 

Definition at line 80 of file cLwoPolygons.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:25:59 2003 for Panda-Tool by doxygen1.3