Loading...
Searching...
No Matches
QuadAndTriangleDataAdapter< PointType, PolygonType > Struct Template Reference

Contiguous quad and triangle data adapter class. More...

`#include <openvdb/tools/MeshToVolume.h>`

## Public Member Functions

| QuadAndTriangleDataAdapter (const std::vector< PointType > &points, const std::vector< PolygonType > &polygons)
| QuadAndTriangleDataAdapter (const PointType *pointArray, size_t pointArraySize, const PolygonType *polygonArray, size_t polygonArraySize)
size_t | polygonCount () const
size_t | pointCount () const
size_t | vertexCount (size_t n) const
| Vertex count for polygon n.
void | getIndexSpacePoint (size_t n, size_t v, Vec3d &pos) const
| Returns position pos in local grid index space for polygon n and vertex v.

## Detailed Description

template<typename PointType, typename PolygonType>
struct openvdb::v11_0::tools::QuadAndTriangleDataAdapter< PointType, PolygonType >

Contiguous quad and triangle data adapter class.

PointType and PolygonType must provide element access through the square brackets operator.

Points are assumed to be in local grid index space.

The PolygonType tuple can have either three or four components this property must be specified in a static member variable named `size`, similar to the math::Tuple class.

A four component tuple can represent a quads or a triangle if the fourth component set to `util::INVALID_INDEX`

## Constructor & Destructor Documentation

## QuadAndTriangleDataAdapter() [1/2]

template<typename PointType, typename PolygonType>

QuadAndTriangleDataAdapter | ( | const std::vector< PointType > & | points,
|  | const std::vector< PolygonType > & | polygons )

inline

## QuadAndTriangleDataAdapter() [2/2]

template<typename PointType, typename PolygonType>

QuadAndTriangleDataAdapter | ( | const PointType * | pointArray,
|  | size_t | pointArraySize,
|  | const PolygonType * | polygonArray,
|  | size_t | polygonArraySize )

inline

## Member Function Documentation

## getIndexSpacePoint()

template<typename PointType, typename PolygonType>

void getIndexSpacePoint | ( | size_t | n,
|  | size_t | v,
|  | Vec3d & | pos ) const

inline

Returns position pos in local grid index space for polygon n and vertex v.

## pointCount()

template<typename PointType, typename PolygonType>

size_t pointCount | ( |  | ) | const

inline

## polygonCount()

template<typename PointType, typename PolygonType>

size_t polygonCount | ( |  | ) | const

inline

## vertexCount()

template<typename PointType, typename PolygonType>

size_t vertexCount | ( | size_t | n | ) | const

inline

Vertex count for polygon n.