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"
32PXR_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,
105 height, sweep, framePtr);
108 template<
typename PointIterType,
111 typename _EnableIfGfVec3Iterator<PointIterType>::type>
112 static void GeneratePoints(
114 const size_t numRadial,
115 const size_t numCapAxial,
116 const ScalarType bottomRadius,
117 const ScalarType topRadius,
118 const ScalarType height,
119 const ScalarType sweepDegrees,
123 typename std::iterator_traits<PointIterType>::value_type;
125 _GeneratePointsImpl(numRadial, numCapAxial, bottomRadius, topRadius,
126 height, sweepDegrees,
127 framePtr ? _PointWriter<PointType>(iter, framePtr)
128 : _PointWriter<PointType>(iter));
131 using GeomUtilMeshGeneratorBase::GeneratePoints;
134 template<
typename Po
intType>
135 static void _GeneratePointsImpl(
136 const size_t numRadial,
137 const size_t numCapAxial,
138 const typename PointType::ScalarType bottomRadius,
139 const typename PointType::ScalarType topRadius,
140 const typename PointType::ScalarType height,
141 const typename PointType::ScalarType sweep,
142 const _PointWriter<PointType>& ptWriter);
145PXR_NAMESPACE_CLOSE_SCOPE
This class provides an implementation for generating topology and point positions on a capsule.
This class provides common implementation for the different mesh generator classes in GeomUtil.
Stores a 4x4 matrix of double elements.
Topology data for meshes.