|
From: Damian M. <da...@es...> - 2002-04-04 03:38:15
|
Inside the code for VrmlNodeLOD, there are comments for delayed-load
inlines.
I was interested in knowing who is the author of this because I wish to
have an optional method of load whereby the load is delayed until that
level of the LOD is required to be rendered. I would be curious to
discuss the issues. I do not need the delayed load to be asynchronously
executed. Actually, I explicitly do NOT want to done asynchronously as
I want it done only the first time it is rendered.
I have having trouble figuring out what structure I need to manipulate
to get this effect and any associated code I need to write to get it
fully implemented.
void
VrmlNodeLOD::recalcBSphere()
{
//cout << "VrmlNodeLOD[" << this << "]::recalcBSphere()" << endl;
d_bsphere.reset();
// let's say our bsphere is the union of the bspheres of all the
// levels. we could have said it was just the bsphere of the current
// level, but the current level depends on the viewer position, and
// we'd like to make the calculation idependent of that. we could do
// some sort of trick where we reset the bsphere during render, but
// that seems like overkill unless this simpler method proves to be
// a bottleneck.
//
// hmm: just thought of a problem: one of the uses of the lod is to
// switch in delayed-load inlines. this would necessarily switch
// them in all at once. live with it for now.
//
for(int i=0; i<(int) d_level.getLength(); i++) {
const VrmlBVolume* ci_bv = d_level.getElement(i)->getBVolume();
d_bsphere.extend(*ci_bv);
}
this->setBVolumeDirty(false);
}
Many Thanks - Damian (McGuckin)
Pacific Engineering Systems International, 22/8 Campbell St, Artarmon NSW 2064
Ph:+61-2-99063377 .. Fx:+61-2-99063468 | unsolicited email not wanted here !
Views and opinions here are mine and not those of any past or present employer
|