7#ifndef PXR_IMAGING_GEOM_UTIL_CAPSULE_MESH_GENERATOR_H
8#define PXR_IMAGING_GEOM_UTIL_CAPSULE_MESH_GENERATOR_H
10#include "pxr/imaging/geomUtil/api.h"
11#include "pxr/imaging/geomUtil/meshGeneratorBase.h"
15PXR_NAMESPACE_OPEN_SCOPE
56 static constexpr size_t minNumRadial = 3;
57 static constexpr size_t minNumCapAxial = 1;
60 static size_t ComputeNumPoints(
61 const size_t numRadial,
62 const size_t numCapAxial,
63 const bool closedSweep =
true);
67 const size_t numRadial,
68 const size_t numCapAxial,
69 const bool closedSweep =
true);
71 template<
typename PointIterType,
74 typename _EnableIfGfVec3Iterator<PointIterType>::type>
75 static void GeneratePoints(
77 const size_t numRadial,
78 const size_t numCapAxial,
79 const ScalarType radius,
80 const ScalarType height,
83 constexpr ScalarType sweep = 360;
85 GeneratePoints(iter, numRadial, numCapAxial,
88 height, sweep, framePtr);
91 template<
typename PointIterType,
94 typename _EnableIfGfVec3Iterator<PointIterType>::type>
95 static void GeneratePoints(
97 const size_t numRadial,
98 const size_t numCapAxial,
99 const ScalarType bottomRadius,
100 const ScalarType topRadius,
101 const ScalarType height,
102 const ScalarType sweepDegrees,
106 typename std::iterator_traits<PointIterType>::value_type;
108 _GeneratePointsImpl(numRadial, numCapAxial, bottomRadius, topRadius,
109 height, sweepDegrees,
110 framePtr ? _PointWriter<PointType>(iter, framePtr)
111 : _PointWriter<PointType>(iter));
114 using GeomUtilMeshGeneratorBase::GeneratePoints;
117 template<
typename Po
intType>
118 static void _GeneratePointsImpl(
119 const size_t numRadial,
120 const size_t numCapAxial,
121 const typename PointType::ScalarType bottomRadius,
122 const typename PointType::ScalarType topRadius,
123 const typename PointType::ScalarType height,
124 const typename PointType::ScalarType sweep,
125 const _PointWriter<PointType>& ptWriter);
128PXR_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.