Panda3D
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

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 MemoryBase MemoryBase

List of all members.

Classes

class  Polygon

Public Types

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

Public Member Functions

virtual TypeHandle force_init_type ()
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 TypeHandle get_type () const
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

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Public Attributes

IffId _polygon_type

Detailed Description

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

Definition at line 32 of file lwoPolygons.h.


Member Function Documentation

int LwoPolygons::get_num_polygons ( ) const

Returns the number of polygons of this group.

Definition at line 29 of file lwoPolygons.cxx.

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

Returns the nth polygon of this group.

Definition at line 39 of file lwoPolygons.cxx.

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

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from LwoChunk.

Definition at line 78 of file lwoPolygons.h.

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 55 of file lwoPolygons.cxx.

References IffInputFile::get_be_int16(), IffInputFile::get_be_uint16(), IffInputFile::get_bytes_read(), IffInputFile::get_id(), LwoInputFile::get_lwo_version(), LwoInputFile::get_vx(), and IffInputFile::is_eof().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations