Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes

LwoPolygonTags Class Reference

An association of polygons defined in the most recent LwoPolygons chunk to tag ids defined in the most recent LwoTags chunk. More...

#include "lwoPolygonTags.h"

Inheritance diagram for LwoPolygonTags:
LwoChunk IffChunk TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
int get_tag (int polygon_index) const
 Returns the tag associated with the given polygon index, or -1 if there is no tag associated.
virtual TypeHandle get_type () const
bool has_tag (int polygon_index) const
 Returns true if the map has a tag associated with the given polygon index, false otherwise.
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 _tag_type

Detailed Description

An association of polygons defined in the most recent LwoPolygons chunk to tag ids defined in the most recent LwoTags chunk.

This associated properties with the polygons, depending on the tag_type.

Definition at line 29 of file lwoPolygonTags.h.


Member Function Documentation

int LwoPolygonTags::get_tag ( int  polygon_index) const

Returns the tag associated with the given polygon index, or -1 if there is no tag associated.

Definition at line 42 of file lwoPolygonTags.cxx.

Referenced by CLwoPolygons::get_surface().

bool LwoPolygonTags::has_tag ( int  polygon_index) const

Returns true if the map has a tag associated with the given polygon index, false otherwise.

Definition at line 31 of file lwoPolygonTags.cxx.

Referenced by CLwoPolygons::get_surface().

static void LwoPolygonTags::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 52 of file lwoPolygonTags.h.

bool LwoPolygonTags::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 63 of file lwoPolygonTags.cxx.

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


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