STP_SmallSphere.h
Go to the documentation of this file.
1 #ifndef _STP_SMALLSPHERE
2 #define _STP_SMALLSPHERE
3 
4 #pragma once
6 #include <sch/sch_api.h>
7 #include <vector>
8 
9 #ifdef WITH_BOOST_1_36
11 #endif
12 #include <boost/serialization/base_object.hpp>
13 #include <boost/serialization/split_member.hpp>
14 
22 namespace sch
23 {
25 {
26 public:
28  SCH_API STP_SmallSphere(Scalar radius, Point3 center);
30 
32 
34 
35  SCH_API const Point3 & getCenter() const;
36  SCH_API const Scalar & getRadius() const;
37  SCH_API void setVVR(const std::vector<STP_VVR> & vvr);
38 
39  SCH_API virtual void print() const;
40 
41  SCH_API virtual bool isHere(const Vector3 & v) const;
42  SCH_API virtual bool isHereFarthestNeighbour(const Vector3 & v);
43  SCH_API virtual bool isHereFarthestNeighbourPrime(const Vector3 & v);
44  SCH_API virtual bool isHereFirstNeighbour(const Vector3 & v);
45  SCH_API virtual bool isHereFirstNeighbourPrime(const Vector3 & v, int idp);
46  SCH_API virtual bool isHereHybrid(const Vector3 & v, int idp);
47  SCH_API virtual int getNextBV(unsigned int id) const;
48  SCH_API virtual Scalar supportH(const Vector3 & v) const;
49  SCH_API virtual Point3 support(const Vector3 & v) const;
50 
51  SCH_API virtual bool ray_cast(const Point3 & source, const Point3 & target, Scalar & param, Vector3 & normal) const;
52 
53  SCH_API virtual STP_Feature * clone() const;
54 
55  SCH_API virtual int getNextBVPrime() const
56  {
57  return m_nextBVPrime;
58  }
59 
60  template<class Archive>
61  void save(Archive & ar, unsigned int /*version*/) const
62  {
63  ar & boost::serialization::base_object<STP_Feature>(*this);
65  }
66 
67  template<class Archive>
68  void load(Archive & ar, unsigned int /*version*/)
69  {
70  ar & boost::serialization::base_object<STP_Feature>(*this);
72  updateVector();
73  }
74 
75  BOOST_SERIALIZATION_SPLIT_MEMBER()
76 
77 protected:
80  std::vector<STP_VVR> m_VVR;
81  std::vector<int> m_nextBV;
83 
86  void updateVector();
87 };
88 } // namespace sch
89 
90 #endif
oserializer.hpp
sch::STP_SmallSphere::m_neighbors
STP_VVR * m_neighbors
Definition: STP_SmallSphere.h:84
sch
Definition: CD_Pair.h:11
sch::STP_SmallSphere::support
virtual SCH_API Point3 support(const Vector3 &v) const
SCH_API
#define SCH_API
Definition: sch_api.h:13
sch::STP_SmallSphere::isHereFirstNeighbourPrime
virtual SCH_API bool isHereFirstNeighbourPrime(const Vector3 &v, int idp)
sch::STP_SmallSphere
Definition: STP_SmallSphere.h:24
sch::STP_SmallSphere::m_center
Point3 m_center
Definition: STP_SmallSphere.h:79
sch::STP_SmallSphere::m_VVR
std::vector< STP_VVR > m_VVR
Definition: STP_SmallSphere.h:80
sch::STP_SmallSphere::setVVR
SCH_API void setVVR(const std::vector< STP_VVR > &vvr)
sch::STP_SmallSphere::isHereFarthestNeighbour
virtual SCH_API bool isHereFarthestNeighbour(const Vector3 &v)
sch::STP_SmallSphere::m_nextBV
std::vector< int > m_nextBV
Definition: STP_SmallSphere.h:81
sch::STP_SmallSphere::isHere
virtual SCH_API bool isHere(const Vector3 &v) const
sch::STP_SmallSphere::save
void save(Archive &ar, unsigned int) const
Definition: STP_SmallSphere.h:61
sch::STP_SmallSphere::isHereFirstNeighbour
virtual SCH_API bool isHereFirstNeighbour(const Vector3 &v)
sch::STP_SmallSphere::ray_cast
virtual SCH_API bool ray_cast(const Point3 &source, const Point3 &target, Scalar &param, Vector3 &normal) const
sch::STP_SmallSphere::print
virtual SCH_API void print() const
sch::STP_SmallSphere::getNextBV
virtual SCH_API int getNextBV(unsigned int id) const
sch::STP_SmallSphere::STP_SmallSphere
SCH_API STP_SmallSphere()
sch::s_STP_VVR
Definition: STP_Feature.h:12
sch::STP_SmallSphere::load
void load(Archive &ar, unsigned int)
Definition: STP_SmallSphere.h:68
sch::STP_SmallSphere::operator=
SCH_API STP_SmallSphere & operator=(const STP_SmallSphere &s)
sch::STP_SmallSphere::getNextBVPrime
virtual SCH_API int getNextBVPrime() const
Definition: STP_SmallSphere.h:55
sch::STP_SmallSphere::clone
virtual SCH_API STP_Feature * clone() const
sch::STP_SmallSphere::m_endneighbors
STP_VVR * m_endneighbors
Definition: STP_SmallSphere.h:85
sch::STP_SmallSphere::getRadius
const SCH_API Scalar & getRadius() const
sch::STP_SmallSphere::updateVector
void updateVector()
sch::STP_SmallSphere::m_radius
Scalar m_radius
Definition: STP_SmallSphere.h:78
sch::STP_SmallSphere::getCenter
const SCH_API Point3 & getCenter() const
sch::STP_SmallSphere::supportH
virtual SCH_API Scalar supportH(const Vector3 &v) const
sch_api.h
sch::STP_SmallSphere::m_nextBVPrime
int m_nextBVPrime
Definition: STP_SmallSphere.h:82
STP_Feature.h
CD_Matrix::Vector3T< Scalar, false >
sch::STP_SmallSphere::isHereFarthestNeighbourPrime
virtual SCH_API bool isHereFarthestNeighbourPrime(const Vector3 &v)
sch::Scalar
double Scalar
Definition: SCH_Types.h:23
sch::STP_SmallSphere::isHereHybrid
virtual SCH_API bool isHereHybrid(const Vector3 &v, int idp)
sch::STP_SmallSphere::~STP_SmallSphere
SCH_API ~STP_SmallSphere()
sch::STP_Feature
Definition: STP_Feature.h:102