User Manual 4.0 Right circular cylinder

De Wiki
Aller à : navigation, rechercher

Definition

The right circular cylinders are limited by two planes normal to their axis. So, they are defined by their axis (a line or two equivalent vectors origin and direction), their radius and their height :

CylinderStraightFinite.PNG

Implementation

The Right Circular Cylinder object in the SIRIUS library implements the cylinder interface. Please refer to the Javadoc for a complete list of public methods.

Instantiation

The object is built from two vectors (Vector3D) and two doubles :

Vector3D origin = new Vector3D(1.0, 1.0, 1.0);
Vector3D direction = new Vector3D(2.0, 0.0, 0.0);
double radius = 2.0;
double height= 5.0;
RightCircularCylinder cylinder = new RightCircularCylinder(origin, direction , radius, height);

Or directly from a Line and two doubles :

Line axis = new Line(origin, direction);
double radius = 2.0;
double height= 5.0;
RightCircularCylinder cylinder = new RightCircularCylinder(axis, radius, height);

Usage

Please refer to the [MAT_GEO_Home#HInteractions Interactions with other geometrical objects section] for methods inherited from the Shape interface.