Panda3D

bamWriter.I

00001 // Filename: bamWriter.I
00002 // Created by:  jason (08Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: BamWriter::get_target
00018 //       Access: Published
00019 //  Description: Returns the current target of the BamWriter as set by
00020 //               set_target() or the constructor.
00021 ////////////////////////////////////////////////////////////////////
00022 INLINE DatagramSink *BamWriter::
00023 get_target() {
00024   return _target;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: BamWriter::get_filename
00029 //       Access: Published
00030 //  Description: If a BAM is a file, then the BamWriter should
00031 //               contain the name of the file.  This enables the
00032 //               writer to convert pathnames in the BAM to relative
00033 //               to the directory containing the BAM.
00034 ////////////////////////////////////////////////////////////////////
00035 INLINE const Filename &BamWriter::
00036 get_filename() const {
00037   if (_target != (DatagramSink *)NULL) {
00038     return _target->get_filename();
00039   }
00040   static const Filename empty_filename;
00041   return empty_filename;
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: BamWriter::get_file_endian
00046 //       Access: Published
00047 //  Description: Returns the endian preference indicated by the Bam
00048 //               file currently being written.  This does not imply
00049 //               that every number is stored using the indicated
00050 //               convention, but individual objects may choose to
00051 //               respect this flag when recording data.
00052 ////////////////////////////////////////////////////////////////////
00053 INLINE BamWriter::BamEndian BamWriter::
00054 get_file_endian() const {
00055   return _file_endian;
00056 }
00057 
00058 ////////////////////////////////////////////////////////////////////
00059 //     Function: BamWriter::get_file_stdfloat_double
00060 //       Access: Published
00061 //  Description: Returns true if the file will store all "standard"
00062 //               floats as 64-bit doubles, or false if they are 32-bit
00063 //               floats.  This isn't runtime settable; it's based on
00064 //               the compilation flags of the version of Panda that
00065 //               generated this file.
00066 ////////////////////////////////////////////////////////////////////
00067 INLINE bool BamWriter::
00068 get_file_stdfloat_double() const {
00069   return _file_stdfloat_double;
00070 }
00071 
00072 ////////////////////////////////////////////////////////////////////
00073 //     Function: BamWriter::get_file_texture_mode
00074 //       Access: Published
00075 //  Description: Returns the BamTextureMode preference indicated by
00076 //               the Bam file currently being written.  Texture
00077 //               objects written to this Bam file will be encoded
00078 //               according to the specified mode.
00079 ////////////////////////////////////////////////////////////////////
00080 INLINE BamWriter::BamTextureMode BamWriter::
00081 get_file_texture_mode() const {
00082   return _file_texture_mode;
00083 }
00084 
00085 ////////////////////////////////////////////////////////////////////
00086 //     Function: BamWriter::set_file_texture_mode
00087 //       Access: Published
00088 //  Description: Changes the BamTextureMode preference for
00089 //               the Bam file currently being written.  Texture
00090 //               objects written to this Bam file will be encoded
00091 //               according to the specified mode.
00092 ////////////////////////////////////////////////////////////////////
00093 INLINE void BamWriter::
00094 set_file_texture_mode(BamTextureMode file_texture_mode) {
00095   _file_texture_mode = file_texture_mode;
00096 }
 All Classes Functions Variables Enumerations