VisualizationEllipsoid.cpp
Go to the documentation of this file.
2
3#include <Inventor/nodes/SoComplexity.h>
4#include <Inventor/nodes/SoScale.h>
5#include <Inventor/nodes/SoSphere.h>
6
8{
9 complexity = new SoComplexity();
10 complexity->type.setValue(SoComplexity::OBJECT_SPACE);
11 complexity->value.setValue(1.0f);
12
13 scale = new SoScale;
14
15 sphere = new SoSphere();
16 // We create a unit sphere and create an ellipsoid through scaling
17 sphere->radius.setValue(1.0f);
18
19 node->addChild(complexity);
20 node->addChild(scale);
21 node->addChild(sphere);
22}
23
24bool
26{
27 scale->scaleFactor.setValue(
28 element.axisLengths.e0, element.axisLengths.e1, element.axisLengths.e2);
29
30 return true;
31}