Panda3D

lwoLayer.h

00001 // Filename: lwoLayer.h
00002 // Created by:  drose (24Apr01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef LWOLAYER_H
00016 #define LWOLAYER_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "lwoChunk.h"
00021 
00022 #include "luse.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : LwoLayer
00026 // Description : Signals the start of a new layer.  All the data
00027 //               chunks which follow will be included in this layer
00028 //               until another layer chunk is encountered.  If data is
00029 //               encountered before a layer chunk, it goes into an
00030 //               arbitrary layer.
00031 ////////////////////////////////////////////////////////////////////
00032 class LwoLayer : public LwoChunk {
00033 public:
00034   void make_generic();
00035 
00036   enum Flags {
00037     F_hidden   = 0x0001
00038   };
00039 
00040   int _number;
00041   int _flags;
00042   LPoint3 _pivot;
00043   string _name;
00044   int _parent;
00045 
00046 public:
00047   virtual bool read_iff(IffInputFile *in, size_t stop_at);
00048   virtual void write(ostream &out, int indent_level = 0) const;
00049 
00050 public:
00051   virtual TypeHandle get_type() const {
00052     return get_class_type();
00053   }
00054   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00055   static TypeHandle get_class_type() {
00056     return _type_handle;
00057   }
00058   static void init_type() {
00059     LwoChunk::init_type();
00060     register_type(_type_handle, "LwoLayer",
00061                   LwoChunk::get_class_type());
00062   }
00063 
00064 private:
00065   static TypeHandle _type_handle;
00066 };
00067 
00068 #endif
00069 
00070 
 All Classes Functions Variables Enumerations