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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
04c40b6c
Commit
04c40b6c
authored
May 26, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mac compilation pass on test
parent
e9606c65
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
22 additions
and
22 deletions
+22
-22
Apps/Tests/Algo/Geometry/feature.cpp
Apps/Tests/Algo/Geometry/feature.cpp
+2
-3
Apps/Tests/Geometry/inclusion.cpp
Apps/Tests/Geometry/inclusion.cpp
+2
-2
CGoGN/include/Algo/Geometry/feature.h
CGoGN/include/Algo/Geometry/feature.h
+1
-1
CGoGN/include/Algo/Geometry/feature.hpp
CGoGN/include/Algo/Geometry/feature.hpp
+3
-3
CGoGN/include/Algo/Geometry/inclusion.hpp
CGoGN/include/Algo/Geometry/inclusion.hpp
+1
-1
CGoGN/include/Algo/Geometry/normal.hpp
CGoGN/include/Algo/Geometry/normal.hpp
+1
-1
CGoGN/include/Algo/Modelisation/subdivision.hpp
CGoGN/include/Algo/Modelisation/subdivision.hpp
+2
-2
CGoGN/include/Algo/Modelisation/subdivision3.hpp
CGoGN/include/Algo/Modelisation/subdivision3.hpp
+1
-1
CGoGN/include/Algo/Selection/collector.hpp
CGoGN/include/Algo/Selection/collector.hpp
+1
-1
CGoGN/include/Geometry/bounding_box.hpp
CGoGN/include/Geometry/bounding_box.hpp
+1
-1
CGoGN/include/Geometry/distances.hpp
CGoGN/include/Geometry/distances.hpp
+1
-1
CGoGN/include/Geometry/inclusion.h
CGoGN/include/Geometry/inclusion.h
+1
-1
CGoGN/include/Geometry/intersection.hpp
CGoGN/include/Geometry/intersection.hpp
+3
-3
CGoGN/include/Geometry/tensor.hpp
CGoGN/include/Geometry/tensor.hpp
+1
-0
CGoGN/include/Utils/qem.h
CGoGN/include/Utils/qem.h
+1
-1
No files found.
Apps/Tests/Algo/Geometry/feature.cpp
View file @
04c40b6c
...
...
@@ -76,11 +76,11 @@ template void Algo::Surface::Geometry::computeRidgeLines<PFP1>(
const
VertexAttribute
<
PFP1
::
REAL
,
PFP1
::
MAP
>&
k2
,
FaceAttribute
<
ridgeSegment
,
PFP1
::
MAP
>&
ridge_segments
)
;
template
void
Algo
::
Surface
::
Geometry
::
ridgeLines
<
PFP1
>(
PFP1
::
MAP
&
map
,
Dart
d
,
const
VertexAttribute
<
PFP1
::
VEC3
,
PFP1
::
MAP
>&
position
,
const
FaceAttribute
<
PFP1
::
VEC3
,
PFP1
::
MAP
>&
face_area
,
const
VertexAttribute
<
PFP1
::
VEC3
,
PFP1
::
MAP
>&
K
,
const
VertexAttribute
<
PFP1
::
VEC3
,
PFP1
::
MAP
>&
vertex_gradient
,
const
VertexAttribute
<
PFP1
::
REAL
,
PFP1
::
MAP
>&
k
,
...
...
@@ -174,7 +174,6 @@ template void Algo::Surface::Geometry::ridgeLines<PFP2>(
PFP2
::
MAP
&
map
,
Dart
d
,
const
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
position
,
const
FaceAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
face_area
,
const
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
K
,
const
VertexAttribute
<
PFP2
::
VEC3
,
PFP2
::
MAP
>&
vertex_gradient
,
const
VertexAttribute
<
PFP2
::
REAL
,
PFP2
::
MAP
>&
k
,
...
...
@@ -207,4 +206,4 @@ template std::vector<PFP2::VEC3> Algo::Surface::Geometry::occludingContoursDetec
int
test_feature
()
{
return
0
;
}
\ No newline at end of file
}
Apps/Tests/Geometry/inclusion.cpp
View file @
04c40b6c
...
...
@@ -9,14 +9,14 @@ using namespace CGoGN;
template
Geom
::
Inclusion
Geom
::
isPointInTriangle
(
const
Geom
::
Vec3f
&
point
,
const
Geom
::
Vec3f
&
Ta
,
const
Geom
::
Vec3f
&
Tb
,
const
Geom
::
Vec3f
&
Tc
);
template
bool
Geom
::
isPointInSphere
(
const
Geom
::
Vec3f
&
point
,
const
Geom
::
Vec3f
&
center
,
const
float
&
radius
);
template
Geom
::
Inclusion
Geom
::
isSegmentInTriangle
(
const
Geom
::
Vec3f
&
P1
,
const
Geom
::
Vec3f
&
P2
,
const
Geom
::
Vec3f
&
Ta
,
const
Geom
::
Vec3f
&
Tb
,
const
Geom
::
Vec3f
&
Tc
,
const
Geom
::
Vec3f
&
N
);
template
Geom
::
Inclusion
Geom
::
isSegmentInTriangle
2D
(
const
Geom
::
Vec3f
&
P1
,
const
Geom
::
Vec3f
&
P2
,
const
Geom
::
Vec3f
&
Ta
,
const
Geom
::
Vec3f
&
Tb
,
const
Geom
::
Vec3f
&
Tc
,
const
Geom
::
Vec3f
&
N
);
template
bool
Geom
::
isPointInTetrahedron
(
Geom
::
Vec3f
points
[
4
],
Geom
::
Vec3f
&
point
,
bool
);
template
bool
Geom
::
isEdgeInOrIntersectingTetrahedron
(
Geom
::
Vec3f
points
[
4
],
Geom
::
Vec3f
&
point1
,
Geom
::
Vec3f
&
point2
,
bool
CCW
);
template
bool
Geom
::
arePointsEquals
(
const
Geom
::
Vec3f
&
point1
,
const
Geom
::
Vec3f
&
point2
);
template
Geom
::
Inclusion
Geom
::
isPointInTriangle
(
const
Geom
::
Vec3d
&
point
,
const
Geom
::
Vec3d
&
Ta
,
const
Geom
::
Vec3d
&
Tb
,
const
Geom
::
Vec3d
&
Tc
);
template
bool
Geom
::
isPointInSphere
(
const
Geom
::
Vec3d
&
point
,
const
Geom
::
Vec3d
&
center
,
const
double
&
radius
);
template
Geom
::
Inclusion
Geom
::
isSegmentInTriangle
(
const
Geom
::
Vec3d
&
P1
,
const
Geom
::
Vec3d
&
P2
,
const
Geom
::
Vec3d
&
Ta
,
const
Geom
::
Vec3d
&
Tb
,
const
Geom
::
Vec3d
&
Tc
,
const
Geom
::
Vec3d
&
N
);
template
Geom
::
Inclusion
Geom
::
isSegmentInTriangle
2D
(
const
Geom
::
Vec3d
&
P1
,
const
Geom
::
Vec3d
&
P2
,
const
Geom
::
Vec3d
&
Ta
,
const
Geom
::
Vec3d
&
Tb
,
const
Geom
::
Vec3d
&
Tc
,
const
Geom
::
Vec3d
&
N
);
template
bool
Geom
::
isPointInTetrahedron
(
Geom
::
Vec3d
points
[
4
],
Geom
::
Vec3d
&
point
,
bool
);
template
bool
Geom
::
isEdgeInOrIntersectingTetrahedron
(
Geom
::
Vec3d
points
[
4
],
Geom
::
Vec3d
&
point1
,
Geom
::
Vec3d
&
point2
,
bool
CCW
);
template
bool
Geom
::
arePointsEquals
(
const
Geom
::
Vec3d
&
point1
,
const
Geom
::
Vec3d
&
point2
);
...
...
CGoGN/include/Algo/Geometry/feature.h
View file @
04c40b6c
...
...
@@ -128,7 +128,7 @@ void ridgeLines(
typename
PFP
::
MAP
&
map
,
Dart
d
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
FaceAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
face_area
,
//
const FaceAttribute<typename PFP::VEC3, typename PFP::MAP>& face_area,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
K
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
vertex_gradient
,
const
VertexAttribute
<
typename
PFP
::
REAL
,
typename
PFP
::
MAP
>&
k
,
...
...
CGoGN/include/Algo/Geometry/feature.hpp
View file @
04c40b6c
...
...
@@ -41,7 +41,7 @@ namespace Geometry
template
<
typename
PFP
>
void
featureEdgeDetection
(
typename
PFP
::
MAP
&
map
,
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
const
VertexAttribute
<
typename
PFP
::
VEC3
,
typename
PFP
::
MAP
>&
position
,
CellMarker
<
typename
PFP
::
MAP
,
EDGE
>&
featureEdge
)
{
typedef
typename
PFP
::
MAP
MAP
;
...
...
@@ -50,9 +50,9 @@ void featureEdgeDetection(
featureEdge
.
unmarkAll
()
;
FaceAttribute
<
VEC3
,
MAP
>
fNormal
=
map
.
template
getAttribute
<
VEC3
,
FACE
>(
"normal"
)
;
FaceAttribute
<
VEC3
,
MAP
>
fNormal
=
map
.
template
getAttribute
<
VEC3
,
FACE
,
typename
PFP
::
MAP
>(
"normal"
)
;
if
(
!
fNormal
.
isValid
())
fNormal
=
map
.
template
addAttribute
<
VEC3
,
FACE
>(
"normal"
)
;
fNormal
=
map
.
template
addAttribute
<
VEC3
,
FACE
,
typename
PFP
::
MAP
>(
"normal"
)
;
Algo
::
Surface
::
Geometry
::
computeNormalFaces
<
PFP
>
(
map
,
position
,
fNormal
)
;
TraversorE
<
MAP
>
t
(
map
)
;
...
...
CGoGN/include/Algo/Geometry/inclusion.hpp
View file @
04c40b6c
...
...
@@ -56,7 +56,7 @@ bool isConvex(typename PFP::MAP& map, Vol v, const VertexAttribute<typename PFP:
Dart
e
=
*
it
;
if
(
!
m
.
isMarked
(
e
))
{
m
.
markOrbit
<
EDGE
>
(
e
)
;
m
.
template
markOrbit
<
EDGE
>(
e
)
;
convex
=
isTetrahedronWellOriented
<
PFP
>
(
map
,
e
,
position
,
CCW
)
;
}
}
...
...
CGoGN/include/Algo/Geometry/normal.hpp
View file @
04c40b6c
...
...
@@ -136,7 +136,7 @@ typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Vertex v, c
for
(
std
::
vector
<
Dart
>::
iterator
it
=
faces
.
begin
()
;
it
!=
faces
.
end
()
;
++
it
)
{
// if(!f.isMarked(*it) && map.isBoundaryIncidentFace(*it))
if
(
!
f
.
isMarked
(
*
it
)
&&
(
map
.
isBoundaryMarked
<
3
>
(
map
.
phi3
(
*
it
))))
if
(
!
f
.
isMarked
(
*
it
)
&&
(
map
.
template
isBoundaryMarked
<
3
>(
map
.
phi3
(
*
it
))))
{
f
.
mark
(
*
it
);
VEC3
n
=
faceNormal
<
PFP
>
(
map
,
*
it
,
position
);
...
...
CGoGN/include/Algo/Modelisation/subdivision.hpp
View file @
04c40b6c
...
...
@@ -801,8 +801,8 @@ void TwoNPlusOneSubdivision(typename PFP::MAP& map, EMBV& attributs, float size)
map
.
cutEdge
(
map
.
phi1
(
dd
));
mCorner
.
mark
(
map
.
phi2
(
map
.
phi1
(
dd
)));
// attributs[map.template phi<11>(dd)] = c*(1.0-size)+ attributs[dd]*size;
attributs
[
map
.
template
phi
<
11
>(
dd
)]
=
attributs
[
dd
]
+
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
dd
,
attributs
)
-
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
map
.
phi_1
(
dd
),
attributs
);
attributs
[
map
.
template
phi
<
11
>(
dd
)]
=
attributs
[
dd
]
+
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
dd
,
attributs
)
-
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
map
.
phi_1
(
dd
),
attributs
);
dd
=
map
.
phi1
(
map
.
phi1
(
map
.
phi1
(
map
.
phi2
(
map
.
phi1
(
dd
)))));
}
while
(
!
mCorner
.
isMarked
(
dd
));
}
...
...
CGoGN/include/Algo/Modelisation/subdivision3.hpp
View file @
04c40b6c
...
...
@@ -142,7 +142,7 @@ Dart sliceConvexVolume(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC
else
{
VEC3
interP
;
VEC3
vec
(
Surface
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
dd
,
position
));
VEC3
vec
(
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
dd
,
position
));
Geom
::
Intersection
inter
=
Geom
::
intersectionLinePlane
<
VEC3
,
typename
Geom
::
Plane3D
<
REAL
>
>
(
position
[
dd
],
vec
,
pl
,
interP
);
if
(
inter
==
Geom
::
FACE_INTERSECTION
)
...
...
CGoGN/include/Algo/Selection/collector.hpp
View file @
04c40b6c
...
...
@@ -1257,7 +1257,7 @@ void Collector_Dijkstra<PFP>::collectBorder(Dart dinit)
template
<
typename
PFP
>
inline
float
Collector_Dijkstra
<
PFP
>::
edgeLength
(
Dart
d
)
{
typename PFP::VEC3 v = Geometry::vectorOutOfDart<PFP>(this->map, d, this->position);
typename
PFP
::
VEC3
v
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
this
->
map
,
d
,
this
->
position
);
return
v
.
norm
();
}
...
...
CGoGN/include/Geometry/bounding_box.hpp
View file @
04c40b6c
...
...
@@ -118,7 +118,7 @@ template <typename VEC>
typename
VEC
::
DATA_TYPE
BoundingBox
<
VEC
>::
diagSize
()
const
{
assert
(
m_initialized
||
!
"Bounding box not initialized"
);
return
VEC
::
DATA_TYPE
((
m_pMax
-
m_pMin
).
norm
());
return
typename
VEC
::
DATA_TYPE
((
m_pMax
-
m_pMin
).
norm
());
}
template
<
typename
VEC
>
...
...
CGoGN/include/Geometry/distances.hpp
View file @
04c40b6c
...
...
@@ -269,7 +269,7 @@ template <typename VEC3>
bool
lineLineClosestPoints
(
const
VEC3
&
P1
,
const
VEC3
&
V1
,
const
VEC3
&
P2
,
const
VEC3
&
V2
,
VEC3
&
Q1
,
VEC3
&
Q2
)
{
typedef
typename
VEC3
::
DATA_TYPE
SCAL
;
typename
VEC3
P12
=
P1
-
P2
;
VEC3
P12
=
P1
-
P2
;
SCAL
d1343
=
P12
*
V2
;
SCAL
d4321
=
V2
*
V1
;
...
...
CGoGN/include/Geometry/inclusion.h
View file @
04c40b6c
...
...
@@ -67,7 +67,7 @@ bool isPointInSphere(const VEC3& point, const VEC3& center, const typename VEC3:
* @param N the normal of the triangle
*/
template
<
typename
VEC3
>
Inclusion
isSegmentInTriangle
(
const
VEC3
&
P1
,
const
VEC3
&
P2
,
const
VEC3
&
Ta
,
const
VEC3
&
Tb
,
const
VEC3
&
Tc
,
const
VEC3
&
N
)
;
Inclusion
isSegmentInTriangle
2D
(
const
VEC3
&
P1
,
const
VEC3
&
P2
,
const
VEC3
&
Ta
,
const
VEC3
&
Tb
,
const
VEC3
&
Tc
,
const
VEC3
&
N
)
;
/**
* test if a point is inside a tetrahedron
...
...
CGoGN/include/Geometry/intersection.hpp
View file @
04c40b6c
...
...
@@ -522,19 +522,19 @@ Intersection intersectionSegmentPlan(const VEC3& PA, const VEC3& PB, const VEC3&
typename
VEC3
::
DATA_TYPE
panp
=
NormP
*
(
PA
-
PlaneP
);
typename
VEC3
::
DATA_TYPE
pbnp
=
NormP
*
(
PB
-
PlaneP
);
if
(
abs
(
panp
)
<
EPSILON
)
if
(
f
abs
(
panp
)
<
EPSILON
)
{
Inter
=
PA
;
return
VERTEX_INTERSECTION
;
}
else
if
(
abs
(
pbnp
)
<
EPSILON
)
else
if
(
f
abs
(
pbnp
)
<
EPSILON
)
{
Inter
=
PB
;
return
VERTEX_INTERSECTION
;
}
else
if
(
panp
*
pbnp
<
0
)
{
Inter
=
(
abs
(
panp
)
*
PB
+
abs
(
pbnp
)
*
PA
)
/
(
abs
(
panp
)
+
abs
(
pbnp
))
;
Inter
=
(
fabs
(
panp
)
*
PB
+
fabs
(
pbnp
)
*
PA
)
/
(
fabs
(
panp
)
+
f
abs
(
pbnp
))
;
return
EDGE_INTERSECTION
;
}
else
...
...
CGoGN/include/Geometry/tensor.hpp
View file @
04c40b6c
...
...
@@ -23,6 +23,7 @@
*******************************************************************************/
#include <algorithm>
#include <cmath>
#include <cassert>
namespace
CGoGN
{
...
...
CGoGN/include/Utils/qem.h
View file @
04c40b6c
...
...
@@ -532,7 +532,7 @@ public:
*
* \return the stream reference
*/
friend
std
::
istream
&
operator
>>
(
std
::
istream
&
in
,
QuadricHF
<
REAL
>&
q
)
friend
std
::
istream
&
operator
>>
(
std
::
istream
&
in
,
QuadricHF
<
REAL
>&
/*q*/
)
{
// TODO
// in >> q.A ;
...
...
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