@@ -48,13 +48,13 @@ calcEllipsoidBoundMax(const math::Mat3s& ellipsoidTransform)
4848 return boundMax;
4949}
5050
51- struct EllipsIndicies
51+ struct EllipseIndicies
5252{
53- EllipsIndicies (const points::AttributeSet::Descriptor& desc,
53+ EllipseIndicies (const points::AttributeSet::Descriptor& desc,
5454 const std::string& rotation,
5555 const std::string& pws)
56- : rotation(EllipsIndicies ::getAttributeIndex<Mat3s>(desc, rotation, false ))
57- , positionws(EllipsIndicies ::getAttributeIndex<Vec3d>(desc, pws, true )) {}
56+ : rotation(EllipseIndicies ::getAttributeIndex<Mat3s>(desc, rotation, false ))
57+ , positionws(EllipseIndicies ::getAttributeIndex<Vec3d>(desc, pws, true )) {}
5858
5959 bool hasWorldSpacePosition () const { return positionws != std::numeric_limits<size_t >::max (); }
6060
@@ -108,7 +108,7 @@ struct EllipsoidTransfer :
108108 const FilterT& filter,
109109 util::NullInterrupter* interrupt,
110110 SdfT& surface,
111- const EllipsIndicies & indices,
111+ const EllipseIndicies & indices,
112112 Int64Tree* cpg = nullptr ,
113113 const std::unordered_map<const PointDataTree::LeafNodeType*, Index>* ids = nullptr )
114114 : BaseT(pidx, width, rt, source, filter, interrupt, surface, cpg, ids)
@@ -253,27 +253,27 @@ struct EllipsoidTransfer :
253253 // the sqrts and projections when outside the half band
254254 len = math::Sqrt (len);
255255 if (OPENVDB_UNLIKELY (len == 0 )) {
256- // The minimum radius of this ellips in world space. Used only to store
256+ // The minimum radius of this ellipse in world space. Used only to store
257257 // a distance when a given voxel's ijk coordinates overlaps exactly with
258- // the center of an ellips
258+ // the center of an ellipse
259259 d = -ValueT (std::min (radius.x (), std::min (radius.y (), radius.z ()))) * ValueT (this ->mDx );
260260 }
261261 else {
262- Vec3d ellipsNormal = (ellipsoidInverse.transpose () * pointOnUnitSphere);
263- ellipsNormal .normalize ();
264- // Project xyz onto the ellips normal, scale length by
262+ Vec3d ellipseNormal = (ellipsoidInverse.transpose () * pointOnUnitSphere);
263+ ellipseNormal .normalize ();
264+ // Project xyz onto the ellipse normal, scale length by
265265 // the offset correction based on the distance from the
266266 // unit sphere surface and finally convert back to
267267 // world space
268268 //
269269 // Invert the length to represent a proportional offset to
270270 // the final distance when the above sphere point is
271- // projected back onto the ellips . If the length iz zero,
272- // then this voxel's ijk is the center of the ellips .
271+ // projected back onto the ellipse . If the length iz zero,
272+ // then this voxel's ijk is the center of the ellipse .
273273 d = static_cast <ValueT>(
274- ((x * ellipsNormal .x ()) +
275- (y * ellipsNormal .y ()) +
276- (z * ellipsNormal .z ())) // dot product
274+ ((x * ellipseNormal .x ()) +
275+ (y * ellipseNormal .y ()) +
276+ (z * ellipseNormal .z ())) // dot product
277277 * (1.0 - (RealT (1.0 )/len)) // scale
278278 * this ->mDx ); // world space
279279 }
@@ -287,9 +287,9 @@ struct EllipsoidTransfer :
287287#elif OPENVDB_ELLIPSOID_KERNEL_MODE == 2
288288 const RealT k2 = (pointOnUnitSphere * radInv2).length ();
289289 if (OPENVDB_UNLIKELY (k2 == 0 )) {
290- // The minimum radius of this ellips in world space. Used only to store
290+ // The minimum radius of this ellipse in world space. Used only to store
291291 // a distance when a given voxel's ijk coordinates overlaps exactly with
292- // the center of an ellips
292+ // the center of an ellipse
293293 d = -ValueT (std::min (radius.x (), std::min (radius.y (), radius.z ()))) * ValueT (this ->mDx );
294294 }
295295 else {
@@ -317,14 +317,14 @@ struct EllipsoidTransfer :
317317 }
318318
319319private:
320- const EllipsIndicies & mIndices ;
320+ const EllipseIndicies & mIndices ;
321321 std::unique_ptr<RotationHandleT> mRotationHandle ;
322322 std::unique_ptr<PwsHandleT> mPositionWSHandle ;
323323};
324324
325325
326326template <typename RadiusType, typename MaskTreeT>
327- struct EllipsSurfaceMaskOp
327+ struct EllipseSurfaceMaskOp
328328 : public rasterize_sdf_internal::SurfaceMaskOp<MaskTreeT>
329329{
330330 using BaseT = rasterize_sdf_internal::SurfaceMaskOp<MaskTreeT>;
@@ -333,19 +333,19 @@ struct EllipsSurfaceMaskOp
333333 using RadiusT = typename RadiusType::ValueType;
334334 static const Index DIM = points::PointDataTree::LeafNodeType::DIM;
335335
336- EllipsSurfaceMaskOp (
336+ EllipseSurfaceMaskOp (
337337 const math::Transform& src,
338338 const math::Transform& trg,
339339 const RadiusType& rad,
340340 const Real halfband,
341- const EllipsIndicies & indices)
341+ const EllipseIndicies & indices)
342342 : BaseT(src, trg, nullptr )
343343 , mRadius (rad)
344344 , mHalfband (halfband)
345345 , mIndices (indices)
346346 , mMaxDist (0 ) {}
347347
348- EllipsSurfaceMaskOp (const EllipsSurfaceMaskOp & other, tbb::split)
348+ EllipseSurfaceMaskOp (const EllipseSurfaceMaskOp & other, tbb::split)
349349 : BaseT(other)
350350 , mRadius (other.mRadius )
351351 , mHalfband (other.mHalfband )
@@ -354,7 +354,7 @@ struct EllipsSurfaceMaskOp
354354
355355 Vec3i getMaxDist () const { return mMaxDist ; }
356356
357- void join (EllipsSurfaceMaskOp & other)
357+ void join (EllipseSurfaceMaskOp & other)
358358 {
359359 mMaxDist = math::maxComponent (mMaxDist , other.mMaxDist );
360360 this ->BaseT ::join (other);
@@ -378,7 +378,7 @@ struct EllipsSurfaceMaskOp
378378 }
379379
380380 // The max stretch coefficient. We can't analyze each xyz component
381- // individually as we don't take into account the ellips rotation, so
381+ // individually as we don't take into account the ellipse rotation, so
382382 // have to expand the worst case uniformly
383383 const Real maxRadius = std::max (maxr.x (), std::max (maxr.y (), maxr.z ()));
384384
@@ -419,9 +419,9 @@ struct EllipsSurfaceMaskOp
419419 }
420420 }
421421
422- // / @brief Fill activity by analyzing the axis aligned ellips bounding
422+ // / @brief Fill activity by analyzing the axis aligned ellipse bounding
423423 // / boxes on points in this leaf. Slightly slower than just looking at
424- // / ellips stretches but produces a more accurate/tighter activation
424+ // / ellipse stretches but produces a more accurate/tighter activation
425425 // / result
426426 void fillFromStretchAndRotation (const typename LeafManagerT::LeafNodeType& leaf)
427427 {
@@ -463,7 +463,7 @@ struct EllipsSurfaceMaskOp
463463 }
464464 }
465465
466- // Compute max ellips bounds
466+ // Compute max ellipse bounds
467467 points::AttributeHandle<math::Mat3s> rotHandle (leaf.constAttributeArray (mIndices .rotation ));
468468 float maxUniformRadius (0 );
469469 Vec3f r (radius0);
@@ -484,7 +484,7 @@ struct EllipsSurfaceMaskOp
484484 }
485485 }
486486
487- // compute AABB of ellips
487+ // compute AABB of ellipse
488488 const math::Mat3s rotation = rotHandle.get (i);
489489 const math::Mat3s ellipsoidTransform = rotation.timesDiagonal (r);
490490 const Vec3d bounds = calcUnitEllipsoidBoundMaxSq (ellipsoidTransform);
@@ -494,7 +494,7 @@ struct EllipsSurfaceMaskOp
494494 for (size_t i = 0 ; i < 3 ; ++i) {
495495 // We don't do the sqrt per point so resolve the actual maxBounds now
496496 maxBounds[i] = std::sqrt (maxBounds[i]);
497- // Account for uniform stretch values - compare the ellips to isolated
497+ // Account for uniform stretch values - compare the ellipse to isolated
498498 // points and choose the largest radius of the two
499499 maxBounds[i] = std::max (double (maxUniformRadius), maxBounds[i]);
500500 }
@@ -571,7 +571,7 @@ struct EllipsSurfaceMaskOp
571571private:
572572 const RadiusType& mRadius ;
573573 const Real mHalfband ;
574- const EllipsIndicies & mIndices ;
574+ const EllipseIndicies & mIndices ;
575575 Vec3i mMaxDist ;
576576};
577577
@@ -614,20 +614,19 @@ rasterizeEllipsoids(const PointDataGridT& points,
614614 }
615615
616616 // Get attributes
617- const EllipsIndicies indices (leaf->attributeSet ().descriptor (),
617+ const EllipseIndicies indices (leaf->attributeSet ().descriptor (),
618618 settings.rotation ,
619619 settings.pws ); // pws is optional
620620
621621 typename SdfT::Ptr surface;
622622 GridPtrVec grids;
623623
624- if (settings.radius .empty ())
625- {
624+ if (settings.radius .empty ()) {
626625 // Initial Index Space radius
627626 FixedBandRadius<Vec3f> rad (Vec3f (radiusScale / vs), float (halfband));
628627
629628 // pre-compute ellipsoidal transform bounds and surface mask. Points that
630- // are not in the ellipse ellipses group are treated as spheres and follow
629+ // are not in the ellipses group are treated as spheres and follow
631630 // the same logic as that of the Fixed/VaryingSurfaceMaskOps. Ellipsoids
632631 // instead compute the max axis-aligned bounding boxes. The maximum extents
633632 // of the spheres/ellipses in a leaf is used for the maximum mask/lookup.
@@ -640,7 +639,7 @@ rasterizeEllipsoids(const PointDataGridT& points,
640639 tree::LeafManager<const PointDataTreeT> manager (points.tree ());
641640 // pass radius scale as index space
642641
643- EllipsSurfaceMaskOp <FixedBandRadius<Vec3f>, MaskTreeT>
642+ EllipseSurfaceMaskOp <FixedBandRadius<Vec3f>, MaskTreeT>
644643 op (points.transform (), *transform, rad, halfband, indices);
645644 tbb::parallel_reduce (manager.leafRange (), op);
646645
@@ -658,8 +657,7 @@ rasterizeEllipsoids(const PointDataGridT& points,
658657 (points, attributes, *surface,
659658 width, rad, points.transform (), filter, interrupter, *surface, indices); // args
660659 }
661- else
662- {
660+ else {
663661 using RadiusT = typename SettingsT::RadiusAttributeType;
664662
665663 const size_t ridx = leaf->attributeSet ().find (settings.radius );
@@ -671,7 +669,7 @@ rasterizeEllipsoids(const PointDataGridT& points,
671669 VaryingBandRadius<RadiusT, Vec3f> rad (ridx, float (halfband), Vec3f (radiusScale / vs));
672670
673671 // pre-compute ellipsoidal transform bounds and surface mask. Points that
674- // are not in the ellipse ellipses group are treated as spheres and follow
672+ // are not in the ellipse group are treated as spheres and follow
675673 // the same logic as that of the Fixed/VaryingSurfaceMaskOps. Ellipsoids
676674 // instead compute the max axis-aligned bounding boxes. The maximum extents
677675 // of the spheres/ellipses in a leaf is used for the maximum mask/lookup.
@@ -684,7 +682,7 @@ rasterizeEllipsoids(const PointDataGridT& points,
684682 tree::LeafManager<const PointDataTreeT> manager (points.tree ());
685683
686684 // pass radius scale as index space
687- EllipsSurfaceMaskOp <VaryingBandRadius<RadiusT, Vec3f>, MaskTreeT>
685+ EllipseSurfaceMaskOp <VaryingBandRadius<RadiusT, Vec3f>, MaskTreeT>
688686 op (points.transform (), *transform, rad, halfband, indices);
689687 tbb::parallel_reduce (manager.leafRange (), op);
690688
0 commit comments