#include <LWLayer.h>
Inheritance diagram for Teddy::Imports::LWLayer:
Definition at line 73 of file LWLayer.h.
|
Constructor for submeshes.
Definition at line 60 of file LWLayer.cpp. References bbox_max, bbox_min, current_surface, Teddy::SysSupport::dmsg, f, flags, Teddy::SysSupport::M_LWO, model, num_clips, num_envelopes, num_faces, num_surfaces, num_vertices, parent_layer, pivot, Teddy::Imports::U2, and Vector. |
|
Destructor.
Definition at line 108 of file LWLayer.cpp. |
|
LWO2 Bounding Box BBOX { min[VEC12], max[VEC12] } This is an optional chunk which can be included to store the bounding box for the vertex data in a layer. The min and max vectors are the lower and upper corners of the bounding box. Definition at line 874 of file LWLayer.cpp. References bbox_max, bbox_min, and f. Referenced by processChunk. |
|
LWO2 Image or Sequence Definition CLIP { index[U4], attributes[SUB-CHUNK] * } Each CLIP chunk defines a image which can be used for applying as a texture map in surfaces. The term 'clip' is used to describe these since they may be time-varying sequences or animations rather than just stills. The index identifies this clip uniquely and may be any non-zero value less than 0x1000000. The attributes which define the source imagery and modifiers follow as a variable list of sub-chunks Definition at line 803 of file LWLayer.cpp. References clips, Teddy::SysSupport::emsg, f, Teddy::SysSupport::M_LWO, num_clips, and Teddy::Imports::U4. Referenced by processChunk. |
|
LWO2 Commentary Text TEXT { comment[S0] } This is another optional chunk which can be used to hold comments about the object. The text is just like the DESC chunk, but it can be about any subject, it may contain newline characters and it does not need to be particularly short. Definition at line 905 of file LWLayer.cpp. References commentary_text, and f. Referenced by processChunk. |
|
LWOB Read curve list.
Definition at line 437 of file LWLayer.cpp. Referenced by processChunk. |
|
LWO2 Description Line DESC { description-line[S0] } This is an optional chunk which can be used to hold an object description. This should be a simple line of upper and lowercase characters, punctuation and spaces which describes the contents of the object file. There should be no control characters in this text string and it should generally be kept short. Definition at line 891 of file LWLayer.cpp. References description_line, and f. Referenced by processChunk. |
|
LWO2 Envelope Definition ENVL { index[U4], attributes[SUB-CHUNK] * } Each ENVL chunk defines the time-varying curve for a single parameter channel. The index is used to identify this envelope uniquely, and can have any non-zero value less than 0x1000000. Following the index is a series of sub-chunks, which are like normal IFF chunks except that their sizes are specified by short integers instead of longs. The number of sub-chunks may vary depending on the complexity of the envelope, so sub-chunks should be read from the file until as many bytes as the chunk size specifies have been read. New types of sub-chunks may be introduced as the program capabilities increase, but any unknown sub-chunks may be skipped over by using their size. Definition at line 779 of file LWLayer.cpp. References envelopes, f, num_envelopes, and Teddy::Imports::U4. Referenced by processChunk. |
|
LWOB POLS { ( numvert[U2], vert[U2] # numvert, surf[I2] )* } This chunk contains a list of all the polygons in an object. Each entry consists of a short integer specifying the number of vertices in the polygon followed by that many short integers specifying the vertices themselves (as indices into the points list) followed by a short integer specifying which surface is used by the polygon (as an index into the surfaces list). The number of vertices in a polygon currently may vary from one to 200. The vertex list for each polygon should begin at a convex vertex and proceed clockwise as seen from the visible side of the polygon (LightWave 3D polygons are single-sided, except for those whose surfaces have the double-sided flag set). Polygons should be read from the file until as many bytes as the chunk size specifies have been read. Since the points in the PNTS chunk are referenced using two-byte integers, the effective maximum number of points in a LightWave object file is 65,536. This is an inherient limitation of this current format. A negative surface number for a polygon indicates that the polygon has detail polygons (which are drawn on top of the main polygon and may be coplanar with it). In this case, the next number in the file is a short integer specifying how many detail polygons belong to the current polygon. This is followed by a list of those detail polygons, where each entry is of the same format as described above for regular polygons (except that the detail polygons cannot have details of their own). The list of regular polygons then resumes. To determine which surface is used by a polygon with a negative surface number, the absolute value of that number should be used. Note, however, that detail polygons are mostly obsolete, so even though they may be recognized by LightWave and old files contain them, they should be ignored. Definition at line 321 of file LWLayer.cpp. References Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, faces, Teddy::SysSupport::M_LWO, model, Teddy::Models::Model::Model, models, num_faces, num_surfaces, num_vertices, Teddy::Imports::U4, and vertices. Referenced by processChunk. |
|
Definition at line 186 of file LWLayer.cpp. References clips, and Teddy::Imports::VX. |
|
Definition at line 181 of file LWLayer.cpp. References model. |
|
LWOB Read patch list.
Definition at line 443 of file LWLayer.cpp. Referenced by processChunk. |
|
LWOB and LOW2 PNTS { point-location[VEC12] * } This chunk contains a list of the X, Y, and Z coordinates of all the points in an object. Since each coordinate has three components, and each component is stored as a four byte floating point number, the number of points in an object can be determined by dividing the size in bytes of the PNTS chunk by 12. By convention, the +X direction is to the right or east, the +Y direction is upward, and the +Z direction is forward or north. For models of real-world objects, the unit size is usually considered to be one meter. The coordinates are specified relative to an object's pivot point. See the LightWave Modeler manual for more information about LightWave 3D's geometric conventions. Points in the PNTS chunk are numbered in the order they occur, starting with zero. This index is then used by polygons to define their vertices. The PNTS chunk must be before the POLS, CRVS, and PCHS chunks in the file. Definition at line 219 of file LWLayer.cpp. References Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, Teddy::SysSupport::M_LWO, num_vertices, pivot, SCALE, Teddy::Imports::U4, Vector, and vertices. Referenced by processChunk. |
|
LWO2 Polygon List POLS { type[ID4], ( numvert+flags[U2], vert[VX] # numvert )* } This chunk contains a list of polygons for the current layer. The 'type' code indicates the polygon type and can be FACE, CURV, PACH, or possibly other values. Each entry starts with a short integer specifying the number of vertices in the polygon. The 6 high-order bits of the number of vertices are flags bits with different meaning for each polygon type, so there are a maximum of 1023 vertices per polygon. The vertex list is the specified number of two or four byte VX vertex indices (relative to the most recent points list). The vertex list for each polygon should begin at a convex vertex and proceed clockwise as seen from the visible side of the polygon (LightWave 3D polygons are single-sided, except for those whose surfaces have the double-sided flag set). Polygons should be read from the file until as many bytes as the chunk size specifies have been read. Definition at line 552 of file LWLayer.cpp. References Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, faces, flags, Teddy::Imports::ID4, Teddy::SysSupport::M_LWO, num_faces, num_vertices, Teddy::Imports::U2, Teddy::Imports::U4, and vertices. Referenced by processChunk. |
|
LWO2 Polygon Tag Mapping PTAG { type[ID4], ( poly[VX], tag[U2] )* } This chunk contains the all the tags of a given type for some subset of the polygons defined in the preceding POLS chunk. The type of the tag association is given by the first element of the chunk and is an normal 4-character ID code. The rest of the chunk is a list of polygon/tag associations. The polygon is identified by its index into the previous POLS chunk, and the tag is given by its index into the previous TAGS chunk. Any number of polygons may be mapped with this type of tag, and mappings should be read from the file until as many bytes as the chunk size specifies have been read. Polygon tags types and their values are extensible, but there are some pre-defined types. The SURF type tags each polygon with the name of its surface. In LightWave 3D terminology, a "surface" is defined as a named set of shading attributes and may be described in the object file in SURF chunks. Another pre-defined type is PART which describes what aspect of the model each polygon belongs to, and SMGP which names the smoothing group for each polygon. Not all polygons have a value for every tag type, and the behavior for polygon which lack a certain tag depends on the type. Definition at line 676 of file LWLayer.cpp. References Teddy::Models::Model::add, Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, faces, Teddy::Imports::ID4, LWFILE_OPTION_SKIP_MATERIAL_M, Teddy::SysSupport::M_LWO, model, Teddy::Models::Model::Model, models, surfaces, Teddy::Imports::U4, and Teddy::Imports::VX. Referenced by processChunk. |
|
Process a LWOB & LWO2 file chunks.
Definition at line 114 of file LWLayer.cpp. References boundingBox_VEC12_VEC12, clip_U4_sc, comments_S0, curveList, descriptionLine_S0, Teddy::Imports::did, Teddy::SysSupport::dmsg, envelope_U4_sc, f, faceList, ID_BBOX, ID_CLIP, ID_CRVS, ID_DESC, ID_ENVL, ID_ICON, ID_LAYR, ID_LWLO, ID_LWO2, ID_LWOB, ID_PCHS, ID_PNTS, ID_POLS, ID_PTAG, ID_SRFS, ID_TAGS, ID_TEXT, Teddy::SysSupport::M_LWO, model, patchList, pointList, polygonList, polygonTags_ID4_d, surf_S0_S0_sc, surface_sc, surfaceList, thumbnail_U2_U2_d, Teddy::Imports::U4, and vertexMapping_ID4_U2_S0_d. Referenced by processLayer. |
|
Returns true if next layer.
Definition at line 81 of file LWLayer.cpp. References Teddy::Models::Model::children, Teddy::SysSupport::dmsg, f, Teddy::SysSupport::M_LWO, model, Teddy::Models::Model::Model, and processChunk. |
|
LWO2 Surface Definition SURF { name[S0], source[S0], attributes[SUB-CHUNK] * } Each SURF chunk describes the shading attributes of a particular surface. These chunks begin with the name of the surface being described plus the name of the source surface. If the source name is non-null, then this surface is derived from the source surface. The base attributes of the source surface can be overridden by this surface, and texture blocks can be added to the source surface. The material attributes follow as a variable list of sub-chunks. Definition at line 833 of file LWLayer.cpp. References Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, f, Teddy::SysSupport::M_LWO, and surfaces. Referenced by processChunk. |
|
LWOB SURF { name[S0], attributes[SUB-CHUNK] * } Each SURF chunk describes the surface attributes of a particular surface. These chunks begin with the name of the surface being described. Following the name is a series of sub-chunks, which are like normal IFF chunks except that their sizes are specified by short integers instead of longs. It is likely that the variety of sub-chunks will grow as new surface attributes are added to the program, but any unknown sub-chunks may be skipped over by using the size. Sub-chunks should be read from the file until as many bytes as the chunk size specifies have been read. Definition at line 460 of file LWLayer.cpp. References Teddy::SysSupport::emsg, f, Teddy::SysSupport::M_LWO, and surfaces. Referenced by processChunk. |
|
Definition at line 266 of file LWLayer.cpp. References Teddy::Models::Model::add, f, model, Teddy::Models::Model::Model, models, num_surfaces, and surfaces. Referenced by processChunk. |
|
LWO2 Thumbnail Icon Image ICON { encoding[U2], width[U2], data[U1] * } This optional chunk contains an iconic or thumbnail image for the object which can be used when viewing the file in a browser. The encoding is a code for the data format which can only be zero for now meaning uncompressed, unsigned bytes as RGB triples. The width specifies the number of pixels contained in each row of the image. The data consists of rows of pixels (RGB triples for now), and the height of the image is determined by the length of the data. Definition at line 923 of file LWLayer.cpp. References Teddy::SysSupport::dmsg, f, Teddy::SysSupport::M_LWO, Teddy::Imports::U1, and Teddy::Imports::U2. Referenced by processChunk. |
|
LWO2 Vertex Mapping VMAP { type[ID4], dimension[U2], name[S0], ( vert[VX], value[F4] # dimension )* } This chunk contains a set of floating point vectors associated with a set of vertices. Each one has a type which is a four-character ID code, a dimension and a name string. After that follows a list of vertex / vector pairs, with the vertex given by a vertex index in VX format and an array of "dimension" floating-point values. There can be any number of these chunks, although they should all have different types or names. Some possible type codes are TXUV for UV mapping coordinates, MNVW for MetaNURBS vertex weights, MORF for vector offsets defining an alternate object shape, SPOT for alternate vertex positions, RGBA for coloring, etc. Definition at line 500 of file LWLayer.cpp. References Teddy::Imports::did, Teddy::SysSupport::dmsg, f, Teddy::Imports::F4, Teddy::Imports::ID4, ID_MNUW, ID_MORF, ID_RGBA, ID_SPOT, ID_TXUV, Teddy::SysSupport::M_LWO, Teddy::Imports::U2, and Teddy::Imports::VX. Referenced by processChunk. |
|
Definition at line 127 of file LWLayer.h. Referenced by boundingBox_VEC12_VEC12, and LWLayer. |
|
Definition at line 126 of file LWLayer.h. Referenced by boundingBox_VEC12_VEC12, and LWLayer. |
|
Definition at line 119 of file LWLayer.h. Referenced by clip_U4_sc, and getClip. |
|
Definition at line 113 of file LWLayer.h. Referenced by comments_S0. |
|
Definition at line 125 of file LWLayer.h. Referenced by LWLayer. |
|
Definition at line 112 of file LWLayer.h. Referenced by descriptionLine_S0. |
|
Definition at line 118 of file LWLayer.h. Referenced by envelope_U4_sc. |
|
Definition at line 109 of file LWLayer.h. Referenced by boundingBox_VEC12_VEC12, clip_U4_sc, comments_S0, descriptionLine_S0, envelope_U4_sc, faceList, LWLayer, pointList, polygonList, polygonTags_ID4_d, processChunk, processLayer, surf_S0_S0_sc, surface_sc, surfaceList, thumbnail_U2_U2_d, and vertexMapping_ID4_U2_S0_d. |
|
Definition at line 117 of file LWLayer.h. Referenced by faceList, polygonList, and polygonTags_ID4_d. |
|
Layer flags.
Definition at line 108 of file LWLayer.h. Referenced by LWLayer, and polygonList. |
|
Model which contains this Layer.
Definition at line 110 of file LWLayer.h. Referenced by faceList, getModel, LWLayer, polygonTags_ID4_d, processChunk, processLayer, and surfaceList. |
|
Definition at line 114 of file LWLayer.h. Referenced by faceList, polygonTags_ID4_d, and surfaceList. |
|
Definition at line 124 of file LWLayer.h. Referenced by clip_U4_sc, and LWLayer. |
|
Definition at line 123 of file LWLayer.h. Referenced by envelope_U4_sc, and LWLayer. |
|
Definition at line 121 of file LWLayer.h. Referenced by faceList, LWLayer, and polygonList. |
|
Definition at line 122 of file LWLayer.h. Referenced by faceList, LWLayer, and surfaceList. |
|
Definition at line 120 of file LWLayer.h. Referenced by faceList, LWLayer, pointList, and polygonList. |
|
Parent layer number.
Definition at line 106 of file LWLayer.h. Referenced by LWLayer. |
|
Pivot point of layer.
|
|
Definition at line 115 of file LWLayer.h. Referenced by polygonTags_ID4_d, surf_S0_S0_sc, surface_sc, and surfaceList. |
|
These are shared among surfaces.
Definition at line 116 of file LWLayer.h. Referenced by faceList, pointList, and polygonList. |