Panda3D
 All Classes Functions Variables Enumerations
lwoSurfaceBlockProjection.h
1 // Filename: lwoSurfaceBlockProjection.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 LWOSURFACEBLOCKPROJECTION_H
16 #define LWOSURFACEBLOCKPROJECTION_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoChunk.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LwoSurfaceBlockProjection
24 // Description : Indicates the projection mode for this particular
25 // shader. This determines how UV coordinates should be
26 // computed based on the vertex positions. This is a
27 // subchunk of LwoSurfaceBlock.
28 ////////////////////////////////////////////////////////////////////
30 public:
31  enum Mode {
32  M_planar = 0,
33  M_cylindrical = 1,
34  M_spherical = 2,
35  M_cubic = 3,
36  M_front = 4,
37  M_uv = 5
38  };
39  Mode _mode;
40 
41 public:
42  virtual bool read_iff(IffInputFile *in, size_t stop_at);
43  virtual void write(ostream &out, int indent_level = 0) const;
44 
45 public:
46  virtual TypeHandle get_type() const {
47  return get_class_type();
48  }
49  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  LwoChunk::init_type();
55  register_type(_type_handle, "LwoSurfaceBlockProjection",
56  LwoChunk::get_class_type());
57  }
58 
59 private:
60  static TypeHandle _type_handle;
61 };
62 
63 #endif
64 
65 
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
Indicates the projection mode for this particular shader.
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