00001 // Filename: cLwoClip.cxx 00002 // Created by: drose (27Apr01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "cLwoClip.h" 00020 #include "lwoToEggConverter.h" 00021 00022 #include "lwoClip.h" 00023 #include "lwoStillImage.h" 00024 #include "dcast.h" 00025 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: CLwoClip::Constructor 00029 // Access: Public 00030 // Description: 00031 //////////////////////////////////////////////////////////////////// 00032 CLwoClip:: 00033 CLwoClip(LwoToEggConverter *converter, const LwoClip *clip) : 00034 _converter(converter), 00035 _clip(clip) 00036 { 00037 _still_image = false; 00038 00039 // Walk through the chunk list, looking for some basic properties. 00040 int num_chunks = _clip->get_num_chunks(); 00041 for (int i = 0; i < num_chunks; i++) { 00042 const IffChunk *chunk = _clip->get_chunk(i); 00043 00044 if (chunk->is_of_type(LwoStillImage::get_class_type())) { 00045 const LwoStillImage *image = DCAST(LwoStillImage, chunk); 00046 _filename = image->_filename; 00047 _still_image = true; 00048 } 00049 } 00050 }