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

LwoVertexMap Class Reference

A mapping of floating-point values per integer index. More...

#include <lwoVertexMap.h>

Inheritance diagram for LwoVertexMap:

LwoChunk IffChunk TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Member Functions

bool has_value (int index) const
 Returns true if the map has a value associated with the given index, false otherwise.

PTA_float get_value (int index) const
 Returns the mapping value associated with the given index, or an empty PTA_float if there is no mapping value associated.

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 _map_type
int _dimension
string _name

Protected Attributes

int _ref_count

Private Types

typedef pmap< int, PTA_floatVMap

Private Attributes

VMap _vmap

Static Private Attributes

TypeHandle _type_handle

Detailed Description

A mapping of floating-point values per integer index.

The meaning of these values is determined by the mapping type code and/or its name.

Definition at line 42 of file lwoVertexMap.h.


Member Typedef Documentation

typedef pmap<int, PTA_float> LwoVertexMap::VMap [private]
 

Definition at line 56 of file lwoVertexMap.h.


Member Function Documentation

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

Reimplemented from LwoChunk.

Definition at line 63 of file lwoVertexMap.h.

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

Reimplemented from LwoChunk.

Definition at line 64 of file lwoVertexMap.h.

References _type_handle.

Referenced by LwoToEggConverter::cleanup().

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().

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

Reimplemented from LwoChunk.

Definition at line 60 of file lwoVertexMap.h.

PTA_float LwoVertexMap::get_value int  index  )  const
 

Returns the mapping value associated with the given index, or an empty PTA_float if there is no mapping value associated.

Definition at line 59 of file lwoVertexMap.cxx.

References _dimension, _map_type, _name, _vmap, DCAST, IffInputFile::get_be_float32(), IffInputFile::get_be_uint16(), IffInputFile::get_bytes_read(), IffInputFile::get_id(), IffInputFile::get_string(), LwoInputFile::get_vx(), IffInputFile::is_eof(), nout, and PTA_float.

bool LwoVertexMap::has_value int  index  )  const
 

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

Definition at line 42 of file lwoVertexMap.cxx.

References _vmap, and PTA_float.

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

Reimplemented from LwoChunk.

Definition at line 67 of file lwoVertexMap.h.

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 LwoVertexMap::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 88 of file lwoVertexMap.cxx.

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

Changes the ID associated with this chunk.

Definition at line 56 of file iffChunk.I.

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

Reimplemented from IffChunk.

Definition at line 120 of file lwoVertexMap.cxx.


Member Data Documentation

int LwoVertexMap::_dimension
 

Definition at line 48 of file lwoVertexMap.h.

Referenced by get_value().

IffId LwoVertexMap::_map_type
 

Definition at line 47 of file lwoVertexMap.h.

Referenced by get_value().

string LwoVertexMap::_name
 

Definition at line 49 of file lwoVertexMap.h.

Referenced by get_value().

TypeHandle LwoVertexMap::_type_handle [static, private]
 

Reimplemented from LwoChunk.

Definition at line 28 of file lwoVertexMap.cxx.

Referenced by get_class_type().

VMap LwoVertexMap::_vmap [private]
 

Definition at line 57 of file lwoVertexMap.h.

Referenced by get_value(), and has_value().


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