StelSphericalIndex.hpp   StelSphericalIndex.hpp 
skipping to change at line 42 skipping to change at line 42
//! Insert the given object in the StelSphericalIndex. //! Insert the given object in the StelSphericalIndex.
void insert(StelRegionObjectP obj); void insert(StelRegionObjectP obj);
//! Process all the objects intersecting the given region using the passed function object. //! Process all the objects intersecting the given region using the passed function object.
template<class FuncObject> void processIntersectingRegions(const Sph ericalRegionP& region, FuncObject& func) const template<class FuncObject> void processIntersectingRegions(const Sph ericalRegionP& region, FuncObject& func) const
{ {
rootNode->processIntersectingRegions(region, func); rootNode->processIntersectingRegions(region, func);
} }
//! Process all the objects intersecting the given region using the
passed function object.
template<class FuncObject> void processBoundingCapIntersectingRegion
s(const SphericalCap& cap, FuncObject& func) const
{
rootNode->processBoundingCapIntersectingRegions(cap, func);
}
//! Process all the objects contained in the given region using the passed function object. //! Process all the objects contained in the given region using the passed function object.
template<class FuncObject> void processContainedRegions(const Spheri calRegionP& region, FuncObject& func) const template<class FuncObject> void processContainedRegions(const Spheri calRegionP& region, FuncObject& func) const
{ {
rootNode->processContainedRegions(region, func); rootNode->processContainedRegions(region, func);
} }
//! Process all the objects intersecting the given region using the passed function object. //! Process all the objects intersecting the given region using the passed function object.
template<class FuncObject> void processAll(FuncObject& func) const template<class FuncObject> void processAll(FuncObject& func) const
{ {
rootNode->processAll(func); rootNode->processAll(func);
skipping to change at line 179 skipping to change at line 185
{ {
insert(*this, el, level); insert(*this, el, level);
} }
//! Process all the objects intersecting the given r egion using the passed function object. //! Process all the objects intersecting the given r egion using the passed function object.
template<class FuncObject> void processIntersectingR egions(const SphericalRegionP& region, FuncObject& func) const template<class FuncObject> void processIntersectingR egions(const SphericalRegionP& region, FuncObject& func) const
{ {
processIntersectingRegions(*this, region, fu nc); processIntersectingRegions(*this, region, fu nc);
} }
template<class FuncObject> void processBoundingCapIn
tersectingRegions(const SphericalCap& cap, FuncObject& func) const
{
processBoundingCapIntersectingRegions(*this,
cap, func);
}
//! Process all the objects contained the given regi on using the passed function object. //! Process all the objects contained the given regi on using the passed function object.
template<class FuncObject> void processContainedRegi ons(const SphericalRegionP& region, FuncObject& func) const template<class FuncObject> void processContainedRegi ons(const SphericalRegionP& region, FuncObject& func) const
{ {
processContainedRegions(*this, region, func) ; processContainedRegions(*this, region, func) ;
} }
//! Process all the objects intersecting the given r egion using the passed function object. //! Process all the objects intersecting the given r egion using the passed function object.
template<class FuncObject> void processAll(FuncObjec t& func) const template<class FuncObject> void processAll(FuncObjec t& func) const
{ {
processAll(*this, func); processAll(*this, func);
skipping to change at line 243 skipping to change at line 254
} }
foreach (const Node& child, node.children) foreach (const Node& child, node.children)
{ {
if (region->contains(child.triangle) ) if (region->contains(child.triangle) )
processAll(child, func); processAll(child, func);
else if (region->intersects(child.tr iangle)) else if (region->intersects(child.tr iangle))
processIntersectingRegions(c hild, region, func); processIntersectingRegions(c hild, region, func);
} }
} }
template<class FuncObject> void processBoundingCapIn
tersectingRegions(const Node& node, const SphericalCap& cap, FuncObject& fu
nc) const
{
foreach (const NodeElem& el, node.elements)
{
if (cap.intersects(el.cap))
func(el.obj);
}
foreach (const Node& child, node.children)
{
if (cap.contains(child.triangle))
processAll(child, func);
else if (cap.intersects(child.triang
le))
processBoundingCapIntersecti
ngRegions(child, cap, func);
}
}
//! Process all the objects contained the given regi on using the passed function object. //! Process all the objects contained the given regi on using the passed function object.
template<class FuncObject> void processContainedRegi ons(const Node& node, const SphericalRegionP& region, FuncObject& func) con st template<class FuncObject> void processContainedRegi ons(const Node& node, const SphericalRegionP& region, FuncObject& func) con st
{ {
foreach (const NodeElem& el, node.elements) foreach (const NodeElem& el, node.elements)
{ {
if (region->contains(el.obj->getRegi on().data())) if (region->contains(el.obj->getRegi on().data()))
func(el.obj); func(el.obj);
} }
foreach (const Node& child, node.children) foreach (const Node& child, node.children)
{ {
 End of changes. 3 change blocks. 
0 lines changed or deleted 35 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/