fix crashes loading bam files

This commit is contained in:
David Rose 2006-02-24 19:09:35 +00:00
parent 151b661547
commit 0a675eae03
2 changed files with 7 additions and 3 deletions

View File

@ -364,10 +364,13 @@ compute_internal_bounds(int pipeline_stage) const {
// Now actually compute the bounding volume by putting it around all
// of our solids' bounding volumes.
pvector<const BoundingVolume *> child_volumes;
pvector<CPT(BoundingVolume) > cpt_volumes;
Solids::const_iterator gi;
for (gi = _solids.begin(); gi != _solids.end(); ++gi) {
child_volumes.push_back((*gi)->get_bounds());
CPT(BoundingVolume) volume = (*gi)->get_bounds();
cpt_volumes.push_back(volume);
child_volumes.push_back(volume);
}
const BoundingVolume **child_begin = &child_volumes[0];

View File

@ -331,8 +331,9 @@ fillin(DatagramIterator &scan, BamReader *manager) {
_effective_normal.read_datagram(scan);
}
// The viz is always stale after reading from a bam file.
_flags |= F_viz_geom_stale;
// The viz is always stale after reading from a bam file. So is the
// bounding volume.
_flags |= F_viz_geom_stale | F_internal_bounds_stale;
}