Node: Querying Regular Closed Plane Curves, Next: , Previous: Regular Closed Plane Curve Data Members, Up: Regular Closed Plane Curve Reference



Querying

bool is_quadratic (void) const inline virtual functions
bool is_cubic (void)
bool is_quartic (void)
These functions all return false. They are intended to be overloaded by member functions of derived classes.

real_triple get_coefficients (real Slope, real v_intercept) const inline virtual function
Returns a real_triple with all three values == INVALID_REAL. Intended to be overloaded by member functions of derived classes.

pair<real, real> solve (char axis_unknown, real known) const inline virtual function
Returns a pair<real, real> with first = second = INVALID_REAL. Intended to be overloaded by member functions of derived classes.

signed short location (Point ref_pt, Point p) const virtual function
Returns a signed short indicating the location of p with respect to the Reg_Cl_Plane_Curve, which must be planar. The Reg_Cl_Plane_Curve constructors should ensure that Reg_Cl_Plane_Curves are, but there is no guarantee that they will not have been manipulated into a non-planar state, by shearing, for example.

The argument ref_pt is used within the function for shifting a copy of the Reg_Cl_Plane_Curve to a convenient position. It need not be the |center| of the Reg_Cl_Plane_Curve, however, classes derived from Reg_Cl_Plane_Curve will probably have their own versions of location(), which will pass center as the ref_pt argument to this function. Reg_Cl_Plane_Curves need not have a meaningful |center|.

location() returns the following values:


-1
p and *this are coplanar, and p lies outside the perimeter of *this.
0
p and *this are coplanar, and p lies on the perimeter of *this.
1
p and *this are coplanar, and p lies inside the perimeter of *this.
-2
p and *this are not coplanar.
-3
Something has gone terribly wrong.
-4
The normal to *this has 0 magnitude, i.e., the |Points| on *this are colinear.
-5
An error occurred in putting *this in one of the major planes.

Point angle_point (real angle) Virtual function
Returns INVALID_POINT. Intended to be overloaded by member functions of derived classes.