Insert_PolyCylinder

Functions

HC_KEY DInsert_PolyCylinder (int p_count, const HC_DPOINT *pts, int r_count, const double *radii, const char *capping)
 Similar to Insert_PolyCylinder(), but operates on double-precision data. More...
 
HC_KEY Insert_PolyCylinder (int p_count, const HC_POINT *pts, int r_count, const float *radii, const char *capping)
 Create a polycylinder from a 3D array of points and an array of radii. More...
 

Detailed Description

Function Documentation

◆ DInsert_PolyCylinder()

HC_KEY DInsert_PolyCylinder ( int  p_count,
const HC_DPOINT *  pts,
int  r_count,
const double *  radii,
const char *  capping 
)

Similar to Insert_PolyCylinder(), but operates on double-precision data.

Parameters
p_count- number of items in pts
pts- Vector of x-y-z triplets for the coordinates of the center of the polycylinder. (A simple N x 3 array may also be used.) Passed by reference always.
r_count- number of items in radii
radii- array of radius lengths as measured from the centerline
capping- 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.

◆ Insert_PolyCylinder()

HC_KEY Insert_PolyCylinder ( int  p_count,
const HC_POINT *  pts,
int  r_count,
const float *  radii,
const char *  capping 
)

Create a polycylinder from a 3D array of points and an array of radii.

Parameters
p_count- number of items in pts
pts- Vector of x-y-z triplets for the coordinates of the center of the polycylinder. (A simple N x 3 array may also be used.) Passed by reference always.
r_count- number of items in radii
radii- array of radius lengths as measured from the centerline
capping- 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

A polycylinder is a multi-segmented cylinder that can have varying radii at the ends of each segment. If p_count is greater than r_count the corresponding elements of pts and radii are paired up and elements beyond r_count will be wrapped around to the begining of radii. p_count should not be less than r_count. When the radii of two adjacent vertices are both 0, the section betwen those points will be rendered as a line.

NOTES

This primitive can be used to create cones.

RESTRICTIONS

Any local vertex attributes will be thrown away if the polycylinder is edited.

See also
Edit_PolyCylinder, Show_PolyCylinder, Insert_Polyline