Panda3D
|
00001 // Filename: cLwoClip.cxx 00002 // Created by: drose (27Apr01) 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 "cLwoClip.h" 00016 #include "lwoToEggConverter.h" 00017 00018 #include "lwoClip.h" 00019 #include "lwoStillImage.h" 00020 #include "dcast.h" 00021 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Function: CLwoClip::Constructor 00025 // Access: Public 00026 // Description: 00027 //////////////////////////////////////////////////////////////////// 00028 CLwoClip:: 00029 CLwoClip(LwoToEggConverter *converter, const LwoClip *clip) : 00030 _converter(converter), 00031 _clip(clip) 00032 { 00033 _still_image = false; 00034 00035 // Walk through the chunk list, looking for some basic properties. 00036 int num_chunks = _clip->get_num_chunks(); 00037 for (int i = 0; i < num_chunks; i++) { 00038 const IffChunk *chunk = _clip->get_chunk(i); 00039 00040 if (chunk->is_of_type(LwoStillImage::get_class_type())) { 00041 const LwoStillImage *image = DCAST(LwoStillImage, chunk); 00042 _filename = image->_filename; 00043 _still_image = true; 00044 } 00045 } 00046 }