Panda3D
 All Classes Functions Variables Enumerations
lwoLayer.h
1 // Filename: lwoLayer.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 LWOLAYER_H
16 #define LWOLAYER_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoChunk.h"
21 
22 #include "luse.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : LwoLayer
26 // Description : Signals the start of a new layer. All the data
27 // chunks which follow will be included in this layer
28 // until another layer chunk is encountered. If data is
29 // encountered before a layer chunk, it goes into an
30 // arbitrary layer.
31 ////////////////////////////////////////////////////////////////////
32 class LwoLayer : public LwoChunk {
33 public:
34  void make_generic();
35 
36  enum Flags {
37  F_hidden = 0x0001
38  };
39 
40  int _number;
41  int _flags;
42  LPoint3 _pivot;
43  string _name;
44  int _parent;
45 
46 public:
47  virtual bool read_iff(IffInputFile *in, size_t stop_at);
48  virtual void write(ostream &out, int indent_level = 0) const;
49 
50 public:
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55  static TypeHandle get_class_type() {
56  return _type_handle;
57  }
58  static void init_type() {
59  LwoChunk::init_type();
60  register_type(_type_handle, "LwoLayer",
61  LwoChunk::get_class_type());
62  }
63 
64 private:
65  static TypeHandle _type_handle;
66 };
67 
68 #endif
69 
70 
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
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.
Definition: lwoLayer.cxx:49
Signals the start of a new layer.
Definition: lwoLayer.h:32
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
void make_generic()
Resets the layer's parameters to initial defaults for a generic layer created implicitly.
Definition: lwoLayer.cxx:30