|
Panda3D
|
A specialization of IffInputFile to handle reading a Lightwave Object file. More...
#include "lwoInputFile.h"
Public Member Functions | |
| virtual TypeHandle | force_init_type () |
| Filename | get_filename () |
| Reads a Lightwave platform-neutral filename and converts it to a Panda platform-neutral filename. | |
| double | get_lwo_version () const |
| Returns the version of the Lightwave file being read. | |
| virtual TypeHandle | get_type () const |
| LVecBase3 | get_vec3 () |
| Reads a three-component vector of floats. | |
| int | get_vx () |
| Reads a Lightwave variable-length index. | |
| void | set_lwo_version (double version) |
| Changes the version number reported for the Lightwave file. | |
Public Member Functions inherited from IffInputFile | |
| void | align () |
| If the current file pointer is not positioned on an even-byte boundary, reads and discards one byte so that it is. | |
| PN_stdfloat | get_be_float32 () |
| Extracts a 32-bit big-endian single-precision floating-point number. | |
| int16_t | get_be_int16 () |
| Extracts a signed 16-bit big-endian integer. | |
| int32_t | get_be_int32 () |
| Extracts a signed 32-bit big-endian integer. | |
| uint16_t | get_be_uint16 () |
| Extracts an unsigned 16-bit big-endian integer. | |
| uint32_t | get_be_uint32 () |
| Extracts an unsigned 32-bit big-endian integer. | |
| size_t | get_bytes_read () const |
| Returns the number of bytes read so far from the input file. | |
| const Filename & | get_filename () const |
| Returns the filename that the InputFile is currently opened on, if available. | |
| IffId | get_id () |
| Extracts a 4-character IFF ID. | |
| int8_t | get_int8 () |
| Extracts a signed 8-bit integer. | |
| std::string | get_string () |
| Extracts a null-terminated string. | |
| uint8_t | get_uint8 () |
| Extracts an unsigned 8-bit integer. | |
| bool | is_eof () const |
| Returns true if the last read operation failed because of reaching EOF, false otherwise. | |
| bool | open_read (Filename filename) |
| Attempts to open the indicated filename for reading. | |
| PT (IffChunk) get_chunk() | |
| PT (IffChunk) get_subchunk(IffChunk *context) | |
| bool | read_byte (char &byte) |
| Reads a single byte. | |
| bool | read_bytes (Datagram &datagram, int length) |
| Reads a series of bytes, and stores them in the indicated Datagram. | |
| void | set_filename (const Filename &filename) |
| Indicates the filename that the InputFile is currently opened on. | |
| void | set_input (std::istream *input, bool owns_istream) |
| Sets up the input to use an arbitrary istream. | |
| bool | skip_bytes (int length) |
| Reads a series of bytes, but does not store them. | |
Public Member Functions inherited from TypedObject | |
| TypedObject (const TypedObject ©)=default | |
| TypedObject * | as_typed_object () |
| Returns the object, upcast (if necessary) to a TypedObject pointer. | |
| const TypedObject * | as_typed_object () const |
| Returns the object, upcast (if necessary) to a TypedObject pointer. | |
| int | get_best_parent_from_Set (const std::set< int > &) const |
| int | get_type_index () const |
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
| bool | is_exact_type (TypeHandle handle) const |
| Returns true if the current object is the indicated type exactly. | |
| bool | is_of_type (TypeHandle handle) const |
| Returns true if the current object is or derives from the indicated type. | |
| TypedObject & | operator= (const TypedObject ©)=default |
Public Member Functions inherited from MemoryBase | |
| void | operator delete (void *, void *) |
| void | operator delete (void *ptr) |
| void | operator delete[] (void *, void *) |
| void | operator delete[] (void *ptr) |
| void * | operator new (size_t size) |
| void * | operator new (size_t size, void *ptr) |
| void * | operator new[] (size_t size) |
| void * | operator new[] (size_t size, void *ptr) |
Static Public Member Functions | |
| static TypeHandle | get_class_type () |
| static void | init_type () |
Static Public Member Functions inherited from IffInputFile | |
| static TypeHandle | get_class_type () |
| static void | init_type () |
Static Public Member Functions inherited from TypedObject | |
| 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. | |
Additional Inherited Members | |
Public Attributes inherited from TypedObject | |
| get_type | |
A specialization of IffInputFile to handle reading a Lightwave Object file.
Definition at line 26 of file lwoInputFile.h.
| LwoInputFile::LwoInputFile | ( | ) |
Definition at line 34 of file lwoInputFile.cxx.
| LwoInputFile::~LwoInputFile | ( | ) |
Definition at line 41 of file lwoInputFile.cxx.
|
inlinevirtual |
Reimplemented from IffInputFile.
Definition at line 48 of file lwoInputFile.h.
|
inlinestatic |
Definition at line 49 of file lwoInputFile.h.
| Filename LwoInputFile::get_filename | ( | ) |
Reads a Lightwave platform-neutral filename and converts it to a Panda platform-neutral filename.
Definition at line 78 of file lwoInputFile.cxx.
References IffInputFile::get_string().
Referenced by LwoStillImage::read_iff().
|
inline |
Returns the version of the Lightwave file being read.
This is unknown until the header record has been read; then it will be set by the header.
Definition at line 18 of file lwoInputFile.I.
Referenced by LwoPolygons::read_iff().
|
inlinevirtual |
Reimplemented from IffInputFile.
Definition at line 45 of file lwoInputFile.h.
| LVecBase3 LwoInputFile::get_vec3 | ( | ) |
Reads a three-component vector of floats.
Definition at line 65 of file lwoInputFile.cxx.
References IffInputFile::get_be_float32().
Referenced by LwoBoundingBox::read_iff(), LwoLayer::read_iff(), LwoPoints::read_iff(), LwoSurfaceBlockTransform::read_iff(), and LwoSurfaceColor::read_iff().
| int LwoInputFile::get_vx | ( | ) |
Reads a Lightwave variable-length index.
This is either a 2-byte or 4-byte integer.
Definition at line 49 of file lwoInputFile.cxx.
References IffInputFile::get_be_uint16().
Referenced by LwoDiscontinuousVertexMap::read_iff(), LwoPolygons::read_iff(), LwoPolygonTags::read_iff(), LwoSurfaceBlockImage::read_iff(), LwoSurfaceBlockOpacity::read_iff(), LwoSurfaceBlockRepeat::read_iff(), LwoSurfaceBlockTransform::read_iff(), LwoSurfaceColor::read_iff(), LwoSurfaceParameter::read_iff(), and LwoVertexMap::read_iff().
|
inlinestatic |
Definition at line 52 of file lwoInputFile.h.
|
inline |
Changes the version number reported for the Lightwave file.
Normally this is only called by LwoHeader as it is read.
Definition at line 28 of file lwoInputFile.I.
Referenced by LwoHeader::read_iff().