00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "lwoSurfaceBlockOpacity.h"
00016 #include "lwoInputFile.h"
00017
00018 #include "dcast.h"
00019 #include "indent.h"
00020
00021 TypeHandle LwoSurfaceBlockOpacity::_type_handle;
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 bool LwoSurfaceBlockOpacity::
00034 read_iff(IffInputFile *in, size_t stop_at) {
00035 LwoInputFile *lin = DCAST(LwoInputFile, in);
00036
00037 _type = (Type)lin->get_be_uint16();
00038 _opacity = lin->get_be_float32();
00039 _envelope = lin->get_vx();
00040
00041 return true;
00042 }
00043
00044
00045
00046
00047
00048
00049 void LwoSurfaceBlockOpacity::
00050 write(ostream &out, int indent_level) const {
00051 indent(out, indent_level)
00052 << get_id() << " { type = " << (int)_type
00053 << ", opacity = " << _opacity * 100.0 << "%, envelope = " << _envelope
00054 << " }\n";
00055 }