CylinderPrimitiveShapeConstructor.cpp
Go to the documentation of this file.
2
3#include "ScoreComputer.h"
4#include <GfxTL/NullClass.h>
5
6size_t
11
12unsigned int
17
20 const MiscLib::Vector<Vec3f>& normals) const
21{
22 Cylinder cy;
23 MiscLib::Vector<Vec3f> samples(points);
24 std::copy(normals.begin(), normals.end(), std::back_inserter(samples));
25 if (!cy.Init(samples))
26 {
27 return NULL;
28 }
29 return new CylinderPrimitiveShape(cy);
30}
31
34{
35 Cylinder cy;
36 if (!cy.Init(samples))
37 {
38 return NULL;
39 }
40 return new CylinderPrimitiveShape(cy);
41}
42
44CylinderPrimitiveShapeConstructor::Deserialize(std::istream* i, bool binary) const
45{
46 Cylinder cylinder;
47 cylinder.Init(binary, i);
49 return shape;
50}
51
52size_t
class DLL_LINKAGE CylinderPrimitiveShape
PrimitiveShape * Deserialize(std::istream *i, bool binary=true) const
PrimitiveShape * Construct(const MiscLib::Vector< Vec3f > &points, const MiscLib::Vector< Vec3f > &normals) const
static size_t SerializedSize()
Definition Cylinder.cpp:485
bool Init(const MiscLib::Vector< Vec3f > &samples)
Definition Cylinder.cpp:40
PrimtiveShape is a shape primitive in conjunction with a parametrization.