Panda3D
 All Classes Functions Variables Enumerations
lwoSurfaceSmoothingAngle.cxx
00001 // Filename: lwoSurfaceSmoothingAngle.cxx
00002 // Created by:  drose (24Apr01)
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 #include "lwoSurfaceSmoothingAngle.h"
00016 #include "lwoInputFile.h"
00017 
00018 #include "dcast.h"
00019 #include "indent.h"
00020 #include "deg_2_rad.h"
00021 
00022 TypeHandle LwoSurfaceSmoothingAngle::_type_handle;
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //     Function: LwoSurfaceSmoothingAngle::read_iff
00026 //       Access: Public, Virtual
00027 //  Description: Reads the data of the chunk in from the given input
00028 //               file, if possible.  The ID and length of the chunk
00029 //               have already been read.  stop_at is the byte position
00030 //               of the file to stop at (based on the current position
00031 //               at in->get_bytes_read()).  Returns true on success,
00032 //               false otherwise.
00033 ////////////////////////////////////////////////////////////////////
00034 bool LwoSurfaceSmoothingAngle::
00035 read_iff(IffInputFile *in, size_t stop_at) {
00036   LwoInputFile *lin = DCAST(LwoInputFile, in);
00037 
00038   _angle = lin->get_be_float32();
00039 
00040   return true;
00041 }
00042 
00043 ////////////////////////////////////////////////////////////////////
00044 //     Function: LwoSurfaceSmoothingAngle::write
00045 //       Access: Public, Virtual
00046 //  Description:
00047 ////////////////////////////////////////////////////////////////////
00048 void LwoSurfaceSmoothingAngle::
00049 write(ostream &out, int indent_level) const {
00050   indent(out, indent_level)
00051     << get_id() << " { angle = " << rad_2_deg(_angle) << " degrees }\n";
00052 }
 All Classes Functions Variables Enumerations