BallPointStuff< Dim > Struct Template Reference

Public Types

typedef double Scalar
 
typedef Matrix< double, Dim, 1 > VectorType
 
typedef Ball< Dim > BallType
 
typedef AlignedBox< double, Dim > BoxType
 

Public Member Functions

 BallPointStuff ()
 
 BallPointStuff (const VectorType &inP)
 
bool intersectVolume (const BoxType &r)
 
bool intersectObject (const BallType &b)
 
bool intersectVolumeVolume (const BoxType &r1, const BoxType &r2)
 
bool intersectVolumeObject (const BoxType &r, const BallType &b)
 
bool intersectObjectVolume (const BallType &b, const BoxType &r)
 
bool intersectObjectObject (const BallType &b1, const BallType &b2)
 
bool intersectVolumeObject (const BoxType &r, const VectorType &v)
 
bool intersectObjectObject (const BallType &b, const VectorType &v)
 
double minimumOnVolume (const BoxType &r)
 
double minimumOnObject (const BallType &b)
 
double minimumOnVolumeVolume (const BoxType &r1, const BoxType &r2)
 
double minimumOnVolumeObject (const BoxType &r, const BallType &b)
 
double minimumOnObjectVolume (const BallType &b, const BoxType &r)
 
double minimumOnObjectObject (const BallType &b1, const BallType &b2)
 
double minimumOnVolumeObject (const BoxType &r, const VectorType &v)
 
double minimumOnObjectObject (const BallType &b, const VectorType &v)
 

Public Attributes

VectorType p
 
int calls
 
int count
 

Member Typedef Documentation

◆ BallType

template<int Dim>
typedef Ball<Dim> BallPointStuff< Dim >::BallType

◆ BoxType

template<int Dim>
typedef AlignedBox<double, Dim> BallPointStuff< Dim >::BoxType

◆ Scalar

template<int Dim>
typedef double BallPointStuff< Dim >::Scalar

◆ VectorType

template<int Dim>
typedef Matrix<double, Dim, 1> BallPointStuff< Dim >::VectorType

Constructor & Destructor Documentation

◆ BallPointStuff() [1/2]

template<int Dim>
BallPointStuff< Dim >::BallPointStuff ( )
inline
52 : calls(0), count(0) {}
int calls
Definition: BVH.cpp:126
int count
Definition: BVH.cpp:127

◆ BallPointStuff() [2/2]

template<int Dim>
BallPointStuff< Dim >::BallPointStuff ( const VectorType inP)
inline
53 : p(inP), calls(0), count(0) {}
VectorType p
Definition: BVH.cpp:125

Member Function Documentation

◆ intersectObject()

template<int Dim>
bool BallPointStuff< Dim >::intersectObject ( const BallType b)
inline
59  {
60  ++calls;
61  if ((b.center - p).squaredNorm() < SQR(b.radius)) ++count;
62  return false; // continue
63  }
double SQR(double x)
Definition: BVH.cpp:41
Scalar * b
Definition: benchVecAdd.cpp:17

References b, BallPointStuff< Dim >::calls, BallPointStuff< Dim >::count, BallPointStuff< Dim >::p, and SQR().

◆ intersectObjectObject() [1/2]

template<int Dim>
bool BallPointStuff< Dim >::intersectObjectObject ( const BallType b,
const VectorType v 
)
inline
86  {
87  ++calls;
88  if ((b.center - v).squaredNorm() < SQR(b.radius)) ++count;
89  return false;
90  }
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1

References b, BallPointStuff< Dim >::calls, BallPointStuff< Dim >::count, SQR(), and v.

◆ intersectObjectObject() [2/2]

template<int Dim>
bool BallPointStuff< Dim >::intersectObjectObject ( const BallType b1,
const BallType b2 
)
inline
77  {
78  ++calls;
79  if ((b1.center - b2.center).norm() < b1.radius + b2.radius) ++count;
80  return false;
81  }

References BallPointStuff< Dim >::calls, Ball< Dim >::center, BallPointStuff< Dim >::count, and Ball< Dim >::radius.

Referenced by TreeTest< Dim >::testIntersect2().

◆ intersectObjectVolume()

template<int Dim>
bool BallPointStuff< Dim >::intersectObjectVolume ( const BallType b,
const BoxType r 
)
inline
73  {
74  ++calls;
75  return r.squaredExteriorDistance(b.center) < SQR(b.radius);
76  }
r
Definition: UniformPSDSelfTest.py:20

References b, BallPointStuff< Dim >::calls, UniformPSDSelfTest::r, and SQR().

◆ intersectVolume()

template<int Dim>
bool BallPointStuff< Dim >::intersectVolume ( const BoxType r)
inline
55  {
56  ++calls;
57  return r.contains(p);
58  }

References BallPointStuff< Dim >::calls, BallPointStuff< Dim >::p, and UniformPSDSelfTest::r.

◆ intersectVolumeObject() [1/2]

template<int Dim>
bool BallPointStuff< Dim >::intersectVolumeObject ( const BoxType r,
const BallType b 
)
inline
69  {
70  ++calls;
71  return r.squaredExteriorDistance(b.center) < SQR(b.radius);
72  }

References b, BallPointStuff< Dim >::calls, UniformPSDSelfTest::r, and SQR().

◆ intersectVolumeObject() [2/2]

template<int Dim>
bool BallPointStuff< Dim >::intersectVolumeObject ( const BoxType r,
const VectorType v 
)
inline
82  {
83  ++calls;
84  return r.contains(v);
85  }

References BallPointStuff< Dim >::calls, UniformPSDSelfTest::r, and v.

◆ intersectVolumeVolume()

template<int Dim>
bool BallPointStuff< Dim >::intersectVolumeVolume ( const BoxType r1,
const BoxType r2 
)
inline
65  {
66  ++calls;
67  return !(r1.intersection(r2)).isNull();
68  }

References BallPointStuff< Dim >::calls, and Eigen::AlignedBox< Scalar_, AmbientDim_ >::intersection().

◆ minimumOnObject()

template<int Dim>
double BallPointStuff< Dim >::minimumOnObject ( const BallType b)
inline
96  {
97  ++calls;
98  return (std::max)(0., (b.center - p).squaredNorm() - SQR(b.radius));
99  }
#define max(a, b)
Definition: datatypes.h:23

References b, BallPointStuff< Dim >::calls, max, BallPointStuff< Dim >::p, and SQR().

◆ minimumOnObjectObject() [1/2]

template<int Dim>
double BallPointStuff< Dim >::minimumOnObjectObject ( const BallType b,
const VectorType v 
)
inline
120  {
121  ++calls;
122  return SQR((std::max)(0., (b.center - v).norm() - b.radius));
123  }

References b, BallPointStuff< Dim >::calls, max, SQR(), and v.

◆ minimumOnObjectObject() [2/2]

template<int Dim>
double BallPointStuff< Dim >::minimumOnObjectObject ( const BallType b1,
const BallType b2 
)
inline
112  {
113  ++calls;
114  return SQR((std::max)(0., (b1.center - b2.center).norm() - b1.radius - b2.radius));
115  }

References BallPointStuff< Dim >::calls, Ball< Dim >::center, max, Ball< Dim >::radius, and SQR().

Referenced by TreeTest< Dim >::testMinimize2().

◆ minimumOnObjectVolume()

template<int Dim>
double BallPointStuff< Dim >::minimumOnObjectVolume ( const BallType b,
const BoxType r 
)
inline
108  {
109  ++calls;
110  return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius));
111  }

References b, BallPointStuff< Dim >::calls, max, UniformPSDSelfTest::r, and SQR().

◆ minimumOnVolume()

template<int Dim>
double BallPointStuff< Dim >::minimumOnVolume ( const BoxType r)
inline
92  {
93  ++calls;
94  return r.squaredExteriorDistance(p);
95  }

References BallPointStuff< Dim >::calls, BallPointStuff< Dim >::p, and UniformPSDSelfTest::r.

◆ minimumOnVolumeObject() [1/2]

template<int Dim>
double BallPointStuff< Dim >::minimumOnVolumeObject ( const BoxType r,
const BallType b 
)
inline
104  {
105  ++calls;
106  return SQR((std::max)(0., r.exteriorDistance(b.center) - b.radius));
107  }

References b, BallPointStuff< Dim >::calls, max, UniformPSDSelfTest::r, and SQR().

◆ minimumOnVolumeObject() [2/2]

template<int Dim>
double BallPointStuff< Dim >::minimumOnVolumeObject ( const BoxType r,
const VectorType v 
)
inline
116  {
117  ++calls;
118  return r.squaredExteriorDistance(v);
119  }

References BallPointStuff< Dim >::calls, UniformPSDSelfTest::r, and v.

◆ minimumOnVolumeVolume()

template<int Dim>
double BallPointStuff< Dim >::minimumOnVolumeVolume ( const BoxType r1,
const BoxType r2 
)
inline
100  {
101  ++calls;
102  return r1.squaredExteriorDistance(r2);
103  }

References BallPointStuff< Dim >::calls, and Eigen::AlignedBox< Scalar_, AmbientDim_ >::squaredExteriorDistance().

Member Data Documentation

◆ calls

◆ count

◆ p


The documentation for this struct was generated from the following file: