Panda3D
eggToSomething.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 eggToSomething.h
10  * @author drose
11  * @date 2000-02-15
12  */
13 
14 #ifndef EGGTOSOMETHING_H
15 #define EGGTOSOMETHING_H
16 
17 #include "pandatoolbase.h"
18 
19 #include "eggConverter.h"
20 #include "distanceUnit.h"
21 
22 /**
23  * This is the general base class for a file-converter program that reads some
24  * model file format and generates an egg file.
25  */
26 class EggToSomething : public EggConverter {
27 public:
28  EggToSomething(const std::string &format_name,
29  const std::string &preferred_extension = std::string(),
30  bool allow_last_param = true,
31  bool allow_stdout = true);
32 
33  void add_units_options();
34 
35 protected:
36  void apply_units_scale(EggData *data);
37  virtual void pre_process_egg_file();
38  virtual bool handle_args(Args &args);
39 
40  DistanceUnit _input_units;
41  DistanceUnit _output_units;
42 };
43 
44 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the primary interface into all the egg data, and the root of the egg file structure.
Definition: eggData.h:37
DistanceUnit
This enumerated type lists all the kinds of units we're likely to come across in model conversion pro...
Definition: distanceUnit.h:23
This is a general base class for programs that convert between egg files and some other format.
Definition: eggConverter.h:25
EggToSomething(const std::string &format_name, const std::string &preferred_extension=std::string(), bool allow_last_param=true, bool allow_stdout=true)
The first parameter to the constructor should be the one-word name of the file format that is to be r...
This is the general base class for a file-converter program that reads some model file format and gen...
void add_units_options()
Adds -ui and -uo as valid options for this program.