Creates a
Cuboidwithcenterat the origin, withheight== h,width== w, anddepth== d. If x, y, or z is non-zero, theCuboidis rotated by the amounts indicated around the corresponding main axes. Finally, theCuboidis shifted such thatcentercomes 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 aCuboidon 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
Cuboidwill 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.