Creates a
Cuboid
withcenter
at the origin, withheight
== h,width
== w, anddepth
== d. If x, y, or z is non-zero, theCuboid
is rotated by the amounts indicated around the corresponding main axes. Finally, theCuboid
is shifted such thatcenter
comes to lie at c.Point P(-3, -2, 12); Cuboid c(P, 3, 5, 2.93, 35, 10, 60);
![]()
Fig. 186.
Pseudo-constructors for dynamic allocation of
Cuboids
. They create aCuboid
on the free store and allocate memory for it usingnew(Cuboid)
. They return a pointer to the newCuboid
.If c is a non-zero pointer or a reference, the new
Cuboid
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 tocreate_new<Cuboid>()
as its argument. See Dynamic Allocation of Shapes, for more information.