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