20 #include <Inventor/nodes/SoBaseColor.h>
21 #include <Inventor/nodes/SoDrawStyle.h>
22 #include <Inventor/nodes/SoLineSet.h>
23 #include <Inventor/nodes/SoSeparator.h>
24 #include <Inventor/nodes/SoSphere.h>
25 #include <Inventor/nodes/SoSwitch.h>
26 #include <Inventor/nodes/SoTranslation.h>
27 #include <Inventor/nodes/SoVertexProperty.h>
39 enum { NumOrientationLines = 3 };
44 clusterRoot =
new SoSeparator();
47 SoSeparator *sep1 =
new SoSeparator();
48 clusterRoot->addChild(sep1);
50 soPlaneIntersectionSwitch =
new SoSwitch();
51 sep1->addChild(soPlaneIntersectionSwitch);
53 soPlaneIntersectionTranslation =
new SoTranslation();
54 soPlaneIntersectionSwitch->addChild(soPlaneIntersectionTranslation);
56 soPlaneIntersectionColorSwitch =
new SoSwitch();
57 soPlaneIntersectionSwitch->addChild(soPlaneIntersectionColorSwitch);
59 soPlaneIntersectionBaseColor =
new SoBaseColor();
60 soPlaneIntersectionColorSwitch->addChild(soPlaneIntersectionBaseColor);
62 soPlaneIntersectionSphere =
new SoSphere();
63 soPlaneIntersectionSwitch->addChild(soPlaneIntersectionSphere);
67 SoSeparator *sep2 =
new SoSeparator();
68 clusterRoot->addChild(sep2);
70 soCenterOfGravitySwitch =
new SoSwitch();
71 sep2->addChild(soCenterOfGravitySwitch);
73 soCenterOfGravityTranslation =
new SoTranslation();
74 soCenterOfGravitySwitch->addChild(soCenterOfGravityTranslation);
76 soCenterOfGravityColorSwitch =
new SoSwitch();
77 soCenterOfGravitySwitch->addChild(soCenterOfGravityColorSwitch);
79 soCenterOfGravityBaseColor =
new SoBaseColor();
80 soCenterOfGravityColorSwitch->addChild(soCenterOfGravityBaseColor);
82 soCenterOfGravitySphere =
new SoSphere();
83 soCenterOfGravitySwitch->addChild(soCenterOfGravitySphere);
87 clusterRoot->addChild(soCenterOfGravityColorSwitch);
89 SoSeparator *sep3 =
new SoSeparator();
90 clusterRoot->addChild(sep3);
92 for (
size_t c=0; c < NumOrientationLines; ++c){
93 soClusterOrientationLineSwitch[c] =
new SoSwitch();
94 sep3->addChild(soClusterOrientationLineSwitch[c]);
96 soVertexProperty[c] =
new SoVertexProperty();
97 soClusterOrientationLineSwitch[c]->addChild(soVertexProperty[c]);
99 soLineSet[c] =
new SoLineSet();
100 soClusterOrientationLineSwitch[c]->addChild(soLineSet[c]);
104 SoSeparator *sep4 =
new SoSeparator();
105 clusterRoot->addChild(sep4);
107 soDrawStyleClusterToPlane =
new SoDrawStyle();
108 sep4->addChild(soDrawStyleClusterToPlane);
109 soDrawStyleClusterToPlane->linePattern.setValue(
static_cast<MLuint16>(0x1111));
111 soClusterToPlaneIntersectionLineSwitch =
new SoSwitch();
112 sep4->addChild(soClusterToPlaneIntersectionLineSwitch);
114 soVertexPropertyClusterToPlane =
new SoVertexProperty();
115 soClusterToPlaneIntersectionLineSwitch->addChild(soVertexPropertyClusterToPlane);
117 soLineSetClusterToPlane =
new SoLineSet();
118 soClusterToPlaneIntersectionLineSwitch->addChild(soLineSetClusterToPlane);
124 clusterRoot->unref();
151 SoSwitch *soClusterOrientationLineSwitch[NumOrientationLines];
154 SoVertexProperty *soVertexProperty[NumOrientationLines];
157 SoLineSet *soLineSet[NumOrientationLines];
Disables warnings from PCL headers which otherwise cannot be avoided.
Restores disabled warnings from PCL headers which otherwise cannot be avoided.
Internal helper class to manage OpenInventor visualization stuff for one cluster.
SoVertexProperty * soVertexPropertyClusterToPlane
SoDrawStyle * soDrawStyleClusterToPlane
SoSwitch * soPlaneIntersectionColorSwitch
SoSwitch * soCenterOfGravitySwitch
Centre of Gravity.
SoBaseColor * soCenterOfGravityBaseColor
SoSwitch * soClusterToPlaneIntersectionLineSwitch
Cluster to plane intersection line.
~ClusterSubGraph()
Destructor which removed entire node graph just by dereferencing the root.
SoBaseColor * soPlaneIntersectionBaseColor
SoSphere * soPlaneIntersectionSphere
SoSwitch * soCenterOfGravityColorSwitch
SoTranslation * soPlaneIntersectionTranslation
SoLineSet * soLineSetClusterToPlane
SoSphere * soCenterOfGravitySphere
SoSeparator * clusterRoot
Root to be appended to parent graph.
SoSwitch * soPlaneIntersectionSwitch
Plane intersections.
ClusterSubGraph()
Constructor which creates the whole subgraph with all orientation nodes.
SoTranslation * soCenterOfGravityTranslation
Displays PCLClusterStatistics results in Open Inventor scene.
Helper class for the ML PCL Module PCLClusterStatistics which manages statistics for one cluster.