Panda3D
loaderFileTypeStf.h
1 // Filename: loaderFileTypeStf.h
2 // Created by: drose (07Oct10)
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 LOADERFILETYPESTF_H
16 #define LOADERFILETYPESTF_H
17 
18 #include "pandabase.h"
19 
20 #include "loaderFileType.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LoaderFileTypeStf
24 // Description : This defines the Loader interface to read SpeedTree
25 // STF files--a simple text file that describes a forest
26 // of trees (references to SRT files).
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDASPEEDTREE LoaderFileTypeStf : public LoaderFileType {
29 public:
31 
32  virtual string get_name() const;
33  virtual string get_extension() const;
34  virtual bool supports_compressed() const;
35 
36  virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
37  BamCacheRecord *record) const;
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  LoaderFileType::init_type();
45  register_type(_type_handle, "LoaderFileTypeStf",
46  LoaderFileType::get_class_type());
47  }
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 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #endif
58 
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...
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension)...
This is the base class for a family of scene-graph file types that the Loader supports.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This defines the Loader interface to read SpeedTree STF files–a simple text file that describes a fo...