Panda3D
 All Classes Functions Variables Enumerations
loaderFileTypeSrt.h
1 // Filename: loaderFileTypeSrt.h
2 // Created by: drose (06Oct10)
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 LOADERFILETYPESRT_H
16 #define LOADERFILETYPESRT_H
17 
18 #include "pandabase.h"
19 
20 #include "loaderFileType.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LoaderFileTypeSrt
24 // Description : This defines the Loader interface to read SpeedTree
25 // SRT files, which describe a single tree. It actually
26 // returns a SpeedTreeNode with just a single tree
27 // within it.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDASPEEDTREE LoaderFileTypeSrt : public LoaderFileType {
30 public:
32 
33  virtual string get_name() const;
34  virtual string get_extension() const;
35  virtual bool supports_compressed() const;
36 
37  virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
38  BamCacheRecord *record) const;
39 
40 public:
41  static TypeHandle get_class_type() {
42  return _type_handle;
43  }
44  static void init_type() {
45  LoaderFileType::init_type();
46  register_type(_type_handle, "LoaderFileTypeSrt",
47  LoaderFileType::get_class_type());
48  }
49  virtual TypeHandle get_type() const {
50  return get_class_type();
51  }
52  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
53 
54 private:
55  static TypeHandle _type_handle;
56 };
57 
58 #endif
59 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
Specifies parameters that may be passed to the loader.
Definition: loaderOptions.h:26
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This is the base class for a family of scene-graph file types that the Loader supports.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension)...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This defines the Loader interface to read SpeedTree SRT files, which describe a single tree...