mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 02:49:03 -06:00
Remove parts of bounding sphere definition in SceneGraphNode.
This commit is contained in:
@@ -113,15 +113,6 @@ private:
|
||||
glm::dmat3 calculateWorldRotation() const;
|
||||
double calculateWorldScale() const;
|
||||
|
||||
// Transformation defined by ephemeris, rotation and scale
|
||||
Ephemeris* _ephemeris;
|
||||
Rotation* _rotation;
|
||||
Scale* _scale;
|
||||
|
||||
glm::dvec3 _worldPositionCached;
|
||||
glm::dmat3 _worldRotationCached;
|
||||
double _worldScaleCached;
|
||||
|
||||
std::vector<SceneGraphNode*> _children;
|
||||
SceneGraphNode* _parent;
|
||||
|
||||
@@ -133,6 +124,15 @@ private:
|
||||
bool _boundingSphereVisible;
|
||||
PowerScaledScalar _boundingSphere;
|
||||
|
||||
// Transformation defined by ephemeris, rotation and scale
|
||||
Ephemeris* _ephemeris;
|
||||
Rotation* _rotation;
|
||||
Scale* _scale;
|
||||
|
||||
// Cached transform data
|
||||
glm::dvec3 _worldPositionCached;
|
||||
glm::dmat3 _worldRotationCached;
|
||||
double _worldScaleCached;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -474,7 +474,9 @@ const std::vector<SceneGraphNode*>& SceneGraphNode::children() const{
|
||||
PowerScaledScalar SceneGraphNode::calculateBoundingSphere(){
|
||||
// set the bounding sphere to 0.0
|
||||
_boundingSphere = 0.0;
|
||||
|
||||
/*
|
||||
This is not how to calculate a bounding sphere, better to leave it at 0 if not a
|
||||
renderable. --KB
|
||||
if (!_children.empty()) { // node
|
||||
PowerScaledScalar maxChild;
|
||||
|
||||
@@ -492,7 +494,7 @@ PowerScaledScalar SceneGraphNode::calculateBoundingSphere(){
|
||||
}
|
||||
_boundingSphere += maxChild;
|
||||
}
|
||||
|
||||
*/
|
||||
// if has a renderable, use that boundingsphere
|
||||
if (_renderable ) {
|
||||
PowerScaledScalar renderableBS = _renderable->getBoundingSphere();
|
||||
|
||||
Reference in New Issue
Block a user