Panda3D
lwoSurfaceBlockChannel.h
1 // Filename: lwoSurfaceBlockChannel.h
2 // Created by: drose (24Apr01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef LWOSURFACEBLOCKCHANNEL_H
16 #define LWOSURFACEBLOCKCHANNEL_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoChunk.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LwoSurfaceBlockChannel
24 // Description : Indicates which channel the texture in this
25 // LwoSurfaceBlock is applied to. This is a subchunk of
26 // LwoSurfaceBlockHeader.
27 ////////////////////////////////////////////////////////////////////
29 public:
30  IffId _channel_id;
31 
32 public:
33  virtual bool read_iff(IffInputFile *in, size_t stop_at);
34  virtual void write(ostream &out, int indent_level = 0) const;
35 
36 public:
37  virtual TypeHandle get_type() const {
38  return get_class_type();
39  }
40  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
41  static TypeHandle get_class_type() {
42  return _type_handle;
43  }
44  static void init_type() {
45  LwoChunk::init_type();
46  register_type(_type_handle, "LwoSurfaceBlockChannel",
47  LwoChunk::get_class_type());
48  }
49 
50 private:
51  static TypeHandle _type_handle;
52 };
53 
54 #endif
55 
56 
Indicates which channel the texture in this LwoSurfaceBlock is applied to.
A specialization of IffChunk for Lightwave Object files.
Definition: lwoChunk.h:29
A wrapper around an istream used for reading an IFF file.
Definition: iffInputFile.h:33
virtual bool read_iff(IffInputFile *in, size_t stop_at)
Reads the data of the chunk in from the given input file, if possible.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A four-byte chunk ID appearing in an "IFF" file.
Definition: iffId.h:29