Panda3D
eggSingleBase.cxx
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 eggSingleBase.cxx
10  * @author drose
11  * @date 2003-07-21
12  */
13 
14 #include "eggSingleBase.h"
15 
16 #include "eggGroupNode.h"
17 #include "eggTexture.h"
18 #include "eggFilenameNode.h"
19 #include "eggComment.h"
20 #include "dcast.h"
21 #include "string_utils.h"
22 
23 /**
24  *
25  */
26 EggSingleBase::
27 EggSingleBase() :
28  _data(new EggData)
29 {
30 }
31 
32 /**
33  * Returns this object as an EggReader pointer, if it is in fact an EggReader,
34  * or NULL if it is not.
35  *
36  * This is intended to work around the C++ limitation that prevents downcasts
37  * past virtual inheritance. Since both EggReader and EggWriter inherit
38  * virtually from EggSingleBase, we need functions like this to downcast to
39  * the appropriate pointer.
40  */
43  return nullptr;
44 }
45 
46 /**
47  * Returns this object as an EggWriter pointer, if it is in fact an EggWriter,
48  * or NULL if it is not.
49  *
50  * This is intended to work around the C++ limitation that prevents downcasts
51  * past virtual inheritance. Since both EggReader and EggWriter inherit
52  * virtually from EggSingleBase, we need functions like this to downcast to
53  * the appropriate pointer.
54  */
57  return nullptr;
58 }
59 
60 /**
61  *
62  */
63 bool EggSingleBase::
64 post_command_line() {
65  if (_got_coordinate_system) {
66  _data->set_coordinate_system(_coordinate_system);
67  }
68 
69  return EggBase::post_command_line();
70 }
This is the primary interface into all the egg data, and the root of the egg file structure.
Definition: eggData.h:37
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual EggReader * as_reader()
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual EggWriter * as_writer()
Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class for a program that reads egg files, but doesn't write an egg file.
Definition: eggReader.h:28
This is the base class for a program that generates an egg file output, but doesn't read any for inpu...
Definition: eggWriter.h:28
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.