#include <LWModel.h>
Inheritance diagram for Teddy::Imports::LWModel:
Public Methods | |
LWModel (const std::string &name) | |
Constructor for submodels, simply calls Model constructor. More... | |
LWModel (const std::string &fname, Uint32 options) | |
Constructor which loads LightWave object file. More... | |
virtual | ~LWModel () |
Destructor. More... | |
LWFile * | getFile () const |
LWLayer * | getLayer (int layer_number) |
std::string | getTag (VX tag_index) |
void | layer_U2_U2_S0 () |
void | layer_U2_U2_VEC12_S0_U2 () |
void | tags_d () |
Protected Attributes | |
LWFile * | f |
U4_to_LWLayer | layers |
Layers of Lightwave Object. More... | |
U4_to_string | tags |
U4 | num_tags |
Points
Lines
Polygon tessalation
Layers
Texture and Image maps
This class implements loader for LightWave object files. It is a subclass of Meodel that contains no Elements, only submodels. Each Layer that is encountered in the file is placed into a submesh. If the file has data for arbitrary layer, eg., there is data before layer, a default layer 1 is created and data is placed there.
Data in layers is organized by surfaces. For each surface found in the file a submesh for the layer is created and LWSurface is created. Thus each layer mesh contains no Elements, just submeshes.
The LightWave object file format spesification is available from NewTek internet pages. Parts LightWave object file format specifications are placed into comments into source-code.
Definition at line 81 of file LWModel.h.
|
Constructor for submodels, simply calls Model constructor.
Definition at line 59 of file LWModel.cpp. References Teddy::SysSupport::dmsg, and Teddy::SysSupport::M_LWO. |
|
Constructor which loads LightWave object file.
Definition at line 65 of file LWModel.cpp. References Teddy::Models::Model::add, Teddy::Imports::did, Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, Teddy::SysSupport::fix_file_name, Teddy::Imports::ID4, layers, Teddy::SysSupport::M_LWO, num_tags, Teddy::MixIn::Options::options, Teddy::Models::Model::setMaterial, Teddy::Models::Model::setupClipRadius, and Vector. |
|
Destructor.
Definition at line 120 of file LWModel.cpp. |
|
Definition at line 126 of file LWModel.cpp. References f. |
|
Definition at line 130 of file LWModel.cpp. References Teddy::SysSupport::emsg, layers, and Teddy::SysSupport::M_LWO. |
|
Definition at line 251 of file LWModel.cpp. References Teddy::SysSupport::emsg, Teddy::SysSupport::M_LWO, tags, and Teddy::Imports::VX. |
|
LWLO LAYR Chunk An LAYR chunk must precede each set of PNTS, POLS and CRVS data chunks and indicates to which layer those data belong. An LAYR chunk consists of two unsigned short values and a string. The first is the layer number which should be from 1 to 10 to operate correctly in Modeler. This restriction may be lifted in future versions of the format. The second value is a bitfield where only the lowest order bit is defined and all others should be zero. This bit is one if this is an active layer and zero if it is a background layer. The string which follows is the name of the layer and should be null-terminated and padded to even length. Definition at line 159 of file LWModel.cpp. References Teddy::Models::Model::add, Teddy::SysSupport::dmsg, f, Teddy::Models::Model::getClipRadius, layers, Teddy::SysSupport::M_LWO, Teddy::Models::Model::setClipRadius, Teddy::Imports::U2, and Vector. |
|
LWO2 Start Layer LAYR { number[U2], flags[U2], pivot[VEC12], name[S0], parent[U2] } Signals the start of a new layer. All the data chunks which follow will be included in this layer until another layer chunk is encountered. If data is encountered before a layer chunk, it goes into an arbitrary layer. If the least significant bit of flags is set, the layer is hidden. The parent index indicates the default parent for this layer and can be -1 or missing to indicate no parent. Definition at line 198 of file LWModel.cpp. References Teddy::Models::Model::add, Teddy::SysSupport::dmsg, f, Teddy::Models::Model::getClipRadius, layers, Teddy::SysSupport::M_LWO, Teddy::Models::Model::setClipRadius, Teddy::Imports::U2, and Vector. |
|
LWO2 Tag Strings TAGS { tag-string[S0] * } This chunk lists the tags strings that can be associated with polygons by the PTAG chunk. Strings should be read until as many bytes as the chunk size specifies have been read, and each string is assigned an index starting from zero. Definition at line 241 of file LWModel.cpp. References Teddy::SysSupport::dmsg, f, Teddy::SysSupport::M_LWO, num_tags, and tags. |
|
Definition at line 95 of file LWModel.h. Referenced by getFile, layer_U2_U2_S0, layer_U2_U2_VEC12_S0_U2, LWModel, and tags_d. |
|
Layers of Lightwave Object.
Definition at line 96 of file LWModel.h. Referenced by getLayer, layer_U2_U2_S0, layer_U2_U2_VEC12_S0_U2, and LWModel. |
|
|
|
|