Rhino C++ API  8.11
Public Member Functions | List of all members
ON_PlaneSDF Class Reference

#include <opennurbs_plus_implicitfn.h>

Inheritance diagram for ON_PlaneSDF:
ON_SignedDistanceFunction

Public Member Functions

 ON_PlaneSDF (const ON_Plane &plane)
 
double Evaluate (const ON_3dPoint &pt, ON_3dVector &normal) const override
 
- Public Member Functions inherited from ON_SignedDistanceFunction
 ON_SignedDistanceFunction ()
 

Additional Inherited Members

- Public Attributes inherited from ON_SignedDistanceFunction
int nEval
 

Constructor & Destructor Documentation

◆ ON_PlaneSDF()

ON_PlaneSDF::ON_PlaneSDF ( const ON_Plane plane)

Member Function Documentation

◆ Evaluate()

double ON_PlaneSDF::Evaluate ( const ON_3dPoint p,
ON_3dVector normal 
) const
overridevirtual

Evaluate the signed distance function Parameters: p [in] - the point to evaluate the SDF at normal [out] - normal at the closest point on the SDF such that closestPt = pt - dist*normal/normal.Length() Returns: the distance between the closest point and the input point. Remarks:

  1. The returned distance can be ON_UNSET_VALUE when the SDF is unable to evaluate the distance
  2. The returned normal is not unitized and can have (almost) zero length.

You should account for both cases when using the SDF.

Implements ON_SignedDistanceFunction.