Panda3D

Loading...
Searching...
No Matches
eggFilenameNode.I
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 eggFilenameNode.I
10 * @author drose
11 * @date 1999-02-11
12 */
13
14/**
15 *
16 */
17INLINE EggFilenameNode::
18EggFilenameNode() {
19}
20
21/**
22 *
23 */
24INLINE EggFilenameNode::
25EggFilenameNode(const std::string &node_name, const Filename &filename) :
26 EggNode(node_name),
27 _filename(filename),
28 _fullpath(filename)
29{
30}
31
32/**
33 *
34 */
35INLINE EggFilenameNode::
36EggFilenameNode(const EggFilenameNode &copy) :
37 EggNode(copy),
38 _filename(copy._filename),
39 _fullpath(copy._fullpath)
40{
41}
42
43/**
44 *
45 */
46INLINE EggFilenameNode &EggFilenameNode::
47operator = (const EggFilenameNode &copy) {
48 EggNode::operator = (copy);
49 _filename = copy._filename;
50 _fullpath = copy._fullpath;
51 return *this;
52}
53
54/**
55 * Returns a nonmodifiable reference to the filename.
56 */
57INLINE const Filename &EggFilenameNode::
58 get_filename() const {
59 return _filename;
60}
61
62/**
63 *
64 */
65INLINE void EggFilenameNode::
66set_filename(const Filename &filename) {
67 _filename = filename;
68 _fullpath = filename;
69}
70
71/**
72 * Returns the full pathname to the file, if it is known; otherwise, returns
73 * the same thing as get_filename().
74 *
75 * This function simply returns whatever was set by the last call to
76 * set_fullpath(). This string is not written to the egg file; its main
77 * purpose is to record the full path to a filename (for instance, a texture
78 * filename) if it is known, for egg structures that are generated in-memory
79 * and then immediately converted to a scene graph.
80 */
81INLINE const Filename &EggFilenameNode::
82 get_fullpath() const {
83 return _fullpath;
84}
85
86/**
87 * Records the full pathname to the file, for the benefit of get_fullpath().
88 */
89INLINE void EggFilenameNode::
90 set_fullpath(const Filename &fullpath) {
91 _fullpath = fullpath;
92}
EggFilenameNode
This is an egg node that contains a filename.
Definition eggFilenameNode.h:27
EggFilenameNode::set_fullpath
void set_fullpath(const Filename &fullpath)
Records the full pathname to the file, for the benefit of get_fullpath().
Definition eggFilenameNode.I:90
EggFilenameNode::get_filename
const Filename & get_filename() const
Returns a nonmodifiable reference to the filename.
Definition eggFilenameNode.I:58
EggFilenameNode::get_fullpath
const Filename & get_fullpath() const
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filen...
Definition eggFilenameNode.I:82
EggNode
A base class for things that may be directly added into the egg hierarchy.
Definition eggNode.h:36
Filename
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44