Download 3DLDF.
Transcript
Chapter 31: Ellipse Reference real get linear eccentricity (void) 228 [const function] Returns linear_eccentricity. real get numerical eccentricity (void) [const function] Returns numerical_eccentricity. real get axis v (void) real get axis v (void) [Function] [const function] Calculates and returns the value of axis_h. get_axis_v() first checks if the Ellipse is still elliptical, using is_elliptical() (see Section 31.7 [Ellipse Reference; Querying], page 227). Operations such as scale() and shear() can cause an Ellipse to become non-elliptical. If this is the case, this function returns INVALID_REAL. If the Ellipse is still elliptical, axis_v is recalculated and returned. In the non-const version, axis_v is also reset to the new value. real get axis h (void) real get axis h (void) [Function] [const function] Calculates and returns the value of axis_h. get_axis_h() first checks if the Ellipse is still elliptical, using is_elliptical() (see Section 31.7 [Ellipse Reference; Querying], page 227). Operations such as scale() and shear() can cause an Ellipse to become non-elliptical. If this is the case, this function returns INVALID_REAL. If the Ellipse is still elliptical, axis_h is recalculated and returned. In the non-const version, axis_h is also reset to the new value. signed short location (Point p ) [const virtual function] Returns a value l indicating the location of the Point argument p with respect to the Ellipse. Let e stand for the Ellipse. The return values are as follows: 0 p lies on the perimeter of e. 1 p lies in the plane of e, within its perimeter. -1 p lies in the plane of e, outside its perimeter. -2 p and e do not lie in the same plane. -3 e is not elliptical, possibly due to having been transformed. Ellipse e(origin, 3, 5, 45, 15, 3); e.shift(2, 1, 1); Point A = e.get_point(7); cout << e.location(A); a 0 Point B = center.mediate(e.get_point(2)); cout << e.location(B); a 1 Point C = center.mediate(e.get_point(2), 1.5); cout << e.location(C);