AGX Dynamics  2.37.2.0
triangulate.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 /*
18 This source code has been taken and modified by Algoryx Simulation AB
19 from the source and under the license given below.
20 */
22 
23 #ifndef TRIANGULATE_H
24 
25 #define TRIANGULATE_H
26 
83 namespace ConvexDecomposition
84 {
85 
86  // all 3d triangles should be co-planer. Doesn't bother to check, you should have done that yourself to begin with!
87  unsigned int triangulate3d(unsigned int pcount, // number of points in the polygon
88  const double *vertices, // array of 3d vertices.
89  double *triangles, // memory to store output triangles
90  unsigned int maxTri,
91  const double *plane); // maximum triangles we are allowed to output.
92 
93  unsigned int triangulate3d(unsigned int pcount, // number of points in the polygon
94  const unsigned int *indices, // polygon points using indices
95  const double *vertices, // base address for array indexing
96  double *triangles, // buffer to store output 3d triangles.
97  unsigned int maxTri,
98  const double *plane); // maximum triangles we can output.
99 
100  unsigned int triangulate2d(unsigned int pcount, // number of points in the polygon
101  const double *vertices, // address of input points (2d)
102  double *triangles, // destination buffer for output triangles.
103  unsigned int maxTri); // maximum number of triangles we can store.
104 
105 }
106 
107 #endif
108