15 #include "lwoSurfaceBlock.h"
16 #include "iffInputFile.h"
17 #include "lwoSurfaceBlockAxis.h"
18 #include "lwoSurfaceBlockImage.h"
19 #include "lwoSurfaceBlockHeader.h"
20 #include "lwoSurfaceBlockProjection.h"
21 #include "lwoSurfaceBlockRepeat.h"
22 #include "lwoSurfaceBlockTMap.h"
23 #include "lwoSurfaceBlockWrap.h"
24 #include "lwoSurfaceBlockVMapName.h"
43 PT(
IffChunk) chunk = in->get_subchunk(
this);
47 if (!chunk->is_of_type(LwoSurfaceBlockHeader::get_class_type())) {
48 nout <<
"Invalid chunk for header of surface block: " << *chunk <<
"\n";
54 read_subchunks_iff(in, stop_at);
63 void LwoSurfaceBlock::
64 write(ostream &out,
int indent_level)
const {
65 indent(out, indent_level)
67 _header->write(out, indent_level + 2);
69 write_chunks(out, indent_level + 2);
70 indent(out, indent_level)
83 if (
id ==
IffId(
"IMAP") ||
84 id ==
IffId(
"PROC") ||
85 id ==
IffId(
"GRAD") ||
86 id ==
IffId(
"SHDR")) {
89 }
else if (
id ==
IffId(
"TMAP")) {
92 }
else if (
id ==
IffId(
"PROJ")) {
95 }
else if (
id ==
IffId(
"AXIS")) {
98 }
else if (
id ==
IffId(
"IMAG")) {
101 }
else if (
id ==
IffId(
"WRAP")) {
104 }
else if (
id ==
IffId(
"WRPH") ||
105 id ==
IffId(
"WRPW")) {
108 }
else if (
id ==
IffId(
"VMAP")) {
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 IffChunk * make_new_chunk(IffInputFile *in, IffId id)
Allocates and returns a new chunk of the appropriate type based on the given ID, according to the con...
For cylindrical and spherical projections, this parameter controls how many times the image repeats o...
The tMap chunk within a LwoSurfaceBlock chunk.
Specifies how the texture image appears for areas outside the image.
Specifies the name of a set of UV's defined on the polygons that use this model.
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on...
IffId get_id() const
Returns the ID associated with this chunk.
Indicates the projection mode for this particular shader.
virtual IffChunk * make_new_chunk(IffInputFile *in, IffId id)
Allocates and returns a new chunk of the appropriate type based on the given ID, according to the con...
Indicates the axis for this particular shader's projection.
Specifies the particular image that is being applied as a texture.
TypeHandle is the identifier used to differentiate C++ class types.
A four-byte chunk ID appearing in an "IFF" file.