Panda3D
lwoSurfaceBlockHeader.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file lwoSurfaceBlockHeader.h
10  * @author drose
11  * @date 2001-04-24
12  */
13 
14 #ifndef LWOSURFACEBLOCKHEADER_H
15 #define LWOSURFACEBLOCKHEADER_H
16 
17 #include "pandatoolbase.h"
18 
19 #include "lwoGroupChunk.h"
20 
21 /**
22  * The header chunk within a LwoSurfaceBlock chunk.
23  */
25 public:
26  std::string _ordinal;
27 
28 public:
29  virtual bool read_iff(IffInputFile *in, size_t stop_at);
30  virtual void write(std::ostream &out, int indent_level = 0) const;
31 
32  virtual IffChunk *make_new_chunk(IffInputFile *in, IffId id);
33 
34 public:
35  virtual TypeHandle get_type() const {
36  return get_class_type();
37  }
38  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  LwoGroupChunk::init_type();
44  register_type(_type_handle, "LwoSurfaceBlockHeader",
45  LwoGroupChunk::get_class_type());
46  }
47 
48 private:
49  static TypeHandle _type_handle;
50 };
51 
52 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on.
Definition: iffChunk.h:30
virtual bool read_iff(IffInputFile *in, size_t stop_at)
Reads the data of the chunk in from the given input file, if possible.
A wrapper around an istream used for reading an IFF file.
Definition: iffInputFile.h:30
The header chunk within a LwoSurfaceBlock chunk.
A particular kind of LwoChunk that is expected to contain an arbitrary number of child chunks.
Definition: lwoGroupChunk.h:30
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
A four-byte chunk ID appearing in an "IFF" file.
Definition: iffId.h:26