Node:Ellipse Constructors and Setting Functions, Next:, Previous:Ellipse Data Members, Up:Ellipse Reference



Constructors and Setting Functions

void Ellipse (void) Default constructor
Creates an empty Ellipse.

void Ellipse (const Point& ccenter, const real aaxis_h, const real aaxis_v, [const real angle_x = 0, [const real angle_y = 0, [const real angle_z = 0, [const unsigned short nnumber_of_points = DEFAULT_NUMBER_OF_POINTS]]]]) Constructor
Creates an Ellipse in the x-z plane, centered at the origin, with its horizontal axis == aaxis_h and its vertical axis == aaxis_v. If any of the arguments angle_x, angle_y, or angle_z is non-zero, the Ellipse is rotated about the x, y, and z-axis in that order, by the amounts indicated by the corresponding arguments. Finally, the Ellipse is shifted such that its center comes to lie at ccenter.
          Ellipse e(origin, 6, 4);
          e.draw();
          


[Figure 159. Not displayed.]

Fig. 159.

          Point P(1, 1, 1);
          Ellipse e(P, 6, 4, 15, 12, 11);
          e.draw();
          


[Figure 160. Not displayed.]

Fig. 160.

void set (const Point& ccenter, const real aaxis_h, const real aaxis_v, [const real angle_x = 0, [const real angle_y = 0, [const real angle_z = 0, [const unsigned short nnumber_of_points = DEFAULT_NUMBER_OF_POINTS]]]]) Setting function
Corresponds to the constructor above.

Ellipse* create_new<Ellipse> (const Ellipse* e) Template specializations
Ellipse* create_new<Ellipse> (const Ellipse& e)
Pseudo-constructors for dynamic allocation of Ellipses. They create a Ellipse on the free store and allocate memory for it using new(Ellipse). They return a pointer to the new Ellipse.

If e is a non-zero pointer or a reference, the new Ellipse will be a copy of e. If the new object is not meant to be a copy of an existing one, 0 must be passed to create_new<Ellipse>() as its argument. See Dynamic Allocation of Shapes, for more information.