Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all 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"

Public Types

typedef pmap< IffId, const LwoPolygonTags * > PTags
 
typedef pmap< std::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.
 
void connect_egg ()
 Connects all the egg structures together.
 
 CPT (LwoPolygons) _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 std::string &uv_name, int pi, int vi, LPoint2 &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.
 
 PT (EggGroup) _egg_group
 

Public Attributes

LwoToEggConverter_converter
 
CLwoPoints_points
 
PTags _ptags
 
const LwoPolygonTags_surf_ptags
 
const LwoTags_tags
 
VMad _txuv
 

Detailed Description

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

Definition at line 36 of file cLwoPolygons.h.

Member Typedef Documentation

◆ PTags

Definition at line 57 of file cLwoPolygons.h.

◆ VMad

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

Definition at line 64 of file cLwoPolygons.h.

Constructor & Destructor Documentation

◆ CLwoPolygons()

CLwoPolygons::CLwoPolygons ( LwoToEggConverter * converter,
const LwoPolygons * polygons,
CLwoPoints * points )
inline

Definition at line 17 of file cLwoPolygons.I.

Member Function Documentation

◆ add_ptags()

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 35 of file cLwoPolygons.cxx.

◆ add_vmad()

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 61 of file cLwoPolygons.cxx.

◆ connect_egg()

void CLwoPolygons::connect_egg ( )

Connects all the egg structures together.

Definition at line 185 of file cLwoPolygons.cxx.

◆ get_surface()

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 85 of file cLwoPolygons.cxx.

References LwoTags::get_num_tags(), LwoToEggConverter::get_surface(), LwoTags::get_tag(), LwoPolygonTags::get_tag(), and LwoPolygonTags::has_tag().

◆ get_uv()

bool CLwoPolygons::get_uv ( const std::string & uv_name,
int pi,
int vi,
LPoint2 & 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 127 of file cLwoPolygons.cxx.

References LwoDiscontinuousVertexMap::get_value(), and LwoDiscontinuousVertexMap::has_value().

◆ make_egg()

void CLwoPolygons::make_egg ( )

Creates the egg structures associated with this Lightwave object.

Definition at line 154 of file cLwoPolygons.cxx.

Member Data Documentation

◆ _converter

LwoToEggConverter* CLwoPolygons::_converter

Definition at line 51 of file cLwoPolygons.h.

◆ _points

CLwoPoints* CLwoPolygons::_points

Definition at line 53 of file cLwoPolygons.h.

◆ _ptags

PTags CLwoPolygons::_ptags

Definition at line 58 of file cLwoPolygons.h.

◆ _surf_ptags

const LwoPolygonTags* CLwoPolygons::_surf_ptags

Definition at line 60 of file cLwoPolygons.h.

◆ _tags

const LwoTags* CLwoPolygons::_tags

Definition at line 56 of file cLwoPolygons.h.

◆ _txuv

VMad CLwoPolygons::_txuv

Definition at line 65 of file cLwoPolygons.h.


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