|
typedef Vec3::value_type | real |
|
typedef Vec3::value_type | real |
|
template<class Vec3>
class IsoEx::CSG::Difference< Vec3 >
This class builds a CSG difference of two other implicits.
- See also
- IsoEx::Implicit
Constructor: given the two implicit objects, builds _implicit1 minus _implicit2.
template<class Vec3 >
bool IsoEx::CSG::Difference< Vec3 >::directed_distance |
( |
const Vec3 & |
_p0, |
|
|
const Vec3 & |
_p1, |
|
|
Vec3 & |
_point, |
|
|
Vec3 & |
_normal, |
|
|
real & |
_distance |
|
) |
| const |
|
inlinevirtual |
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< Vec3 >.
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< Vec3 >.
Returns the scalar distance value of _point. Points inside the object should have negative distances, points outside positive distance.
Implements IsoEx::Implicit< Vec3 >.
The documentation for this class was generated from the following file: