24 #ifndef PXR_IMAGING_GEOM_UTIL_CAPSULE_MESH_GENERATOR_H 25 #define PXR_IMAGING_GEOM_UTIL_CAPSULE_MESH_GENERATOR_H 27 #include "pxr/imaging/geomUtil/api.h" 28 #include "pxr/imaging/geomUtil/meshGeneratorBase.h" 32 PXR_NAMESPACE_OPEN_SCOPE
73 static constexpr
size_t minNumRadial = 3;
74 static constexpr
size_t minNumCapAxial = 1;
77 static size_t ComputeNumPoints(
78 const size_t numRadial,
79 const size_t numCapAxial,
80 const bool closedSweep =
true);
84 const size_t numRadial,
85 const size_t numCapAxial,
86 const bool closedSweep =
true);
88 template<
typename PointIterType,
91 typename _EnableIfGfVec3Iterator<PointIterType>::type>
92 static void GeneratePoints(
94 const size_t numRadial,
95 const size_t numCapAxial,
96 const ScalarType radius,
97 const ScalarType height,
100 constexpr ScalarType sweep = 360;
102 GeneratePoints(iter, numRadial, numCapAxial,
111 template<
typename PointIterType,
114 typename _EnableIfGfVec3Iterator<PointIterType>::type>
115 static void GeneratePoints(
117 const size_t numRadial,
118 const size_t numCapAxial,
119 const ScalarType bottomRadius,
120 const ScalarType topRadius,
121 const ScalarType height,
122 const ScalarType bottomCapHeight,
123 const ScalarType topCapHeight,
124 const ScalarType sweepDegrees,
128 typename std::iterator_traits<PointIterType>::value_type;
130 _GeneratePointsImpl(numRadial, numCapAxial, bottomRadius, topRadius,
131 height, bottomCapHeight, topCapHeight, sweepDegrees,
132 framePtr ? _PointWriter<PointType>(iter, framePtr)
133 : _PointWriter<PointType>(iter));
136 using GeomUtilMeshGeneratorBase::GeneratePoints;
139 template<
typename Po
intType>
140 static void _GeneratePointsImpl(
141 const size_t numRadial,
142 const size_t numCapAxial,
143 const typename PointType::ScalarType bottomRadius,
144 const typename PointType::ScalarType topRadius,
145 const typename PointType::ScalarType height,
146 const typename PointType::ScalarType bottomCapHeight,
147 const typename PointType::ScalarType topCapHeight,
148 const typename PointType::ScalarType sweep,
149 const _PointWriter<PointType>& ptWriter);
152 PXR_NAMESPACE_CLOSE_SCOPE
154 #endif // PXR_IMAGING_GEOM_UTIL_CAPSULE_MESH_GENERATOR_H This class provides common implementation for the different mesh generator classes in GeomUtil.
This class provides an implementation for generating topology and point positions on a capsule.
Topology data for meshes.
Stores a 4x4 matrix of double elements.