S_Polyhedron.h
Go to the documentation of this file.
1 #ifndef _S_POLYHEDRON
2 # define _S_POLYHEDRON
3 
4 # pragma once
8 # include <sch/sch_api.h>
9 # include <string>
10 # include <vector>
11 
12 # ifdef WITH_BOOST_1_36
14 # endif
15 # include <boost/serialization/split_member.hpp>
16 
17 namespace sch
18 {
20 {
21 public:
22  SCH_API S_Polyhedron(void);
24  SCH_API virtual ~S_Polyhedron(void);
25 
26  SCH_API const S_Polyhedron & operator=(const S_Polyhedron &);
27 
28  SCH_API virtual S_Polyhedron * clone() const;
29 
34  SCH_API virtual void constructFromFile(const std::string & filename);
35 
40  SCH_API virtual void loadFromBinary(const std::string & filename);
41 
46  SCH_API virtual void saveToBinary(const std::string & filename);
47 
52 
53  SCH_API Point3 naiveSupport(const Vector3 & v) const;
54 
60 
64  SCH_API void clearNeighbors();
65 
69  SCH_API void clear();
70 
75 
76  SCH_API int getTrianglesNumber() const;
78  {
79  return &poly;
80  }
81 
82  template<class Archive>
83  void save(Archive & ar, const unsigned int /*version*/) const
84  {
85  ar & boost::serialization::base_object<S_ObjectNonNormalized>(*this);
86  ar & poly;
87  }
88 
89  template<class Archive>
90  void load(Archive & ar, const unsigned int /*version*/)
91  {
92  ar & boost::serialization::base_object<S_ObjectNonNormalized>(*this);
93  ar & poly;
96  }
97 
98  BOOST_SERIALIZATION_SPLIT_MEMBER()
99 
100 protected:
101  SCH_API virtual Point3 l_Support(const Vector3 & v, int & lastFeature) const;
102  SCH_API virtual S_ObjectType getType() const;
103 
104 protected:
106 };
107 } // namespace sch
108 #endif
109 
sch::S_Polyhedron::save
void save(Archive &ar, const unsigned int) const
Definition: S_Polyhedron.h:83
oserializer.hpp
sch::S_Polyhedron::getType
virtual SCH_API S_ObjectType getType() const
must be overloaded to return the type
sch::S_Polyhedron::naiveSupport
SCH_API Point3 naiveSupport(const Vector3 &v) const
sch
Definition: CD_Pair.h:11
sch::S_Polyhedron::operator=
const SCH_API S_Polyhedron & operator=(const S_Polyhedron &)
sch::S_Object::S_ObjectType
S_ObjectType
type of a solid object. Don't use it to cast !
Definition: S_Object.h:233
SCH_API
#define SCH_API
Definition: sch_api.h:13
S_PolyhedronVertex.h
sch::S_Polyhedron::getTrianglesNumber
SCH_API int getTrianglesNumber() const
sch::S_Polyhedron::clearNeighbors
SCH_API void clearNeighbors()
clears the neighbors tables;
sch::S_Polyhedron::updateVertexNeighbors
SCH_API void updateVertexNeighbors()
updates the Neighborhood of the vertexes, must be called on polyhedron \which vertexes have no neighb...
sch::S_Polyhedron::clear
SCH_API void clear()
clears all the polyhedron;
sch::S_Polyhedron::S_Polyhedron
SCH_API S_Polyhedron(void)
sch::S_Polyhedron::load
void load(Archive &ar, const unsigned int)
Definition: S_Polyhedron.h:90
sch::S_Polyhedron::l_Support
virtual SCH_API Point3 l_Support(const Vector3 &v, int &lastFeature) const
gives the support point for a given vector in local cordinates and a given last feature....
sch::S_Polyhedron::updateFastArrays
SCH_API void updateFastArrays()
updates the fast access arrays, must be called after each polyhedron modification
S_ObjectNonNormalized.h
sch::S_ObjectNonNormalized
Definition: S_ObjectNonNormalized.h:16
sch_api.h
Polyhedron_algorithms.h
sch::S_Polyhedron::constructFromFile
virtual SCH_API void constructFromFile(const std::string &filename)
loads the polyhedron from a file. the file must be in the format of Qhull qconvex output,...
sch::S_Polyhedron::clone
virtual SCH_API S_Polyhedron * clone() const
Returns a copy of this S_Object.
sch::S_Polyhedron::~S_Polyhedron
virtual SCH_API ~S_Polyhedron(void)
CD_Matrix::Vector3T< Scalar, false >
sch::S_Polyhedron::saveToBinary
virtual SCH_API void saveToBinary(const std::string &filename)
Save the object to a binary archive.
sch::S_Polyhedron::getPolyhedronAlgorithm
SCH_API Polyhedron_algorithms * getPolyhedronAlgorithm()
Definition: S_Polyhedron.h:77
sch::Polyhedron_algorithms
Definition: Polyhedron_algorithms.h:49
sch::S_Polyhedron::loadFromBinary
virtual SCH_API void loadFromBinary(const std::string &filename)
Load the object from a binary archive.
sch::S_Polyhedron::deleteVertexesWithoutNeighbors
SCH_API void deleteVertexesWithoutNeighbors()
deletes aal the vertexes that dont have neighbors;
sch::S_Polyhedron
Definition: S_Polyhedron.h:19
sch::S_Polyhedron::poly
Polyhedron_algorithms poly
Definition: S_Polyhedron.h:105