Panda3D
Loading...
Searching...
No Matches
bamWriter.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 bamWriter.I
10 * @author jason
11 * @date 2000-06-08
12 */
13
14/**
15 * Returns the current target of the BamWriter as set by set_target() or the
16 * constructor.
17 */
19get_target() {
20 return _target;
21}
22
23/**
24 * If a BAM is a file, then the BamWriter should contain the name of the file.
25 * This enables the writer to convert pathnames in the BAM to relative to the
26 * directory containing the BAM.
27 */
28INLINE const Filename &BamWriter::
29get_filename() const {
30 if (_target != nullptr) {
31 return _target->get_filename();
32 }
33 static const Filename empty_filename;
34 return empty_filename;
35}
36
37/**
38 * Returns the major version number of the Bam file currently being written.
39 */
40INLINE int BamWriter::
41get_file_major_ver() const {
42 return _file_major;
43}
44
45/**
46 * Changes the minor .bam version to write. This should be called before
47 * init(). Each Panda version has only a fairly narrow range of versions it
48 * is able to write; consult the .bam documentation for more information.
49 */
50INLINE void BamWriter::
51set_file_minor_ver(int minor_ver) {
52 _file_minor = minor_ver;
53}
54
55/**
56 * Returns the minor version number of the Bam file currently being written.
57 */
58INLINE int BamWriter::
59get_file_minor_ver() const {
60 return _file_minor;
61}
62
63/**
64 * Returns the endian preference indicated by the Bam file currently being
65 * written. This does not imply that every number is stored using the
66 * indicated convention, but individual objects may choose to respect this
67 * flag when recording data.
68 */
70get_file_endian() const {
71 return _file_endian;
72}
73
74/**
75 * Returns true if the file will store all "standard" floats as 64-bit
76 * doubles, or false if they are 32-bit floats. This isn't runtime settable;
77 * it's based on the compilation flags of the version of Panda that generated
78 * this file.
79 */
80INLINE bool BamWriter::
82 return _file_stdfloat_double;
83}
84
85/**
86 * Returns the BamTextureMode preference indicated by the Bam file currently
87 * being written. Texture objects written to this Bam file will be encoded
88 * according to the specified mode.
89 */
90INLINE BamWriter::BamTextureMode BamWriter::
92 return _file_texture_mode;
93}
94
95/**
96 * Changes the BamTextureMode preference for the Bam file currently being
97 * written. Texture objects written to this Bam file will be encoded
98 * according to the specified mode.
99 */
100INLINE void BamWriter::
101set_file_texture_mode(BamTextureMode file_texture_mode) {
102 _file_texture_mode = file_texture_mode;
103}
104
105/**
106 * Returns the root node of the part of the scene graph we are currently
107 * writing out. This is used for determining what to make NodePaths relative
108 * to.
109 */
111get_root_node() const {
112 return _root_node;
113}
114
115/**
116 * Sets the root node of the part of the scene graph we are currently writing
117 * out. NodePaths written to this bam file will be relative to this node.
118 */
119INLINE void BamWriter::
120set_root_node(TypedWritable *root_node) {
121 _root_node = root_node;
122}
BamEndian
This defines an enumerated type used to represent the endianness of certain numeric values stored in ...
Definition bamEnums.h:32
void set_file_minor_ver(int minor_ver)
Changes the minor .bam version to write.
Definition bamWriter.I:51
get_file_endian
Returns the endian preference indicated by the Bam file currently being written.
Definition bamWriter.h:97
int get_file_major_ver() const
Returns the major version number of the Bam file currently being written.
Definition bamWriter.I:41
void set_file_texture_mode(BamTextureMode file_texture_mode)
Changes the BamTextureMode preference for the Bam file currently being written.
Definition bamWriter.I:101
get_file_texture_mode
Returns the BamTextureMode preference indicated by the Bam file currently being written.
Definition bamWriter.h:99
get_filename
If a BAM is a file, then the BamWriter should contain the name of the file.
Definition bamWriter.h:95
get_file_stdfloat_double
Returns true if the file will store all "standard" floats as 64-bit doubles, or false if they are 32-...
Definition bamWriter.h:98
get_root_node
Returns the root node of the part of the scene graph we are currently writing out.
Definition bamWriter.h:100
set_root_node
Sets the root node of the part of the scene graph we are currently writing out.
Definition bamWriter.h:100
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being written.
Definition bamWriter.I:59
get_target
Returns the current target of the BamWriter as set by set_target() or the constructor.
Definition bamWriter.h:94
This class defines the abstract interface to sending datagrams to any target, whether it be into a fi...
get_filename
Returns the filename that provides the target for these datagrams, if any, or empty string if the dat...
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
Base class for objects that can be written to and read from Bam files.