3ds Max C++ API Reference
Loading...
Searching...
No Matches
triangulate.h File Reference
#include "GeomExport.h"
#include "geom_span.hpp"
#include <cassert>
#include <cstdint>

Classes

class  BufferProxy< ElementType >
 

Namespaces

namespace  MaxSDK
 

Enumerations

enum  TriangulationVersionType { TRIANGULATION_VER_2023_1 = 0 , TRIANGULATION_VER_2024 = 1 }
 Enumeration indexing available versions of the algorithm implemented by the variants of BuildDiagonals defined below. More...
 

Functions

void SortPolygonDiagonals (geo::span< int > diag)
 Puts diagonals in increase-by-last-index, decrease-by-first order.
 
void SortPolygonDiagonals (geo::span< uint64_t > diag)
 
void BestConvexDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const Point3 > &meshVertices, int *diag)
 Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
 
void BestConvexDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const DPoint3 > &meshVertices, int *diag)
 Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
 
void FindDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const Point3 > &meshVertices, int *diag)
 This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
 
void FindDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const DPoint3 > &meshVertices, int *diag)
 This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
 
bool BuildDiagonals (geo::span< int > &diagonals, const geo::span< const Point3 > &xVertices, bool doComputeIfPlanarConvex=true, TriangulationVersionType version=TRIANGULATION_VER_2024)
 Computes a set of diagonals for the polygon defined by the specified bounding vertex loop.
 
bool BuildDiagonals (geo::span< uint16_t > &diagonals, const geo::span< const Point3 > &xVertices, bool doComputeIfPlanarConvex=true, TriangulationVersionType version=TRIANGULATION_VER_2024)
 
bool BuildDiagonals (geo::span< int > &diagonals, const geo::span< const int > &vertexIndices, const BufferProxy< const Point3 > &xVertices, bool doComputeIfPlanarConvex=true, TriangulationVersionType version=TRIANGULATION_VER_2024)
 Computes a set of diagonals for the polygon defined by the specified bounding vertex loop.
 
bool BuildDiagonals (geo::span< uint16_t > &diagonals, const geo::span< const uint64_t > &vertexIndices, const BufferProxy< const Point3 > &xVertices, bool doComputeIfPlanarConvex=true, TriangulationVersionType version=TRIANGULATION_VER_2024)
 
void GetTriangles (int deg, geo::span< int > diag, geo::span< int > out_tri)
 This method fills in the buffer with the full triangulation for the face, based on the internal diagonal list.
 
void GetTriangles (uint16_t deg, geo::span< uint16_t > diag, geo::span< uint16_t > out_tri)
 
void GetTriangles (uint64_t deg, geo::span< uint64_t > diag, geo::span< uint64_t > out_tri)