CD_SimplexEnhanced.h
Go to the documentation of this file.
1 #ifndef _CD_SIMPLEX_ENHANCED_H
2 #define _CD_SIMPLEX_ENHANCED_H
3 
4 #pragma once
5 #include <sch/CD/CD_Simplex.h>
6 #include <sch/sch_api.h>
7 
8 namespace sch
9 {
11 {
12 public:
14 
16  SCH_API CD_SimplexEnhanced(const Point3 & p1, const Point3 & p2);
17  SCH_API CD_SimplexEnhanced(const Point3 & p1, const Point3 & p2, const Point3 & p3);
18  SCH_API CD_SimplexEnhanced(const Point3 & p1, const Point3 & p2, const Point3 & p3, const Point3 & p4);
19 
20  SCH_API CD_SimplexEnhanced(const Point3 & p, Scalar norm);
21  SCH_API CD_SimplexEnhanced(const Point3 & p1, const Point3 & p2, Scalar norm1, Scalar norm2);
23  const Point3 & p2,
24  const Point3 & p3,
25  Scalar norm1,
26  Scalar norm2,
27  Scalar norm3);
29  const Point3 & p2,
30  const Point3 & p3,
31  const Point3 & p4,
32  Scalar norm1,
33  Scalar norm2,
34  Scalar norm3,
35  Scalar norm4);
36 
38 
44  SCH_API virtual void filter(const CD_SimplexKeptPoints & k);
45 
49  SCH_API Scalar norms(const char i) const;
50 
54  SCH_API Scalar & norms(const char i);
55 
56  using CD_Simplex::operator[];
57 
59 
65 
71 
76 
82 
87  SCH_API bool isAffinelyDependent() const;
88 
89 protected:
91 
92 private:
93  static Scalar square_(const Scalar & a);
94  static Scalar cube_(const Scalar & a);
95 };
96 
97 #include "CD_SimplexEnhanced.hxx"
98 } // namespace sch
99 #endif
Definition: CD_SimplexEnhanced.h:11
Scalar norm1_
Definition: CD_SimplexEnhanced.h:90
SCH_API CD_SimplexEnhanced operator+(const Point3 &) const
Adds a point to a simplex to transform it in a higher dimemsion simplex (doesn't work with tetrahedro...
Definition: CD_SimplexEnhanced.hxx:225
Scalar norm3_
Definition: CD_SimplexEnhanced.h:90
SCH_API CD_SimplexEnhanced & operator=(const CD_SimplexEnhanced &)
Definition: CD_SimplexEnhanced.hxx:158
SCH_API Scalar norms(const char i) const
returns the distances of the simplex points to the origin
Definition: CD_SimplexEnhanced.hxx:30
virtual SCH_API void filter(const CD_SimplexKeptPoints &k)
Updates the simplex by supressing some vertexes and/or change their order according to a filter.
Definition: CD_SimplexEnhanced.hxx:45
virtual SCH_API ~CD_SimplexEnhanced(void)
SCH_API CD_SimplexEnhanced(const CD_SimplexEnhanced &rhs)
Definition: CD_SimplexEnhanced.hxx:153
Scalar norm2_
Definition: CD_SimplexEnhanced.h:90
SCH_API bool isAffinelyDependent() const
Tells if the simplex is affinely dependant or not according to the static variable zero to make it wo...
Definition: CD_SimplexEnhanced.hxx:342
Scalar norm4_
Definition: CD_SimplexEnhanced.h:90
SCH_API Scalar farthestPointDistance() const
gives the distance squared between the origin and the furthest simplex vertices
Definition: CD_SimplexEnhanced.hxx:243
SCH_API CD_SimplexEnhanced & operator+=(const Point3 &)
Adds a point to a simplex to transform it in a higher dimemsion simplex (doesn't work with tetrahedro...
Definition: CD_SimplexEnhanced.hxx:201
SCH_API void getClosestSubSimplexGJK(CD_SimplexKeptPoints &k) const
optimized version of GetClosestSubSimplex((0,0,0),v) for GJK (the highest index point is the last ins...
Definition: CD_Simplex.h:55
Definition: CD_Pair.h:12
double Scalar
Definition: SCH_Types.h:23
#define SCH_API
Definition: sch_api.h:13
Definition: CD_Simplex.h:28