Panda3D
vrmlToEggConverter.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file vrmlToEggConverter.h
10  * @author drose
11  * @date 2004-10-01
12  */
13 
14 #ifndef VRMLTOEGGCONVERTER_H
15 #define VRMLTOEGGCONVERTER_H
16 
17 #include "pandatoolbase.h"
18 
20 #include "pmap.h"
21 
22 class VrmlNode;
23 struct SFNodeRef;
24 class EggGroupNode;
25 class EggGroup;
26 class LMatrix4d;
27 
28 /**
29  * This class supervises the construction of an EggData structure from a VRML
30  * file.
31  */
33 public:
37 
39 
40  virtual std::string get_name() const;
41  virtual std::string get_extension() const;
42  virtual bool supports_compressed() const;
43 
44  virtual bool convert_file(const Filename &filename);
45 
46 private:
48 
49  void get_all_defs(SFNodeRef &vrml, Nodes &nodes);
50  void vrml_node(const SFNodeRef &vrml, EggGroupNode *egg,
51  const LMatrix4d &net_transform);
52 
53  void vrml_grouping_node(const SFNodeRef &vrml, EggGroupNode *egg,
54  const LMatrix4d &net_transform,
55  void (VRMLToEggConverter::*process_func)
56  (const VrmlNode *node, EggGroup *group,
57  const LMatrix4d &net_transform));
58  void vrml_group(const VrmlNode *node, EggGroup *group,
59  const LMatrix4d &net_transform);
60  void vrml_transform(const VrmlNode *node, EggGroup *group,
61  const LMatrix4d &net_transform);
62  void vrml_shape(const VrmlNode *node, EggGroup *group,
63  const LMatrix4d &net_transform);
64 };
65 
66 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
Definition: pmap.h:49
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:46
virtual SomethingToEggConverter * make_copy()
Allocates and returns a new copy of the converter.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition: eggGroup.h:34
virtual std::string get_extension() const
Returns the common extension of the file type this converter supports.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class supervises the construction of an EggData structure from a VRML file.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension),...
virtual bool convert_file(const Filename &filename)
Handles the reading of the input file and converting it to egg.
This is a base class for a family of converter classes that manage a conversion from some file type t...
virtual std::string get_name() const
Returns the English name of the file type this converter supports.