Panda3D
 All Classes Functions Variables Enumerations
lwoInputFile.h
1 // Filename: lwoInputFile.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 LWOINPUTFILE_H
16 #define LWOINPUTFILE_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "iffInputFile.h"
21 
22 #include "luse.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : LwoInputFile
26 // Description : A specialization of IffInputFile to handle reading a
27 // Lightwave Object file.
28 ////////////////////////////////////////////////////////////////////
29 class LwoInputFile : public IffInputFile {
30 public:
31  LwoInputFile();
32  ~LwoInputFile();
33 
34  INLINE double get_lwo_version() const;
35  INLINE void set_lwo_version(double version);
36 
37  int get_vx();
40 
41 protected:
42  virtual IffChunk *make_new_chunk(IffId id);
43 
44 private:
45  double _lwo_version;
46 
47 public:
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  IffInputFile::init_type();
57  register_type(_type_handle, "LwoInputFile",
58  IffInputFile::get_class_type());
59  }
60 
61 private:
62  static TypeHandle _type_handle;
63 };
64 
65 #include "lwoInputFile.I"
66 
67 #endif
68 
69 
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
void set_lwo_version(double version)
Changes the version number reported for the Lightwave file.
Definition: lwoInputFile.I:37
int get_vx()
Reads a Lightwave variable-length index.
LVecBase3 get_vec3()
Reads a three-component vector of floats.
Filename get_filename()
Reads a Lightwave platform-neutral filename and converts it to a Panda platform-neutral filename...
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on...
Definition: iffChunk.h:32
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
A wrapper around an istream used for reading an IFF file.
Definition: iffInputFile.h:33
double get_lwo_version() const
Returns the version of the Lightwave file being read.
Definition: lwoInputFile.I:24
A specialization of IffInputFile to handle reading a Lightwave Object file.
Definition: lwoInputFile.h:29
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A four-byte chunk ID appearing in an "IFF" file.
Definition: iffId.h:29