Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

# IsoEx::ImplicitSphere Class Reference
[Implicit objects/functions]

This class implements a very simple implicit object: a sphere given its center and its radius. More...

`#include <IsoEx/Implicits/ImplicitSphere.hh>`

Inheritance diagram for IsoEx::ImplicitSphere:

List of all members.

## Public Member Functions
Constructor & destructor
| ImplicitSphere (const OpenMesh::Vec3f &_center, float _radius)
| Constructor: given sphere center and radius.
| ~ImplicitSphere ()
| Empty destructor.
Abstract interface of implicit objects, see also IsoEx::Implicit.
bool | is_inside (const OpenMesh::Vec3f &_point) const
| Is the point _point inside or outside w.r.t.
float | scalar_distance (const OpenMesh::Vec3f &_point) const
| Returns the scalar distance value of _point.
bool | directed_distance (const OpenMesh::Vec3f &_p0, const OpenMesh::Vec3f &_p1, OpenMesh::Vec3f &_point, OpenMesh::Vec3f &_normal, float &_distance) const
| This method returns the directed distance of _p0 in the direction _p1-_p0.

## Detailed Description

This class implements a very simple implicit object: a sphere given its center and its radius.

See also:
  IsoEx::Implicit

## Member Function Documentation

bool IsoEx::ImplicitSphere::directed_distance | ( | const OpenMesh::Vec3f & | _p0,
|  | const OpenMesh::Vec3f & | _p1,
|  | OpenMesh::Vec3f & | _point,
|  | OpenMesh::Vec3f & | _normal,
|  | float & | _distance
| ) | const`[inline, virtual]`

| This method returns the directed distance of _p0 in the direction _p1-_p0. The resulting intersection point (casting a ray from _p0 in direction (_p1-_p0)) is stored in _point, the corresponding normal vector at this point is stored in _normal, the distance value is stored in _distance (again negative distance means _p0 is inside). Since the ray intersection may fail (because of precision problems) it is returned whether an intersection was found or not. Implements IsoEx::Implicit.

bool IsoEx::ImplicitSphere::is_inside | ( | const OpenMesh::Vec3f & | _point | ) | const`[inline, virtual]`

| Is the point _point inside or outside w.r.t. the implicit function? The result should be the same as scalar_distance(_point) < 0, but it can be implemented more efficiently. Implements IsoEx::Implicit.

float IsoEx::ImplicitSphere::scalar_distance | ( | const OpenMesh::Vec3f & | _point | ) | const`[inline, virtual]`

| Returns the scalar distance value of _point. Points inside the object should have negative distances, points outside positive distance. Implements IsoEx::Implicit.

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

- ImplicitSphere.hh