Panda3D
 All Classes Functions Variables Enumerations
eggToSomethingConverter.I
1 // Filename: eggToSomethingConverter.I
2 // Created by: drose (26Sep12)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: EggToSomethingConverter::clear_error
18 // Access: Public
19 // Description: Resets the error flag to the no-error state.
20 // had_error() will return false until a new error is
21 // generated.
22 ////////////////////////////////////////////////////////////////////
23 INLINE void EggToSomethingConverter::
25  _error = false;
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: EggToSomethingConverter::had_error
30 // Access: Public
31 // Description: Returns true if an error was detected during the
32 // conversion process, false otherwise.
33 ////////////////////////////////////////////////////////////////////
34 INLINE bool EggToSomethingConverter::
35 had_error() const {
36  return _error;
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: EggToSomethingConverter::clear_egg_data
41 // Access: Public
42 // Description: Sets the EggData to NULL and makes the converter
43 // invalid.
44 ////////////////////////////////////////////////////////////////////
45 INLINE void EggToSomethingConverter::
47  set_egg_data((EggData *)NULL);
48 }
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function: EggToSomethingConverter::get_egg_data
52 // Access: Public
53 // Description: Returns the EggData structure.
54 ////////////////////////////////////////////////////////////////////
57  return _egg_data;
58 }
59 
60 ////////////////////////////////////////////////////////////////////
61 // Function: EggToSomethingConverter::set_output_units
62 // Access: Public
63 // Description: Specifies the units that the EggData has already been
64 // scaled to. This is informational only; if the target
65 // file format supports it, this information will be
66 // written to the header.
67 ////////////////////////////////////////////////////////////////////
69 set_output_units(DistanceUnit output_units) {
70  _output_units = output_units;
71 }
72 
73 ////////////////////////////////////////////////////////////////////
74 // Function: EggToSomethingConverter::get_output_units
75 // Access: Public
76 // Description: Returns the value supplied to set_output_units().
77 ////////////////////////////////////////////////////////////////////
78 DistanceUnit EggToSomethingConverter::
80  return _output_units;
81 }
bool had_error() const
Returns true if an error was detected during the conversion process, false otherwise.
This is the primary interface into all the egg data, and the root of the egg file structure...
Definition: eggData.h:41
DistanceUnit get_output_units() const
Returns the value supplied to set_output_units().
void clear_error()
Resets the error flag to the no-error state.
void set_egg_data(EggData *egg_data)
Sets the egg data that will be filled in when convert_file() is called.
void set_output_units(DistanceUnit output_units)
Specifies the units that the EggData has already been scaled to.
void clear_egg_data()
Sets the EggData to NULL and makes the converter invalid.
EggData * get_egg_data()
Returns the EggData structure.