AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
VoronoiGenerator.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXCOLLIDE_VORONOIGENERATOR_H
18#define AGXCOLLIDE_VORONOIGENERATOR_H
19
20#include <agx/agx.h>
22#include <agx/Referenced.h>
23#include <agx/debug.h>
24#include <agx/Vec3.h>
25#include <agx/Bound.h>
26#include <agxCollide/Shape.h>
27
28namespace agxCollide
29{
35 {
36 public:
43
45
46 public:
51
56
61
66
71
85 VoronoiCell generateVoronoiPolyhedra(unsigned int seed = 0, agx::Real pointDistance=0.75, agx::Real boundSize=5);
86
90 void setResolution(agx::Real resolution);
91
95 agx::Real getResolution() const;
96
97 protected:
99
100 agx::Vec3Vector generateEquidistantPointsInBound( agx::Real distance, agx::Real boundHalfVec, unsigned int seed );
101
103 // Variables
105 private:
106 agx::Real m_resolution;
107 };
108
110 {
111 m_resolution = resolution;
112 }
113
115 {
116 return m_resolution;
117 }
118}
119
120#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPHYSICS_EXPORT
Base class for a shape.
Definition Shape.h:54
VoronoiDiagramData generateVoronoiDiagramInShape(const agxCollide::Shape *shape, agx::UInt numPoints)
Generate the 3D Voronoi diagram in a shape from a set of specified points generated inside the specif...
VoronoiGenerator()
Default constructor.
agx::Vec3Vector generateEquidistantPointsInBound(agx::Real distance, agx::Real boundHalfVec, unsigned int seed)
void setResolution(agx::Real resolution)
Set resolution for plane tessellation in Voronoi diagram of basic primitives such as Spheres,...
agx::Real getResolution() const
Get resolution for plane tessellation in Voronoi diagram of basic primitives such as Spheres,...
VoronoiDiagramData generateVoronoiDiagramInBound(const agx::Bound3 &bound, const agx::UInt numPoints)
Generate the 3D Voronoi diagram inside a 3 dimensional bound from a specified point,...
VoronoiCell generateVoronoiPolyhedra(unsigned int seed=0, agx::Real pointDistance=0.75, agx::Real boundSize=5)
Create a polyhedra from a randomly generated Voronoi Diagram by using the method described in: https:...
VoronoiDiagramData generateVoronoiDiagramInBound(const agx::Bound3 &bound, const agx::Vec3Vector &voronoiPoints)
Generate the 3D Voronoi diagram inside a 3 dimensional bound from a specified point,...
VoronoiDiagramData generateVoronoiDiagramInShape(const agxCollide::Shape *shape, const agx::Vec3Vector &voronoiPoints)
Generate the 3D Voronoi diagram in a shape from a set of specified points, generated in the LOCAL coo...
agx::Vector< VoronoiCell > VoronoiDiagramData
Base class providing referencing counted objects.
Definition Referenced.h:120
Templated vector class.
Definition agx/Vector.h:53
#define AGX_FORCE_INLINE
Definition macros.h:58
This namespace consists of a set of classes for handling geometric intersection tests including boole...
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42