ivutils
Loading...
Searching...
No Matches
Cylinder (Cylinder)

Cylinder - A cylinder with an arbitrary two-dimensional base of type base_t The axis of the cylinder passes through the origin point and is directed along the n axis of the x and y axes of the two-dimensional plane on which the base lies, directed along the vectors x and y It is assumed that the vector n is perpendicular to x and y (the base is perpendicular to the axis of the cylinder) "Oblique" cylinder, for which the specified base is not perpendicular to the cylinder axis, you need to set using the StretchedRegion template

Important members and methods of the class:

  • this->init(Vector_3 origin, Vector_3 n, vec_type R) - constructor, builds an infinite cylinder with a round base, radius R, height directed along the vector n.
  • this->init(Vector_3 origin, Vector_3 n, vec_type R, vec_type height) - constructor, builds a cylinder with a round base, radius R, height H, directed along the vector n.

Example

Vector_3 origin (0,0,0), n (0,0,1), l (0,0,2), x (1,0,0), y (0,1,0);
double r = 2, h = 3;
Cylinder<Circle> cyl(origin, n, x, y, &cir);