Panda3D
pandatool
src
eggbase
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
*/
41
EggReader
*
EggSingleBase::
42
as_reader
() {
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
*/
55
EggWriter
*
EggSingleBase::
56
as_writer
() {
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
}
EggData
This is the primary interface into all the egg data, and the root of the egg file structure...
Definition:
eggData.h:37
dcast.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
string_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggSingleBase::as_reader
virtual EggReader * as_reader()
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not...
Definition:
eggSingleBase.cxx:42
eggGroupNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggSingleBase::as_writer
virtual EggWriter * as_writer()
Returns this object as an EggWriter pointer, if it is in fact an EggWriter, or NULL if it is not...
Definition:
eggSingleBase.cxx:56
eggSingleBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggReader
This is the base class for a program that reads egg files, but doesn't write an egg file...
Definition:
eggReader.h:28
EggWriter
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
eggTexture.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggFilenameNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggComment.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Thu Jan 3 2019 22:58:24 for Panda3D by
1.8.14