7#ifndef PXR_IMAGING_GEOM_UTIL_SPHERE_MESH_GENERATOR_H
8#define PXR_IMAGING_GEOM_UTIL_SPHERE_MESH_GENERATOR_H
10#include "pxr/imaging/geomUtil/api.h"
11#include "pxr/imaging/geomUtil/meshGeneratorBase.h"
15PXR_NAMESPACE_OPEN_SCOPE
53 static constexpr size_t minNumRadial = 3;
54 static constexpr size_t minNumAxial = 2;
57 static size_t ComputeNumPoints(
58 const size_t numRadial,
59 const size_t numAxial,
60 const bool closedSweep =
true);
64 const size_t numRadial,
65 const size_t numAxial,
66 const bool closedSweep =
true);
68 template<
typename PointIterType,
71 typename _EnableIfGfVec3Iterator<PointIterType>::type>
72 static void GeneratePoints(
74 const size_t numRadial,
75 const size_t numAxial,
76 const ScalarType radius,
79 constexpr ScalarType sweep = 360;
80 GeneratePoints(iter, numRadial, numAxial, radius, sweep, framePtr);
83 template<
typename PointIterType,
86 typename _EnableIfGfVec3Iterator<PointIterType>::type>
87 static void GeneratePoints(
89 const size_t numRadial,
90 const size_t numAxial,
91 const ScalarType radius,
92 const ScalarType sweepDegrees,
96 typename std::iterator_traits<PointIterType>::value_type;
98 _GeneratePointsImpl(numRadial, numAxial, radius, sweepDegrees,
99 framePtr ? _PointWriter<PointType>(iter, framePtr)
100 : _PointWriter<PointType>(iter));
103 using GeomUtilMeshGeneratorBase::GeneratePoints;
107 template<
typename Po
intType>
108 static void _GeneratePointsImpl(
109 const size_t numRadial,
110 const size_t numAxial,
111 const typename PointType::ScalarType radius,
112 const typename PointType::ScalarType sweepDegrees,
113 const _PointWriter<PointType>& ptWriter);
116PXR_NAMESPACE_CLOSE_SCOPE
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 sphere with a ...
Stores a 4x4 matrix of double elements.
Topology data for meshes.