Next: , Previous: Circle Data Members, Up: Circle Reference


32.2 Constructors and Setting Functions

— Default constructor: void Circle (void)

Creates an empty Circle.

— Constructor: void Circle (const Point& ccenter, const real ddiameter, [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]]]])

Creates a Circle with radius == ddiameter/2 in the x-z plane and centered at the origin with nnumber_of_points Points. If any of the arguments angle_x, angle_y, or angle_z is != 0, the Circle is rotated around the major axes by the angles indicated by the arguments. Finally, the Circle is shifted such that center comes to lie at ccenter.

— Setting function: void set (const Point& ccenter, const real ddiameter, [const real angle_x = 0, [const real angle_y = 0, [const real angle_z = 0]]])

Corresponds to the constructor above.

— Template specializations: Circle* create_new<Circle> (const Circle* c)
— : Circle* create_new<Circle> (const Circle& c)

Pseudo-constructors for dynamic allocation of Circles. They create a Circle on the free store and allocate memory for it using new(Circle). They return a pointer to the new Circle.

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