AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
TriangleVoronoiRegion.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_TRIANGLEVORONOIREGION_H
18#define AGXCOLLIDE_TRIANGLEVORONOIREGION_H
19
20#include <agx/agx.h>
22#include <agx/debug.h>
23
24namespace agxCollide
25{
32 public:
34 enum Type {
35 VERTEX = 0,
37 FACE
38 };
39
44 TriangleVoronoiRegion( uint8_t voronoiIndex );
45
47 Type getType() const;
48
49 static Type calculateType(unsigned index);
50
55 uint8_t getVoronoiIndex() const;
56
68 static const uint8_t edgeFlags[4]; // last one for padding
69 static const uint8_t edgeFlaggedToStandard[8]; // last one for padding
70
71 private:
74
75 uint8_t m_voronoiIndex;
76 };
77
78
79 //implementation
80 inline TriangleVoronoiRegion::TriangleVoronoiRegion( uint8_t voronoiIndex ) : m_voronoiIndex(voronoiIndex)
81 {
82 agxAssert( voronoiIndex <= 6);
83 }
84
86 {
87 return (TriangleVoronoiRegion::Type( index / 3));
88 }
89
94
95
97 {
98 return m_voronoiIndex;
99 }
100
101}
102
103#endif
104
#define AGXPHYSICS_EXPORT
Class containing the Voronoi region of a triangle as an uint8_t.
static Type calculateType(unsigned index)
#define agxAssert(expr)
Definition debug.h:143
This namespace consists of a set of classes for handling geometric intersection tests including boole...