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
aaeee384
Commit
aaeee384
authored
Apr 06, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
algo geom
parent
e7e2e4e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
110 additions
and
0 deletions
+110
-0
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
+110
-0
No files found.
Apps/Examples/Tests/Algo_Geom_inclusion.cpp
0 → 100644
View file @
aaeee384
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: https://iggservis.u-strasbg.fr/CGoGN/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include <iostream>
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include <Algo/Geometry/inclusion.h>
#include "Geometry/vector_gen.h"
using
namespace
CGoGN
;
struct
PFP
:
public
PFP_STANDARD
{
// definition of the type of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
};
int
main
()
{
std
::
cout
<<
"Check Algo/Geometry/inclusion.h"
<<
std
::
endl
;
std
::
cout
<<
"Check Status : PARTIAL"
<<
std
::
endl
;
PFP
::
MAP
map
;
AttributeHandler
<
PFP
::
VEC3
>
position
=
map
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
"position"
);
map
.
newFace
(
3
);
PFP
::
VEC3
ta
(
0
,
0
,
0
);
PFP
::
VEC3
tb
(
5
,
0
,
0
);
PFP
::
VEC3
tc
(
0
,
5
,
0
);
Dart
d
=
map
.
begin
();
position
[
d
]
=
ta
;
position
[
map
.
phi1
(
d
)]
=
tb
;
position
[
map
.
phi1
(
map
.
phi1
(
d
))]
=
tc
;
PFP
::
VEC3
pIn1
(
1
,
1
,
0
);
PFP
::
VEC3
pIn2
(
2
,
0
,
0
);
PFP
::
VEC3
pOut
(
6
,
0
,
0
);
std
::
cout
<<
"Check isPointInConvexFace2D : Start"
<<
std
::
endl
;
if
(
!
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
pIn1
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : face inclusion"
<<
std
::
endl
;
if
(
!
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
pIn2
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : face inclusion"
<<
std
::
endl
;
if
(
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
pOut
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : face inclusion"
<<
std
::
endl
;
if
(
!
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
ta
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : vertex inclusion"
<<
std
::
endl
;
if
(
!
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
tb
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : vertex inclusion"
<<
std
::
endl
;
if
(
!
Algo
::
Geometry
::
isPointInConvexFace2D
<
PFP
>
(
map
,
d
,
position
,
tc
))
std
::
cout
<<
"ERROR : isPointInConvexFace2D : vertex inclusion"
<<
std
::
endl
;
std
::
cout
<<
"Check isPointInConvexFace2D : Done"
<<
std
::
endl
;
// template <typename PFP>
// bool isConvex(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, bool CCW);
// template <typename PFP>
// bool isPointInVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point);
// template <typename PFP>
// bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point, bool CCW);
// template <typename PFP>
// bool isPointInConvexFace(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point, bool CCW);
// template <typename PFP>
// bool isPointOnEdge(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point);
// template <typename PFP>
// bool isPointOnHalfEdge(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point);
// template <typename PFP>
// bool isPointOnVertex(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3& point);
// template <typename PFP>
// bool isConvexFaceInOrIntersectingTetrahedron(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& positions, const typename PFP::VEC3 points[4], bool CCW);
return
0
;
}
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