PlanePrimitiveShapeConstructor.cpp
Go to the documentation of this file.
2 #include "PlanePrimitiveShape.h"
3 #include "ScoreComputer.h"
4 #include <GfxTL/NullClass.h>
5 
7 {
8  return 0;
9 }
10 
12 {
13  return 3;
14 }
15 
17  const MiscLib::Vector< Vec3f >& points, const MiscLib::Vector< Vec3f >&) const
18 {
19  return new PlanePrimitiveShape(points[0], points[1], points[2]);
20 }
21 
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 
34  bool binary) const
35 {
36  Plane plane;
37  plane.Init(binary, i);
38  PlanePrimitiveShape* shape = new PlanePrimitiveShape(plane);
39  return shape;
40 }
41 
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