Insert_Cylinder

Functions

HC_KEY DInsert_Cylinder (const HCD_POINT *center_point_1, const HCD_POINT *center_point_2, double radius, const char *cap)
 Similar to Insert_Cylinder(), but accepts parameters of type double for increased precision. More...
 
HC_KEY Insert_Cylinder (const HC_POINT *center_point_1, const HC_POINT *center_point_2, double radius, const char *cap)
 Inserts a cylinder into the currently open segment. More...
 

Detailed Description

Function Documentation

◆ DInsert_Cylinder()

HC_KEY DInsert_Cylinder ( const HCD_POINT *  center_point_1,
const HCD_POINT *  center_point_2,
double  radius,
const char *  cap 
)

Similar to Insert_Cylinder(), but accepts parameters of type double for increased precision.

Parameters
center_point_1- Center of the first end of the cylinder.
center_point_2- Center of the second end of the cylinder.
radius- Radius of the cylinder.
cap- String specifying which ends to cap, either "first", "second", "none", or "both"
Returns
The key to the inserted geometry, or -1 if an error occurred.

DETAILS

No additional details. See Insert_Cylinder().

◆ Insert_Cylinder()

HC_KEY Insert_Cylinder ( const HC_POINT *  center_point_1,
const HC_POINT *  center_point_2,
double  radius,
const char *  cap 
)

Inserts a cylinder into the currently open segment.

Parameters
center_point_1- Center of the first end of the cylinder.
center_point_2- Center of the second end of the cylinder.
radius- Radius of the cylinder.
cap- String specifying which ends to cap, either "first", "second", "none", or "both"
Returns
The key to the inserted geometry, or -1 if an error occurred.

DETAILS

Cylinders are specified with two points and a radius, plus an options string to specify which, if any, of the end caps are to be drawn. The options string has only four legal values: "none", "first", "second" and "both".
Cylinders were introduced as a primitive primarily to allow for a higher-performance way to represent piping systems than what was previously available via shells. The benefits come in the form of both improved rendering speed and lower memory footprint.
Standard edge and face visibilities affect cylinders. When edges are visible, the edges are simply two circles at the ends connected by lengthwise struts. The edges around the end-caps are considered hard edges, and the lengthwise struts can be silhouette edges under the right viewing angles. When markers are visible, there will be one marker placed in the center of each end cap.
Like shells, cylinders have LOD representations. Unlike shells, however, the only form of LOD allowed on cylinders is simple changes in the tessellation resolution (i.e. it is not possible to use HC_Open_LOD to insert arbitrary geometry or modify the contents of a LOD). The tessellation resolutions of cylinders is given as an array of integers, one for every LOD level (see Set_Rendering_Options()). If the tessellation level is set to 0, the cylinder will be drawn as a line along its axis. If set to -1, it will be suppressed completely.
If the radius is 0, the cylinder will be rendered as a line.

NOTES

RESTRICTIONS

Arbitrary LOD geometry is not allowed. If such functionality is required, shells, not cylinders, are the appropriate primitive.
Cylinders are never broken lengthwise into pieces, making it impossible to have a specular highlight in the middle of a cylinder using Gouraud shading (though it would be possible with Phong).
Unlike shells, the individual faces, edges, and vertices of cylinders may not be assigned local attributes. Therefore, it is not possible to apply textures.
There is currently no mechanism to assign a starting point for the faceting so that the cylinder will exactly match up with other geometry, though cylinders should match up with each other.
There is currently no "draw 3d cylinder" I.M. callback point.

See also
Show_Cylinder