AGX Dynamics
2.38.0.2
Loading...
Searching...
No Matches
TriangleVoronoiRegion.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
#ifndef AGXCOLLIDE_TRIANGLEVORONOIREGION_H
18
#define AGXCOLLIDE_TRIANGLEVORONOIREGION_H
19
20
#include <
agx/agx.h
>
21
#include <
agx/agxPhysics_export.h
>
22
#include <
agx/debug.h
>
23
24
namespace
agxCollide
25
{
31
class
AGXPHYSICS_EXPORT
TriangleVoronoiRegion
{
32
public
:
34
enum
Type
{
35
VERTEX = 0,
36
EDGE
,
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
:
73
TriangleVoronoiRegion
();
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
85
inline
TriangleVoronoiRegion::Type
TriangleVoronoiRegion::calculateType
(
unsigned
index)
86
{
87
return
(
TriangleVoronoiRegion::Type
( index / 3));
88
}
89
90
inline
TriangleVoronoiRegion::Type
TriangleVoronoiRegion::getType
()
const
91
{
92
return
TriangleVoronoiRegion::calculateType
(m_voronoiIndex);
93
}
94
95
96
inline
uint8_t
TriangleVoronoiRegion::getVoronoiIndex
()
const
97
{
98
return
m_voronoiIndex;
99
}
100
101
}
102
103
#endif
104
agxPhysics_export.h
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx.h
agxCollide::TriangleVoronoiRegion
Class containing the Voronoi region of a triangle as an uint8_t.
Definition
TriangleVoronoiRegion.h:31
agxCollide::TriangleVoronoiRegion::getType
Type getType() const
Definition
TriangleVoronoiRegion.h:90
agxCollide::TriangleVoronoiRegion::getVoronoiIndex
uint8_t getVoronoiIndex() const
Definition
TriangleVoronoiRegion.h:96
agxCollide::TriangleVoronoiRegion::Type
Type
The type of Voronoi region.
Definition
TriangleVoronoiRegion.h:34
agxCollide::TriangleVoronoiRegion::EDGE
@ EDGE
Definition
TriangleVoronoiRegion.h:36
agxCollide::TriangleVoronoiRegion::calculateType
static Type calculateType(unsigned index)
Definition
TriangleVoronoiRegion.h:85
debug.h
agxAssert
#define agxAssert(expr)
Definition
debug.h:143
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition
ContactForceFilterParticipant.h:23
include
agxCollide
TriangleVoronoiRegion.h
Generated on Sun Sep 1 2024 11:24:41 for AGX Dynamics by
1.9.8