A Delaunay triangulation connects a set of points with lines so that a given point is connected to its neighbors. The 3D extension maxon::Delaunay3DInterface allows to fill the space between points with tetrahedrons.
  
  
  
 
  
 
  {
  }
 
 
  
  delaunay3D.AddPointsIntoTetrahedralization(points) 
iferr_return;
 
  delaunay3D.CalculateDelaunayTetrahedralization() 
iferr_return;
 
 
  
  const 
maxon::BaseArray<
maxon::Tetrahedron>& tetrahedrons = delaunay3D.GetTetrahedrons();
 
  const 
maxon::BaseArray<
Vector>& pointsArray = delaunay3D.GetPoints();
 
 
 
 
  
  for (const 
maxon::Tetrahedron& tetrahedron : tetrahedrons)
 
  {
    
                      {
                        {
                          if (tetra.points[
i] < internalVertice)
 
                            return false;
                        }
                        return true;
                      };
 
    
    if (CheckTetra(tetrahedron))
    {
      
      PolygonObject* const polyObject = PolygonObject::Alloc(tetrahedronPoints, tetrahedronFaces);
      if (polyObject != nullptr)
      {
        CPolygon* const polygons = polyObject->GetPolygonW();
        Vector*   
const polyPoints = polyObject->GetPointW();
 
 
        if (polygons && polyPoints)
        {
          
          {
            polyPoints[
i] = pointsArray[pointIndex];
 
          }
 
          
          {
            
            tetrahedron.GetFacePoints(
i, tetraPoints);
 
            
            polygons[
i].a = tetrahedron.GetPointIndexOfPoint(tetraPoints.
x);
 
            polygons[
i].b = tetrahedron.GetPointIndexOfPoint(tetraPoints.
y);
 
            polygons[
i].c = tetrahedron.GetPointIndexOfPoint(tetraPoints.
z);
 
            polygons[
i].d = tetrahedron.GetPointIndexOfPoint(tetraPoints.
z);
 
          }
        }
 
        
 
        
                              {
                                color.
x = (randomGen.Get01() * 0.5) + 0.5;
 
                                color.
y = (randomGen.Get01() * 0.5) + 0.5;
 
                                color.
z = (randomGen.Get01() * 0.5) + 0.5;
 
                                return color;
                              };
 
        
        
        doc->InsertObject(polyObject, 
nullptr, 
nullptr);
 
      }
    }
  }
Py_ssize_t i
Definition: abstract.h:645
 
const char ** buffer
Definition: abstract.h:327
 
NONE
Definition: asset_browser.h:1
 
void AddPoint(const Vector64 &p)
Definition: c4d_tools.h:563
 
T maxValue
The inclusive maximum boundary of this range. If the minimum boundary is not less than or equal to th...
Definition: range.h:257
 
T minValue
The inclusive minimum boundary of this range.
Definition: range.h:256
 
for(i=0;i< length;i++)
Definition: unicodeobject.h:61
 
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:187
 
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:180
 
int32_t Int32
32 bit signed integer datatype.
Definition: apibase.h:175
 
static auto Create(ARGS &&... args)
Definition: apibase.h:2823
 
#define MSG_UPDATE
Must be sent if the bounding box has to be recalculated. (Otherwise use MSG_CHANGE....
Definition: c4d_baselist.h:372
 
#define ConstDescID(...)
Definition: lib_description.h:592
 
maxon::Float32 Float32
Definition: ge_sys_math.h:59
 
LMinMax MinMax
Definition: c4d_tools.h:827
 
maxon::Int Int
Definition: ge_sys_math.h:55
 
maxon::Vec3< maxon::Float64, 1 > Vector
Definition: ge_math.h:140
 
The maxon namespace contains all declarations of the Maxon API.
Definition: autoweight.h:21
 
@ ID_BASEOBJECT_USECOLOR
Definition: obase.h:19
 
@ ID_BASEOBJECT_USECOLOR_ALWAYS
Definition: obase.h:22
 
@ ID_BASEOBJECT_COLOR
Definition: obase.h:24
 
const char * doc
Definition: pyerrors.h:226
 
#define iferr_return
Definition: resultbase.h:1531
 
Definition: tetrahedron.h:19