24#ifndef PXR_IMAGING_GEOM_UTIL_CYLINDER_MESH_GENERATOR_H
25#define PXR_IMAGING_GEOM_UTIL_CYLINDER_MESH_GENERATOR_H
27#include "pxr/imaging/geomUtil/api.h"
28#include "pxr/imaging/geomUtil/meshGeneratorBase.h"
32PXR_NAMESPACE_OPEN_SCOPE
74 static constexpr size_t minNumRadial = 3;
77 static size_t ComputeNumPoints(
78 const size_t numRadial,
79 const bool closedSweep =
true);
83 const size_t numRadial,
84 const bool closedSweep =
true);
86 template<
typename PointIterType,
89 typename _EnableIfGfVec3Iterator<PointIterType>::type>
90 static void GeneratePoints(
92 const size_t numRadial,
93 const ScalarType radius,
94 const ScalarType height,
97 constexpr ScalarType sweep = 360;
99 GeneratePoints(iter, numRadial,
102 height, sweep, framePtr);
105 template<
typename PointIterType,
108 typename _EnableIfGfVec3Iterator<PointIterType>::type>
109 static void GeneratePoints(
111 const size_t numRadial,
112 const ScalarType bottomRadius,
113 const ScalarType topRadius,
114 const ScalarType height,
115 const ScalarType sweepDegrees,
119 typename std::iterator_traits<PointIterType>::value_type;
121 _GeneratePointsImpl(numRadial, bottomRadius, topRadius, height,
123 framePtr ? _PointWriter<PointType>(iter, framePtr)
124 : _PointWriter<PointType>(iter));
127 using GeomUtilMeshGeneratorBase::GeneratePoints;
131 template<
typename Po
intType>
132 static void _GeneratePointsImpl(
133 const size_t numRadial,
134 const typename PointType::ScalarType bottomRadius,
135 const typename PointType::ScalarType topRadius,
136 const typename PointType::ScalarType height,
137 const typename PointType::ScalarType sweep,
138 const _PointWriter<PointType>& ptWriter);
141PXR_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.