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

LwoPolygons Class Reference

An array of polygons that will be referenced by later chunks. More...

#include <lwoPolygons.h>

Inheritance diagram for LwoPolygons:

LwoChunk IffChunk TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Types

enum  PolygonFlags { PF_continuity_1 = 0x0400, PF_continuity_2 = 0x0800, PF_numverts_mask = 0x03ff, PF_decal = 0x0001 }

Public Member Functions

int get_num_polygons () const
 Returns the number of polygons of this group.

Polygonget_polygon (int n) const
 Returns the nth polygon of this group.

virtual bool read_iff (IffInputFile *in, size_t stop_at)
 Reads the data of the chunk in from the given input file, if possible.

virtual void write (ostream &out, int indent_level=0) const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
IffId get_id () const
 Returns the ID associated with this chunk.

void set_id (IffId id)
 Changes the ID associated with this chunk.

virtual void output (ostream &out) const
virtual IffChunkmake_new_chunk (IffInputFile *in, IffId id)
 Allocates and returns a new chunk of the appropriate type based on the given ID, according to the context given by this chunk itself.

int get_type_index () const
bool is_of_type (TypeHandle handle) const
bool is_exact_type (TypeHandle handle) const
int get_ref_count () const
int ref () const
int unref () const
void test_ref_count_integrity () const

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

IffId _polygon_type

Protected Attributes

int _ref_count

Private Types

typedef pvector< PointerTo<
Polygon > > 
Polygons

Private Attributes

Polygons _polygons

Static Private Attributes

TypeHandle _type_handle

Detailed Description

An array of polygons that will be referenced by later chunks.

Definition at line 43 of file lwoPolygons.h.


Member Typedef Documentation

typedef pvector< PointerTo< Polygon > > LwoPolygons::Polygons [private]
 

Definition at line 78 of file lwoPolygons.h.


Member Enumeration Documentation

enum LwoPolygons::PolygonFlags
 

Enumeration values:
PF_continuity_1 
PF_continuity_2 
PF_numverts_mask 
PF_decal 

Definition at line 45 of file lwoPolygons.h.


Member Function Documentation

virtual TypeHandle LwoPolygons::force_init_type void   )  [inline, virtual]
 

Reimplemented from LwoChunk.

Definition at line 85 of file lwoPolygons.h.

TypeHandle LwoPolygons::get_class_type void   )  [inline, static]
 

Reimplemented from LwoChunk.

Definition at line 86 of file lwoPolygons.h.

IffId IffChunk::get_id void   )  const [inline, inherited]
 

Returns the ID associated with this chunk.

Definition at line 43 of file iffChunk.I.

References IffChunk::_id, and INLINE.

Referenced by LwoTags::read_iff(), LwoSurfaceSmoothingAngle::read_iff(), LwoSurfaceSidedness::read_iff(), LwoSurfaceParameter::read_iff(), LwoSurfaceColor::read_iff(), LwoSurfaceBlockWrap::read_iff(), LwoSurfaceBlockVMapName::read_iff(), LwoSurfaceBlockTransform::read_iff(), LwoSurfaceBlockTMap::read_iff(), LwoSurfaceBlockRepeat::read_iff(), LwoSurfaceBlockRefObj::read_iff(), LwoSurfaceBlockProjection::read_iff(), LwoSurfaceBlockOpacity::read_iff(), LwoSurfaceBlockImage::read_iff(), LwoSurfaceBlockHeader::read_iff(), LwoSurfaceBlockEnabled::read_iff(), LwoSurfaceBlockCoordSys::read_iff(), LwoSurfaceBlockChannel::read_iff(), LwoSurfaceBlockAxis::read_iff(), LwoSurface::read_iff(), LwoStillImage::read_iff(), LwoPolygonTags::read_iff(), LwoPoints::read_iff(), LwoClip::read_iff(), LwoBoundingBox::read_iff(), and IffGenericChunk::read_iff().

int LwoPolygons::get_num_polygons  )  const
 

Returns the number of polygons of this group.

Definition at line 39 of file lwoPolygons.cxx.

References _polygons, nassertr, and NULL.

LwoPolygons::Polygon * LwoPolygons::get_polygon int  n  )  const
 

Returns the nth polygon of this group.

Definition at line 52 of file lwoPolygons.cxx.

References _polygon_type, DCAST, IffInputFile::get_be_uint16(), IffInputFile::get_bytes_read(), IffInputFile::get_id(), LwoInputFile::get_lwo_version(), IffInputFile::is_eof(), PF_numverts_mask, and PT.

virtual TypeHandle LwoPolygons::get_type void   )  const [inline, virtual]
 

Reimplemented from LwoChunk.

Definition at line 82 of file lwoPolygons.h.

References _type_handle, LwoChunk::init_type(), and register_type().

void LwoPolygons::init_type void   )  [inline, static]
 

Reimplemented from LwoChunk.

Definition at line 89 of file lwoPolygons.h.

References _type_handle.

IffChunk * IffChunk::make_new_chunk IffInputFile in,
IffId  id
[virtual, inherited]
 

Allocates and returns a new chunk of the appropriate type based on the given ID, according to the context given by this chunk itself.

Reimplemented in LwoClip, LwoSurface, LwoSurfaceBlock, LwoSurfaceBlockHeader, and LwoSurfaceBlockTMap.

Definition at line 66 of file iffChunk.cxx.

Referenced by IffInputFile::get_chunk(), LwoSurfaceBlockTMap::write(), and LwoClip::write().

void IffChunk::output ostream &  out  )  const [virtual, inherited]
 

Definition at line 37 of file iffChunk.cxx.

References IffChunk::_id, and indent().

bool LwoPolygons::read_iff IffInputFile in,
size_t  stop_at
[virtual]
 

Reads the data of the chunk in from the given input file, if possible.

The ID and length of the chunk have already been read. stop_at is the byte position of the file to stop at (based on the current position at in->get_bytes_read()). Returns true on success, false otherwise.

Implements IffChunk.

Definition at line 76 of file lwoPolygons.cxx.

References LwoInputFile::get_vx().

void IffChunk::set_id IffId  id  )  [inline, inherited]
 

Changes the ID associated with this chunk.

Definition at line 56 of file iffChunk.I.

void LwoPolygons::write ostream &  out,
int  indent_level = 0
const [virtual]
 

Reimplemented from IffChunk.

Definition at line 151 of file lwoPolygons.cxx.


Member Data Documentation

IffId LwoPolygons::_polygon_type
 

Definition at line 71 of file lwoPolygons.h.

Referenced by get_polygon().

Polygons LwoPolygons::_polygons [private]
 

Definition at line 79 of file lwoPolygons.h.

Referenced by get_num_polygons().

TypeHandle LwoPolygons::_type_handle [static, private]
 

Reimplemented from LwoChunk.

Definition at line 28 of file lwoPolygons.cxx.

Referenced by get_type(), and init_type().


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