Panda3D
 All Classes Functions Variables Enumerations
fltVectorRecord.h
00001 // Filename: fltVectorRecord.h
00002 // Created by:  drose (30Aug02)
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 FLTVECTORRECORD_H
00016 #define FLTVECTORRECORD_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "fltRecord.h"
00021 
00022 #include "luse.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : FltVectorRecord
00026 // Description : This is an ancillary record of the old (pre-15.4)
00027 //               face node.  Its only use is to provide the direction
00028 //               vector for unidirectional and bidirectional light
00029 //               point faces.
00030 ////////////////////////////////////////////////////////////////////
00031 class FltVectorRecord : public FltRecord {
00032 public:
00033   FltVectorRecord(FltHeader *header);
00034 
00035   const LVector3 &get_vector() const;
00036 
00037 protected:
00038   LVector3 _vector;
00039 
00040 protected:
00041   virtual bool extract_record(FltRecordReader &reader);
00042   virtual bool build_record(FltRecordWriter &writer) const;
00043 
00044 public:
00045   virtual TypeHandle get_type() const {
00046     return get_class_type();
00047   }
00048   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00049   static TypeHandle get_class_type() {
00050     return _type_handle;
00051   }
00052   static void init_type() {
00053     FltRecord::init_type();
00054     register_type(_type_handle, "FltVectorRecord",
00055                   FltRecord::get_class_type());
00056   }
00057 
00058 private:
00059   static TypeHandle _type_handle;
00060 
00061   friend class FltBead;
00062 };
00063 
00064 #endif
00065 
00066 
 All Classes Functions Variables Enumerations