Panda3D
lwoSurfaceColor.h
1 // Filename: lwoSurfaceColor.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 LWOSURFACECOLOR_H
16 #define LWOSURFACECOLOR_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoChunk.h"
21 
22 #include "luse.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : LwoSurfaceColor
26 // Description : Records the base color of a surface, as an entry
27 // within a LwoSurface chunk.
28 ////////////////////////////////////////////////////////////////////
29 class LwoSurfaceColor : public LwoChunk {
30 public:
31  LRGBColor _color;
32  int _envelope;
33 
34 public:
35  virtual bool read_iff(IffInputFile *in, size_t stop_at);
36  virtual void write(ostream &out, int indent_level = 0) const;
37 
38 public:
39  virtual TypeHandle get_type() const {
40  return get_class_type();
41  }
42  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  LwoChunk::init_type();
48  register_type(_type_handle, "LwoSurfaceColor",
49  LwoChunk::get_class_type());
50  }
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
56 #endif
57 
58 
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
virtual bool read_iff(IffInputFile *in, size_t stop_at)
Reads the data of the chunk in from the given input file, if possible.
Records the base color of a surface, as an entry within a LwoSurface chunk.
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
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85