Panda3D

cLwoClip.cxx
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file cLwoClip.cxx
10 * @author drose
11 * @date 2001-04-27
12 */
13
14 #include "cLwoClip.h"
15 #include "lwoToEggConverter.h"
16
17 #include "lwoClip.h"
18 #include "lwoStillImage.h"
19 #include "dcast.h"
20
21
22 /**
23 *
24 */
25 CLwoClip::
26 CLwoClip(LwoToEggConverter *converter, const LwoClip *clip) :
27 _converter(converter),
28 _clip(clip)
29 {
30 _still_image = false;
31
32 // Walk through the chunk list, looking for some basic properties.
33 int num_chunks = _clip->get_num_chunks();
34 for (int i = 0; i < num_chunks; i++) {
35 const IffChunk *chunk = _clip->get_chunk(i);
36
37 if (chunk->is_of_type(LwoStillImage::get_class_type())) {
38 const LwoStillImage *image = DCAST(LwoStillImage, chunk);
39 _filename = image->_filename;
40 _still_image = true;
41 }
42 }
43 }
cLwoClip.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
IffChunk
The basic kind of record in an EA "IFF" file, which the LightWave object file is based on.
Definition: iffChunk.h:30
LwoClip
A single image file, or a numbered sequence of images (e.g.
Definition: lwoClip.h:25
LwoStillImage
A single still image associated with a LwoClip chunk.
Definition: lwoStillImage.h:26
LwoToEggConverter
This class supervises the construction of an EggData structure from the data represented by the LwoHe...
Definition: lwoToEggConverter.h:38
TypedObject::is_of_type
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
Definition: typedObject.I:28
dcast.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lwoClip.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lwoStillImage.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lwoToEggConverter.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.