S_PolyhedronVertex.h
Go to the documentation of this file.
1 #ifndef _S_POLYHEDRONVERTEX
2 #define _S_POLYHEDRONVERTEX
3 
4 #pragma once
5 #include <boost/noncopyable.hpp>
6 
7 #include <sch/Matrix/SCH_Types.h>
8 #include <sch/core/deprecated.hh>
9 #include <sch/sch_api.h>
10 #include <vector>
11 
12 namespace sch
13 {
14 class S_PolyhedronVertex : boost::noncopyable
15 {
16 public:
18  SCH_API virtual ~S_PolyhedronVertex(void);
19 
21 
22  SCH_API Scalar supportH(const Vector3 & direction) const;
23 
24  SCH_CORE_DEPRECATED SCH_API void setCordinates(const Vector3 & v);
25  SCH_API void setCoordinates(const Vector3 & v);
26 
27  SCH_CORE_DEPRECATED SCH_API void setCordinates(const Scalar & x, const Scalar & y, const Scalar & z);
28  SCH_API void setCoordinates(const Scalar & x, const Scalar & y, const Scalar & z);
29 
30  SCH_CORE_DEPRECATED SCH_API const Vector3 & getCordinates() const;
31  SCH_API const Vector3 & getCoordinates() const;
32 
36  SCH_API virtual S_PolyhedronVertex * clone();
37 
41  SCH_API void clearNeighbors();
42 
49  SCH_API virtual bool isHere(const Vector3 & direction, const Scalar & currentsupportH);
50 
56  SCH_API virtual bool isHere(const Vector3 & direction);
57 
62 
66  SCH_API void setNumber(unsigned int);
67 
71  SCH_API unsigned int getNumber() const;
72 
77 
82 
86  SCH_API unsigned getNumNeighbors() const;
87 
88  template<class Archive>
89  void serialize(Archive & ar, const unsigned int /*version*/)
90  {
91  ar & cordinates_;
92  ar & neighbors_;
93  // ar & fastNeighbors_;
94  // ar & endNeighbors_;
95  ar & number_;
96  // ar & nextVertex_;
97  ar & nextVertexH_;
98  }
99 
100 private:
101  Vector3 cordinates_;
102 
103  std::vector<S_PolyhedronVertex *> neighbors_;
104 
105  S_PolyhedronVertex ** fastNeighbors_;
106  S_PolyhedronVertex ** endNeighbors_;
107  unsigned int number_;
108 
109  S_PolyhedronVertex * nextVertex_;
110  Scalar nextVertexH_;
111 };
112 
114 } // namespace sch
115 #endif
sch
Definition: CD_Pair.h:11
S_PolyhedronVertex.hxx
sch::S_PolyhedronVertex::serialize
void serialize(Archive &ar, const unsigned int)
Definition: S_PolyhedronVertex.h:89
SCH_API
#define SCH_API
Definition: sch_api.h:13
sch::S_PolyhedronVertex::isHere
virtual SCH_API bool isHere(const Vector3 &direction, const Scalar &currentsupportH)
checks if this is the support point of the polyhedron in some given direction
sch::S_PolyhedronVertex::setCoordinates
SCH_API void setCoordinates(const Vector3 &v)
sch::S_PolyhedronVertex::setCordinates
SCH_CORE_DEPRECATED SCH_API void setCordinates(const Vector3 &v)
SCH_Types.h
sch::S_PolyhedronVertex::addNeighbor
SCH_API void addNeighbor(S_PolyhedronVertex *)
sch::S_PolyhedronVertex::supportH
SCH_API Scalar supportH(const Vector3 &direction) const
sch::S_PolyhedronVertex::S_PolyhedronVertex
SCH_API S_PolyhedronVertex(void)
sch::S_PolyhedronVertex::getNextVertexH
SCH_API Scalar getNextVertexH() const
gets the next vertex support height
sch::S_PolyhedronVertex::getCordinates
SCH_CORE_DEPRECATED const SCH_API Vector3 & getCordinates() const
sch::S_PolyhedronVertex::getNumber
SCH_API unsigned int getNumber() const
gets the number of the vertex in the polyhedron
Definition: S_PolyhedronVertex.hxx:1
sch::S_PolyhedronVertex
Definition: S_PolyhedronVertex.h:14
sch::S_PolyhedronVertex::clone
virtual SCH_API S_PolyhedronVertex * clone()
Gives a copy of the current vertex, without the neighbors array, keeping just the cordinates and the ...
sch_api.h
sch::S_PolyhedronVertex::updateFastArrays
SCH_API void updateFastArrays()
updates fast access neighbors array, must be called at each neighbors modification
sch::S_PolyhedronVertex::clearNeighbors
SCH_API void clearNeighbors()
clears the Neighbors
sch::S_PolyhedronVertex::~S_PolyhedronVertex
virtual SCH_API ~S_PolyhedronVertex(void)
CD_Matrix::Vector3T< Scalar, false >
sch::S_PolyhedronVertex::getCoordinates
const SCH_API Vector3 & getCoordinates() const
sch::S_PolyhedronVertex::getNumNeighbors
SCH_API unsigned getNumNeighbors() const
gets the number of neighbors
sch::Scalar
double Scalar
Definition: SCH_Types.h:23
sch::S_PolyhedronVertex::setNumber
SCH_API void setNumber(unsigned int)
sets the number of the vertex in the polyhedron
sch::S_PolyhedronVertex::getNextVertex
SCH_API S_PolyhedronVertex * getNextVertex() const
gets the next vertex in a support point search