|
Core 1.0
|
A simple set of spheres. More...
#include <sphereset.h>
Public Member Functions | |
| SphereSet () | |
| Empty. | |
| SphereSet (const Sphere &) | |
| Creates a sphere set given one sphere. | |
| SphereSet (const QVector< Sphere > &) | |
| Creates a set of spheres. | |
| SphereSet (const SphereSet &, const Sphere &) | |
| Creates a set of spheres and keep only the subset of spheres that intersect the second argument sphere. | |
| ~SphereSet () | |
| Empty. | |
| void | Append (const SphereSet &) |
| Merge with another set of spheres. | |
| bool | Intersect (const SphereSet &) const |
| Check if two sphere-sets intersect. | |
| bool | Inside (const Vector &) const |
| Check if a point is inside or outside the set of sphere. | |
| bool | IsEmpty () const |
| returns true if the set is empty | |
| double | R (const SphereSet &) const |
| Compute the signed distance between two sphere-sets. | |
| Box | GetBox () const |
| Compute the bounding box of the set of spheres. | |
| Vector | Normal (const Vector &) const |
| Computes the normal vector between a point and the sphere set. | |
| double | R (const Vector &) const |
| Compute the squared distance between a point and the set of spheres. | |
| double | Signed (const Vector &) const |
| Compute the signed distance between a point and the set of spheres. | |
| void | Rotate (const Matrix &) |
| Rotates a sphere set. | |
| void | Translate (const Vector &) |
| Translates a sphere set. | |
| void | Scale (const double &) |
| Uniformly scales a sphere-set. | |
| void | Transform (const Frame &) |
| Transforms a sphere set given a frame transformation. | |
| int | Size (void) const |
| Returns the number of Spheres. | |
| Sphere | GetSphere (int) const |
| Returns the number of Spheres. | |
| void | RemoveDuplicates (const double &) |
| Removes spheres that are close to or embedded in the sphere set. | |
Protected Attributes | |
| QVector< Sphere > | spheres |
| Set of spheres. | |
A simple set of spheres.
This class implements functions to compute the distance between a point and a set of spheres, or the detect whether two set of spheres intersect.
|
explicit |
Creates a sphere set given one sphere.
| s | Sphere. |
|
explicit |
Creates a set of spheres.
| s | Set. |
Creates a set of spheres and keep only the subset of spheres that intersect the second argument sphere.
| ss | Set. |
| s | Sphere. |
| void SphereSet::Append | ( | const SphereSet & | s | ) |
Merge with another set of spheres.
| s | SphereSet. |
| bool SphereSet::Inside | ( | const Vector & | p | ) | const |
Check if a point is inside or outside the set of sphere.
| p | The point. |
| bool SphereSet::Intersect | ( | const SphereSet & | set | ) | const |
Check if two sphere-sets intersect.
| set | Set of spheres. |
Computes the normal vector between a point and the sphere set.
Simply project point onto the spheres, and return the corresponding Euclidean distance vector.
| p | Point. |
| double SphereSet::R | ( | const SphereSet & | set | ) | const |
Compute the signed distance between two sphere-sets.
If two spheres intersect, the result will be negative. If one of the set is empty, returns 0.0.
| set | Set of spheres. |
| double SphereSet::R | ( | const Vector & | p | ) | const |
Compute the squared distance between a point and the set of spheres.
| p | The point. |
| void SphereSet::RemoveDuplicates | ( | const double & | t | ) |
Removes spheres that are close to or embedded in the sphere set.
| t | Threshold value. |
| void SphereSet::Rotate | ( | const Matrix & | r | ) |
Rotates a sphere set.
| r | Rotation matrix. |
| void SphereSet::Scale | ( | const double & | s | ) |
Uniformly scales a sphere-set.
| s | Scaling factor. |
| double SphereSet::Signed | ( | const Vector & | p | ) | const |
Compute the signed distance between a point and the set of spheres.
| p | The point. |
| void SphereSet::Transform | ( | const Frame & | t | ) |
Transforms a sphere set given a frame transformation.
| t | Transformation. |
| void SphereSet::Translate | ( | const Vector & | t | ) |
Translates a sphere set.
| t | Translation vector. |