PlanePrimitiveShapeConstructor.cpp
Go to the documentation of this file.
1
#include "
PlanePrimitiveShapeConstructor.h
"
2
#include "
PlanePrimitiveShape.h
"
3
#include "
ScoreComputer.h
"
4
#include <
GfxTL/NullClass.h
>
5
6
size_t
PlanePrimitiveShapeConstructor::Identifier
()
const
7
{
8
return
0;
9
}
10
11
unsigned
int
PlanePrimitiveShapeConstructor::RequiredSamples
()
const
12
{
13
return
3;
14
}
15
16
PrimitiveShape
*
PlanePrimitiveShapeConstructor::Construct
(
17
const
MiscLib::Vector< Vec3f >
& points,
const
MiscLib::Vector< Vec3f >
&)
const
18
{
19
return
new
PlanePrimitiveShape
(points[0], points[1], points[2]);
20
}
21
22
PrimitiveShape
*
PlanePrimitiveShapeConstructor::Construct
(
23
const
MiscLib::Vector< Vec3f >
& samples)
const
24
{
25
Plane
plane;
26
if
(!plane.
Init
(samples))
27
{
28
return
NULL;
29
}
30
return
new
PlanePrimitiveShape
(plane);
31
}
32
33
PrimitiveShape
*
PlanePrimitiveShapeConstructor::Deserialize
(std::istream* i,
34
bool
binary)
const
35
{
36
Plane
plane;
37
plane.
Init
(binary, i);
38
PlanePrimitiveShape
* shape =
new
PlanePrimitiveShape
(plane);
39
return
shape;
40
}
41
42
size_t
PlanePrimitiveShapeConstructor::SerializedSize
()
const
43
{
44
return
Plane::SerializedSize
();
45
}
PlanePrimitiveShape.h
PrimitiveShape
PrimtiveShape is a shape primitive in conjunction with a parametrization.
Definition:
PrimitiveShape.h:32
PlanePrimitiveShapeConstructor.h
PlanePrimitiveShapeConstructor::RequiredSamples
unsigned int RequiredSamples() const
Definition:
PlanePrimitiveShapeConstructor.cpp:11
MiscLib::Vector
Definition:
Vector.h:19
Plane::SerializedSize
static size_t SerializedSize()
Definition:
Plane.cpp:236
PlanePrimitiveShapeConstructor::Construct
PrimitiveShape * Construct(const MiscLib::Vector< Vec3f > &points, const MiscLib::Vector< Vec3f > &normals) const
Definition:
PlanePrimitiveShapeConstructor.cpp:16
PlanePrimitiveShape
Definition:
PlanePrimitiveShape.h:15
PlanePrimitiveShapeConstructor::SerializedSize
size_t SerializedSize() const
Definition:
PlanePrimitiveShapeConstructor.cpp:42
PlanePrimitiveShapeConstructor::Deserialize
PrimitiveShape * Deserialize(std::istream *i, bool binary=true) const
Definition:
PlanePrimitiveShapeConstructor.cpp:33
Plane::Init
bool Init(Vec3f p1, Vec3f p2, Vec3f p3)
Definition:
Plane.cpp:29
PlanePrimitiveShapeConstructor::Identifier
size_t Identifier() const
Definition:
PlanePrimitiveShapeConstructor.cpp:6
NullClass.h
Plane
Definition:
Plane.h:16
ScoreComputer.h
PlanePrimitiveShape
class DLL_LINKAGE PlanePrimitiveShape
Definition:
PrimitiveShapeVisitor.h:8
VisionX
components
pointcloud_processor
EfficientRANSACPrimitiveExtractor
EfficientRANSAC
PlanePrimitiveShapeConstructor.cpp
Generated on Sat Oct 12 2024 09:14:17 for armarx_documentation by
1.8.17