Loading...
Searching...
No Matches
GeomUtilPlaneMeshGenerator Class Referencefinal

This class provides an implementation for generating topology, point positions and surface normals on a rectangular plane given the dimensions along the X and Y axes. More...

#include <planeMeshGenerator.h>

+ Inheritance diagram for GeomUtilPlaneMeshGenerator:

Static Public Member Functions

static GEOMUTIL_API size_t ComputeNumPoints ()
 
static size_t ComputeNumNormals ()
 
static TfToken GetNormalsInterpolation ()
 
static GEOMUTIL_API PxOsdMeshTopology GenerateTopology ()
 
template<typename PointIterType , typename ScalarType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter, const ScalarType xLength, const ScalarType yLength, const GfMatrix4d *framePtr=nullptr)
 
template<typename PointIterType , typename Enabled = typename _EnableIfGfVec3Iterator<PointIterType>::type>
static void GenerateNormals (PointIterType iter, const GfMatrix4d *framePtr=nullptr)
 
template<typename PointIterType , typename Enabled = typename _EnableIfNotGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter,...)
 
template<typename PointIterType , typename Enabled = typename _EnableIfNotGfVec3Iterator<PointIterType>::type>
static void GenerateNormals (PointIterType iter,...)
 
- Static Public Member Functions inherited from GeomUtilMeshGeneratorBase
template<typename PointIterType , typename Enabled = typename _EnableIfNotGfVec3Iterator<PointIterType>::type>
static void GeneratePoints (PointIterType iter,...)
 
template<typename PointIterType , typename Enabled = typename _EnableIfNotGfVec3Iterator<PointIterType>::type>
static void GenerateNormals (PointIterType iter,...)
 

Additional Inherited Members

- Protected Types inherited from GeomUtilMeshGeneratorBase
enum  _CapStyle { CapStyleNone , CapStyleSharedEdge , CapStyleSeparateEdge }
 
- Static Protected Member Functions inherited from GeomUtilMeshGeneratorBase
static PxOsdMeshTopology _GenerateCappedQuadTopology (const size_t numRadial, const size_t numQuadStrips, const _CapStyle bottomCapStyle, const _CapStyle topCapStyle, const bool closedSweep)
 
static size_t _ComputeNumRadialPoints (const size_t numRadial, const bool closedSweep)
 
static size_t _ComputeNumCappedQuadTopologyPoints (const size_t numRadial, const size_t numQuadStrips, const _CapStyle bottomCapStyle, const _CapStyle topCapStyle, const bool closedSweep)
 
template<typename ScalarType >
static std::vector< std::array< ScalarType, 2 > > _GenerateUnitArcXY (const size_t numRadial, const ScalarType sweepDegrees)
 

Detailed Description

This class provides an implementation for generating topology, point positions and surface normals on a rectangular plane given the dimensions along the X and Y axes.

The generated plane is centered at the origin.

An optional transform may be provided to GeneratePoints and GenerateNormals to orient the plane as necessary.

Usage:

const size_t numPoints =
GeomUtilPlaneMeshGenerator::ComputeNumPoints();
const float w = 5, l = 4;
MyPointContainer<GfVec3f> points(numPoints);
GeomUtilPlaneMeshGenerator::GeneratePoints(
points.begin(), w, l);
const size_t numNormals =
GeomUtilPlaneMeshGenerator::ComputeNumNormals();
MyPointContainer<GfVec3f> normals(numNormals);
GeomUtilPlaneMeshGenerator::GenerateNormals(
normals.begin());

Definition at line 50 of file planeMeshGenerator.h.

Member Function Documentation

◆ ComputeNumNormals()

static size_t ComputeNumNormals ( )
inlinestatic

Definition at line 57 of file planeMeshGenerator.h.

◆ GenerateNormals() [1/2]

static void GenerateNormals ( PointIterType  iter,
const GfMatrix4d framePtr = nullptr 
)
inlinestatic

Definition at line 95 of file planeMeshGenerator.h.

◆ GenerateNormals() [2/2]

static void GenerateNormals ( PointIterType  iter,
  ... 
)
inlinestatic

Definition at line 326 of file meshGeneratorBase.h.

◆ GeneratePoints() [1/2]

static void GeneratePoints ( PointIterType  iter,
const ScalarType  xLength,
const ScalarType  yLength,
const GfMatrix4d framePtr = nullptr 
)
inlinestatic

Definition at line 76 of file planeMeshGenerator.h.

◆ GeneratePoints() [2/2]

static void GeneratePoints ( PointIterType  iter,
  ... 
)
inlinestatic

Definition at line 308 of file meshGeneratorBase.h.

◆ GetNormalsInterpolation()

static TfToken GetNormalsInterpolation ( )
inlinestatic

Definition at line 63 of file planeMeshGenerator.h.


The documentation for this class was generated from the following file: