Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Etienne Schmitt
CGoGN
Commits
bfd7705b
Commit
bfd7705b
authored
Mar 28, 2013
by
Thomas Jund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifying antialiasing parameter (too high), and optimizing some geometry-inclusion function
parent
a92c7c23
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
17 deletions
+12
-17
include/Algo/Geometry/inclusion.hpp
include/Algo/Geometry/inclusion.hpp
+9
-14
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+0
-1
include/Geometry/plane_3d.hpp
include/Geometry/plane_3d.hpp
+2
-1
src/Utils/Qt/qtQGLV.cpp
src/Utils/Qt/qtQGLV.cpp
+1
-1
No files found.
include/Algo/Geometry/inclusion.hpp
View file @
bfd7705b
...
...
@@ -133,14 +133,13 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
bool
inside
=
true
;
std
::
list
<
Dart
>
visitedFaces
;
// Faces that are traversed
visitedFaces
.
push_back
(
d
);
// Start with the face of d
std
::
list
<
Dart
>::
iterator
face
;
VEC3
N
;
DartMarkerStore
mark
(
map
);
// Lock a marker
for
(
face
=
visitedFaces
.
begin
();
inside
&&
face
!=
visitedFaces
.
end
();
++
face
)
for
(
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
{
if
(
!
mark
.
isMarked
(
*
face
))
{
...
...
@@ -149,10 +148,10 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
if
(
CCW
)
{
if
(
o3d
==
Geom
::
OVER
)
inside
=
false
;
return
false
;
}
else
if
(
o3d
==
Geom
::
UNDER
)
inside
=
false
;
return
false
;
Dart
dNext
=
*
face
;
do
...
...
@@ -166,8 +165,7 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
}
}
//if the point is in the volume there is an odd number of intersection with all faces with any direction
return
inside
;
return
true
;
}
template
<
typename
PFP
>
...
...
@@ -176,8 +174,6 @@ bool isPointInConvexFace(typename PFP::MAP& map, Dart d, const VertexAttribute<t
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
typename
PFP
::
REAL
REAL
;
bool
inside
=
true
;
Geom
::
Plane3D
<
REAL
>
pl
=
Geometry
::
facePlane
<
PFP
>
(
map
,
d
,
position
);
Geom
::
Orientation3D
o3d
=
pl
.
orient
(
point
);
if
(
o3d
==
Geom
::
ON
)
...
...
@@ -193,12 +189,12 @@ bool isPointInConvexFace(typename PFP::MAP& map, Dart d, const VertexAttribute<t
if
(
CCW
)
{
if
(
o3d
==
Geom
::
UNDER
)
inside
=
false
;
return
false
;
}
else
if
(
o3d
==
Geom
::
OVER
)
inside
=
false
;
return
false
;
}
return
insid
e
;
return
tru
e
;
}
return
false
;
...
...
@@ -212,7 +208,6 @@ bool isPointInConvexFace2D(typename PFP::MAP& map, Dart d, const VertexAttribute
// CGoGNout << "point " << point << "d " << d << "faceDeg " << map.faceDegree(d) << CGoGNendl;
bool
convex
=
true
;
Geom
::
Orientation2D
o2d
;
Traversor2FV
<
typename
PFP
::
MAP
>
tfv
(
map
,
d
)
;
...
...
@@ -222,13 +217,13 @@ bool isPointInConvexFace2D(typename PFP::MAP& map, Dart d, const VertexAttribute
if
(
CCW
)
{
if
(
o2d
==
Geom
::
RIGHT
)
convex
=
false
;
return
false
;
}
else
if
(
o2d
==
Geom
::
LEFT
)
return
false
;
}
return
convex
;
return
true
;
}
template
<
typename
PFP
>
...
...
include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
View file @
bfd7705b
...
...
@@ -259,7 +259,6 @@ void ParticleCell2DAndHalf<PFP>::faceState(VEC3 goal)
assert
(
goal
.
isFinite
())
;
assert
(
this
->
getPosition
().
isFinite
())
;
// assert(Geometry::isPointInConvexFace2D<PFP>(m,d,m_positions,m_position,true));
//project goal within face plane
VEC3
n1
=
Geometry
::
faceNormal
<
PFP
>
(
m
,
d
,
m_positions
);
...
...
include/Geometry/plane_3d.hpp
View file @
bfd7705b
...
...
@@ -128,8 +128,9 @@ void Plane3D<T>::project(Vector<3,T>& p) const
template
<
typename
T
>
Orientation3D
Plane3D
<
T
>::
orient
(
const
Vector
<
3
,
T
>&
p
)
const
{
#define PRECISION 1e-
10
#define PRECISION 1e-
6
T
dist
=
distance
(
p
)
;
if
(
dist
<
-
PRECISION
)
return
UNDER
;
if
(
dist
>
PRECISION
)
...
...
src/Utils/Qt/qtQGLV.cpp
View file @
bfd7705b
...
...
@@ -112,7 +112,7 @@ SimpleQGLV::SimpleQGLV() :
m_qglWidget
->
setFocus
(
Qt
::
MouseFocusReason
);
QGLFormat
format
(
/*QGL::SampleBuffers |*/
QGL
::
DoubleBuffer
|
QGL
::
AlphaChannel
);
format
.
setSamples
(
16
);
format
.
setSamples
(
2
);
m_qglWidget
->
setFormat
(
format
);
m_qglWidget
->
makeCurrent
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment