HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeomUtilCylinderMeshGenerator Class Referencefinal

#include <cylinderMeshGenerator.h>

+ Inheritance diagram for GeomUtilCylinderMeshGenerator:

Static Public Member Functions

static GEOMUTIL_API size_t ComputeNumPoints (const size_t numRadial, const bool closedSweep=true)
 
static GEOMUTIL_API
PxOsdMeshTopology 
GenerateTopology (const size_t numRadial, const bool closedSweep=true)
 
template<typename PointIterType , typename ScalarType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter, const size_t numRadial, const ScalarType radius, const ScalarType height, const GfMatrix4d *framePtr=nullptr)
 
template<typename PointIterType , typename ScalarType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter, const size_t numRadial, const ScalarType bottomRadius, const ScalarType topRadius, const ScalarType height, const ScalarType sweepDegrees, const GfMatrix4d *framePtr=nullptr)
 
- Static Public Member Functions inherited from GeomUtilMeshGeneratorBase
template<typename PointIterType , typename Enabled = typename _EnableIfNotGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter,...)
 

Static Public Attributes

static constexpr size_t minNumRadial = 3
 

Additional Inherited Members

- Protected Types inherited from GeomUtilMeshGeneratorBase
enum  _CapStyle { CapStyleNone, CapStyleSharedEdge, CapStyleSeparateEdge }
 
- Static Protected Member Functions inherited from GeomUtilMeshGeneratorBase
static PxOsdMeshTopology _GenerateCappedQuadTopology (const size_t numRadial, const size_t numQuadStrips, const _CapStyle bottomCapStyle, const _CapStyle topCapStyle, const bool closedSweep)
 
static size_t _ComputeNumRadialPoints (const size_t numRadial, const bool closedSweep)
 

Detailed Description

This class provides an implementation for generating topology and point positions on a cylinder with a given radius and height. The cylinder is made up of circular cross-sections in the XY plane and is centered at the origin. Each cross-section has numRadial segments. The height is aligned with the Z axis, with the base at Z = -h/2.

An optional transform may be provided to GeneratePoints to orient the cone as necessary (e.g., whose height is along the Y axis).

An additional overload of GeneratePoints is provided to specify different radii for the bottom and top discs of the cylinder and a sweep angle for cylinder about the +Z axis. When the sweep is less than 360 degrees, the generated geometry is not closed.

Note
Setting one radius to 0 in order to get a cone is inefficient and could result in artifacts. Clients should use GeomUtilConeMeshGenerator instead.

Usage:

const size_t numRadial = 8;
const size_t numPoints =
const float radius = 1, height = 2;
MyPointContainer<GfVec3f> points(numPoints);
points.begin(), numRadial, radius, height);

Definition at line 70 of file cylinderMeshGenerator.h.

Member Function Documentation

static GEOMUTIL_API size_t GeomUtilCylinderMeshGenerator::ComputeNumPoints ( const size_t  numRadial,
const bool  closedSweep = true 
)
static
template<typename PointIterType , typename ScalarType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GeomUtilCylinderMeshGenerator::GeneratePoints ( PointIterType  iter,
const size_t  numRadial,
const ScalarType  radius,
const ScalarType  height,
const GfMatrix4d framePtr = nullptr 
)
inlinestatic

Definition at line 90 of file cylinderMeshGenerator.h.

template<typename PointIterType , typename ScalarType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GeomUtilCylinderMeshGenerator::GeneratePoints ( PointIterType  iter,
const size_t  numRadial,
const ScalarType  bottomRadius,
const ScalarType  topRadius,
const ScalarType  height,
const ScalarType  sweepDegrees,
const GfMatrix4d framePtr = nullptr 
)
inlinestatic

Definition at line 109 of file cylinderMeshGenerator.h.

static GEOMUTIL_API PxOsdMeshTopology GeomUtilCylinderMeshGenerator::GenerateTopology ( const size_t  numRadial,
const bool  closedSweep = true 
)
static

Member Data Documentation

constexpr size_t GeomUtilCylinderMeshGenerator::minNumRadial = 3
static

Definition at line 74 of file cylinderMeshGenerator.h.


The documentation for this class was generated from the following file: