IsoEx
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Types | List of all members
IsoEx::Implicit< Vec3 > Class Template Referenceabstract

#include <IsoEx/Implicits/Implicit.hh>

Inheritance diagram for IsoEx::Implicit< Vec3 >:
IsoEx::CSG::Difference< Vec3 > IsoEx::CSG::Intersection< Vec3 > IsoEx::CSG::Union< Vec3 > IsoEx::ImplicitSphere< Vec3 >

Public Types

typedef Vec3::value_type real
 

Public Member Functions

Constructor & destructor
 Implicit ()
 constructor
 
virtual ~Implicit ()
 destructor
 
Abstract interface of implicit objects
virtual bool is_inside (const Vec3 &_point) const =0
 
virtual real scalar_distance (const Vec3 &_point) const =0
 
virtual bool directed_distance (const Vec3 &_p0, const Vec3 &_p1, Vec3 &_point, Vec3 &_normal, real &_distance) const =0
 

Detailed Description

template<class Vec3>
class IsoEx::Implicit< Vec3 >

This is the abstract base class for all objects representing implicit function. The three abstract virtual functions have to be overridden by derived classes.

Member Function Documentation

template<class Vec3>
virtual bool IsoEx::Implicit< Vec3 >::directed_distance ( const Vec3 &  _p0,
const Vec3 &  _p1,
Vec3 &  _point,
Vec3 &  _normal,
real &  _distance 
) const
pure 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.

Implemented in IsoEx::CSG::Difference< Vec3 >, IsoEx::CSG::Intersection< Vec3 >, IsoEx::ImplicitSphere< Vec3 >, and IsoEx::CSG::Union< Vec3 >.

template<class Vec3>
virtual bool IsoEx::Implicit< Vec3 >::is_inside ( const Vec3 &  _point) const
pure 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.

Implemented in IsoEx::CSG::Difference< Vec3 >, IsoEx::CSG::Intersection< Vec3 >, IsoEx::ImplicitSphere< Vec3 >, and IsoEx::CSG::Union< Vec3 >.

template<class Vec3>
virtual real IsoEx::Implicit< Vec3 >::scalar_distance ( const Vec3 &  _point) const
pure virtual

Returns the scalar distance value of _point. Points inside the object should have negative distances, points outside positive distance.

Implemented in IsoEx::CSG::Difference< Vec3 >, IsoEx::CSG::Intersection< Vec3 >, IsoEx::ImplicitSphere< Vec3 >, and IsoEx::CSG::Union< Vec3 >.


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