cylinder

A cylinder with circular or elliptical basis.

Signatures

  • cylinder()
  • cylinder( float height, float radius )
  • cylinder( float height, float radius, vector position )
  • cylinder( float height, float radiusX, float radiusY )
  • cylinder( vector direction, float radius )
  • cylinder( vector direction, vector radial )
  • cylinder( vector direction, vector radialA, vector radialB )
  • cylinder( vector direction, vector radialA, vector radialB, vector position )

Details

Constructors (1), (2), (3), (5) and (6) create cylinders with a circular basis. The basis radius is 0.5 for constructor (1), radius for constructors (2), (3) and (5) or the length of vector radial for constructor (6).

Constructors (4), (7) and (8) can have an elliptical basis with two radii. The radii values are radiusX and radiusY in X and Y directions (constructor (4)) or the length of vectors radialA and radialB (constructors (7) and (8)).

For constructors (1) to (5) the basis planes are orthogonal to the cylinder direction (i.e. the plane normals are parallel to the direction vector) whereas constructors (6) to (8) allow a tilting of the basis planes. This is defined by vectors radial, radialA and radialB that are in-plane vectors of the basis.

The cylinder height is either given by parameter height or by the length of vector direction. direction can also be used to align the cylinder within an arbitrary direction.

Casts To

solid

Parameters

height

Height of the cylinder (in Z direction).

radius

Basis radius of the circular cylinder.

radiusX

Basis radius in X direction of an elliptical cylinder.

radiusY

Basis radius in Y direction of an elliptical cylinder.

direction

Vector defining the axis direction and length of a cylinder that is aligned along an arbitrary direction.

radialA

Vector defining direction and length of one basis radius of an elliptical cylinder with arbitrarily aligned base plates.

radialB

Vector defining direction and length of another basis radius of an elliptical cylinder with arbitrarily aligned base plates.

position

Translation vector that is applied to the cylinder.