7#ifndef PXR_IMAGING_GEOM_UTIL_CYLINDER_MESH_GENERATOR_H
8#define PXR_IMAGING_GEOM_UTIL_CYLINDER_MESH_GENERATOR_H
10#include "pxr/imaging/geomUtil/api.h"
11#include "pxr/imaging/geomUtil/meshGeneratorBase.h"
15PXR_NAMESPACE_OPEN_SCOPE
57 static constexpr size_t minNumRadial = 3;
60 static size_t ComputeNumPoints(
61 const size_t numRadial,
62 const bool closedSweep =
true);
66 const size_t numRadial,
67 const bool closedSweep =
true);
69 template<
typename PointIterType,
72 typename _EnableIfGfVec3Iterator<PointIterType>::type>
73 static void GeneratePoints(
75 const size_t numRadial,
76 const ScalarType radius,
77 const ScalarType height,
80 constexpr ScalarType sweep = 360;
82 GeneratePoints(iter, numRadial,
85 height, sweep, framePtr);
88 template<
typename PointIterType,
91 typename _EnableIfGfVec3Iterator<PointIterType>::type>
92 static void GeneratePoints(
94 const size_t numRadial,
95 const ScalarType bottomRadius,
96 const ScalarType topRadius,
97 const ScalarType height,
98 const ScalarType sweepDegrees,
102 typename std::iterator_traits<PointIterType>::value_type;
104 _GeneratePointsImpl(numRadial, bottomRadius, topRadius, height,
106 framePtr ? _PointWriter<PointType>(iter, framePtr)
107 : _PointWriter<PointType>(iter));
110 using GeomUtilMeshGeneratorBase::GeneratePoints;
114 template<
typename Po
intType>
115 static void _GeneratePointsImpl(
116 const size_t numRadial,
117 const typename PointType::ScalarType bottomRadius,
118 const typename PointType::ScalarType topRadius,
119 const typename PointType::ScalarType height,
120 const typename PointType::ScalarType sweep,
121 const _PointWriter<PointType>& ptWriter);
124PXR_NAMESPACE_CLOSE_SCOPE
This class provides an implementation for generating topology and point positions on a cylinder with ...
This class provides common implementation for the different mesh generator classes in GeomUtil.
Stores a 4x4 matrix of double elements.
Topology data for meshes.