7#ifndef PXR_IMAGING_GEOM_UTIL_DISK_MESH_GENERATOR_H
8#define PXR_IMAGING_GEOM_UTIL_DISK_MESH_GENERATOR_H
10#include "pxr/imaging/geomUtil/api.h"
11#include "pxr/imaging/geomUtil/meshGeneratorBase.h"
16PXR_NAMESPACE_OPEN_SCOPE
55 static constexpr size_t minNumRadial = 3;
58 static size_t ComputeNumPoints(
59 const size_t numRadial,
60 const bool closedSweep =
true);
62 static size_t ComputeNumNormals()
68 static TfToken GetNormalsInterpolation()
71 return GeomUtilInterpolationTokens->constant;
76 const size_t numRadial,
77 const bool closedSweep =
true);
79 template<
typename PointIterType,
82 typename _EnableIfGfVec3Iterator<PointIterType>::type>
83 static void GeneratePoints(
85 const size_t numRadial,
86 const ScalarType radius,
89 constexpr ScalarType sweep = 360;
91 GeneratePoints(iter, numRadial,
92 radius, sweep, framePtr);
95 template<
typename PointIterType,
98 typename _EnableIfGfVec3Iterator<PointIterType>::type>
99 static void GeneratePoints(
101 const size_t numRadial,
102 const ScalarType radius,
103 const ScalarType sweepDegrees,
107 typename std::iterator_traits<PointIterType>::value_type;
109 _GeneratePointsImpl(numRadial, radius, sweepDegrees,
110 framePtr ? _PointWriter<PointType>(iter, framePtr)
111 : _PointWriter<PointType>(iter));
114 using GeomUtilMeshGeneratorBase::GeneratePoints;
116 template<
typename PointIterType,
118 typename _EnableIfGfVec3Iterator<PointIterType>::type>
119 static void GenerateNormals(
124 typename std::iterator_traits<PointIterType>::value_type;
126 _GenerateNormalsImpl(
127 framePtr ? _PointWriter<PointType>(iter, framePtr)
128 : _PointWriter<PointType>(iter));
131 using GeomUtilMeshGeneratorBase::GenerateNormals;
135 template<
typename Po
intType>
136 static void _GeneratePointsImpl(
137 const size_t numRadial,
138 const typename PointType::ScalarType radius,
139 const typename PointType::ScalarType sweepDegrees,
140 const _PointWriter<PointType>& ptWriter);
142 template<
typename Po
intType>
143 static void _GenerateNormalsImpl(
144 const _PointWriter<PointType>& ptWriter);
147PXR_NAMESPACE_CLOSE_SCOPE
This class provides an implementation for generating topology, point positions and surface normals on...
This class provides common implementation for the different mesh generator classes in GeomUtil.
Stores a 4x4 matrix of double elements.
Topology data for meshes.
Token for efficient comparison, assignment, and hashing of known strings.