Panda3D
lwoSurfaceParameter.h
1 // Filename: lwoSurfaceParameter.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 LWOSURFACEPARAMETER_H
16 #define LWOSURFACEPARAMETER_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoChunk.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LwoSurfaceParameter
24 // Description : Records some parameter value of a surface material,
25 // as an entry within a LwoSurface chunk. The meaning
26 // of the value is determined by the id of this chunk.
27 ////////////////////////////////////////////////////////////////////
28 class LwoSurfaceParameter : public LwoChunk {
29 public:
30  PN_stdfloat _value;
31  int _envelope;
32 
33 public:
34  virtual bool read_iff(IffInputFile *in, size_t stop_at);
35  virtual void write(ostream &out, int indent_level = 0) const;
36 
37 public:
38  virtual TypeHandle get_type() const {
39  return get_class_type();
40  }
41  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  LwoChunk::init_type();
47  register_type(_type_handle, "LwoSurfaceParameter",
48  LwoChunk::get_class_type());
49  }
50 
51 private:
52  static TypeHandle _type_handle;
53 };
54 
55 #endif
56 
57 
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 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
Records some parameter value of a surface material, as an entry within a LwoSurface chunk...