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
4b50f19b
Commit
4b50f19b
authored
Jun 02, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing templates...
parent
6018ea78
Changes
53
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1075 additions
and
3429 deletions
+1075
-3429
Apps/Tests/Algo/CMakeLists.txt
Apps/Tests/Algo/CMakeLists.txt
+3
-3
Apps/Tests/Algo/LinearSolving/CMakeLists.txt
Apps/Tests/Algo/LinearSolving/CMakeLists.txt
+12
-0
Apps/Tests/Algo/LinearSolving/algo_linearSolving.cpp
Apps/Tests/Algo/LinearSolving/algo_linearSolving.cpp
+11
-0
Apps/Tests/Algo/LinearSolving/basic.cpp
Apps/Tests/Algo/LinearSolving/basic.cpp
+176
-412
Apps/Tests/Algo/MovingObjects/CMakeLists.txt
Apps/Tests/Algo/MovingObjects/CMakeLists.txt
+16
-0
Apps/Tests/Algo/MovingObjects/algo_movingObjects.cpp
Apps/Tests/Algo/MovingObjects/algo_movingObjects.cpp
+20
-0
Apps/Tests/Algo/MovingObjects/particle_base.cpp
Apps/Tests/Algo/MovingObjects/particle_base.cpp
+0
-87
Apps/Tests/Algo/MovingObjects/particle_cell_2D.cpp
Apps/Tests/Algo/MovingObjects/particle_cell_2D.cpp
+25
-114
Apps/Tests/Algo/MovingObjects/particle_cell_2D_memo.cpp
Apps/Tests/Algo/MovingObjects/particle_cell_2D_memo.cpp
+25
-58
Apps/Tests/Algo/MovingObjects/particle_cell_2D_secured.cpp
Apps/Tests/Algo/MovingObjects/particle_cell_2D_secured.cpp
+25
-59
Apps/Tests/Algo/MovingObjects/particle_cell_2DandHalf.cpp
Apps/Tests/Algo/MovingObjects/particle_cell_2DandHalf.cpp
+24
-108
Apps/Tests/Algo/MovingObjects/particle_cell_2DandHalf_memo.cpp
...Tests/Algo/MovingObjects/particle_cell_2DandHalf_memo.cpp
+25
-52
Apps/Tests/Algo/MovingObjects/particle_cell_3D.cpp
Apps/Tests/Algo/MovingObjects/particle_cell_3D.cpp
+20
-118
Apps/Tests/Algo/Render/CMakeLists.txt
Apps/Tests/Algo/Render/CMakeLists.txt
+23
-0
Apps/Tests/Algo/Render/GL2/colorPerEdgeRender.cpp
Apps/Tests/Algo/Render/GL2/colorPerEdgeRender.cpp
+21
-76
Apps/Tests/Algo/Render/GL2/colorPerFaceRender.cpp
Apps/Tests/Algo/Render/GL2/colorPerFaceRender.cpp
+88
-94
Apps/Tests/Algo/Render/GL2/dataPerFaceRender.cpp
Apps/Tests/Algo/Render/GL2/dataPerFaceRender.cpp
+47
-80
Apps/Tests/Algo/Render/GL2/drawerCells.cpp
Apps/Tests/Algo/Render/GL2/drawerCells.cpp
+96
-197
Apps/Tests/Algo/Render/GL2/explodeVolumeRender.cpp
Apps/Tests/Algo/Render/GL2/explodeVolumeRender.cpp
+25
-223
Apps/Tests/Algo/Render/GL2/mapRender.cpp
Apps/Tests/Algo/Render/GL2/mapRender.cpp
+29
-248
Apps/Tests/Algo/Render/GL2/topo3PrimalRender.cpp
Apps/Tests/Algo/Render/GL2/topo3PrimalRender.cpp
+17
-302
Apps/Tests/Algo/Render/GL2/topo3Render.cpp
Apps/Tests/Algo/Render/GL2/topo3Render.cpp
+24
-346
Apps/Tests/Algo/Render/GL2/topoPrimalRender.cpp
Apps/Tests/Algo/Render/GL2/topoPrimalRender.cpp
+15
-278
Apps/Tests/Algo/Render/GL2/topoRender.cpp
Apps/Tests/Algo/Render/GL2/topoRender.cpp
+72
-375
Apps/Tests/Algo/Render/SVG/mapSVGRender.cpp
Apps/Tests/Algo/Render/SVG/mapSVGRender.cpp
+58
-69
Apps/Tests/Algo/Render/algo_render.cpp
Apps/Tests/Algo/Render/algo_render.cpp
+29
-0
CGoGN/include/Algo/LinearSolving/basic.h
CGoGN/include/Algo/LinearSolving/basic.h
+8
-2
CGoGN/include/Algo/MovingObjects/particle_cell_2D.h
CGoGN/include/Algo/MovingObjects/particle_cell_2D.h
+3
-2
CGoGN/include/Algo/MovingObjects/particle_cell_2D.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_2D.hpp
+5
-4
CGoGN/include/Algo/MovingObjects/particle_cell_2D_memo.h
CGoGN/include/Algo/MovingObjects/particle_cell_2D_memo.h
+4
-4
CGoGN/include/Algo/MovingObjects/particle_cell_2D_memo.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_2D_memo.hpp
+2
-2
CGoGN/include/Algo/MovingObjects/particle_cell_2D_secured.h
CGoGN/include/Algo/MovingObjects/particle_cell_2D_secured.h
+7
-7
CGoGN/include/Algo/MovingObjects/particle_cell_2D_secured.hpp
...N/include/Algo/MovingObjects/particle_cell_2D_secured.hpp
+1
-1
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.h
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.h
+7
-6
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf.hpp
+3
-3
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf_memo.h
...include/Algo/MovingObjects/particle_cell_2DandHalf_memo.h
+2
-2
CGoGN/include/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
...clude/Algo/MovingObjects/particle_cell_2DandHalf_memo.hpp
+3
-3
CGoGN/include/Algo/MovingObjects/particle_cell_3D.h
CGoGN/include/Algo/MovingObjects/particle_cell_3D.h
+3
-2
CGoGN/include/Algo/MovingObjects/particle_cell_3D.hpp
CGoGN/include/Algo/MovingObjects/particle_cell_3D.hpp
+2
-2
CGoGN/include/Algo/ProgressiveMesh/pmesh.hpp
CGoGN/include/Algo/ProgressiveMesh/pmesh.hpp
+51
-48
CGoGN/include/Algo/Render/GL2/colorPerEdgeRender.h
CGoGN/include/Algo/Render/GL2/colorPerEdgeRender.h
+1
-1
CGoGN/include/Algo/Render/GL2/colorPerEdgeRender.hpp
CGoGN/include/Algo/Render/GL2/colorPerEdgeRender.hpp
+5
-5
CGoGN/include/Algo/Render/GL2/colorPerFaceRender.hpp
CGoGN/include/Algo/Render/GL2/colorPerFaceRender.hpp
+7
-7
CGoGN/include/Algo/Render/GL2/dataPerFaceRender.hpp
CGoGN/include/Algo/Render/GL2/dataPerFaceRender.hpp
+3
-3
CGoGN/include/Algo/Render/GL2/drawerCells.hpp
CGoGN/include/Algo/Render/GL2/drawerCells.hpp
+2
-0
CGoGN/include/Algo/Render/GL2/explodeVolumeRender.hpp
CGoGN/include/Algo/Render/GL2/explodeVolumeRender.hpp
+16
-14
CGoGN/include/Algo/Render/GL2/mapRender.h
CGoGN/include/Algo/Render/GL2/mapRender.h
+1
-0
CGoGN/include/Algo/Render/GL2/mapRender.hpp
CGoGN/include/Algo/Render/GL2/mapRender.hpp
+5
-4
CGoGN/include/Algo/Render/GL2/topo3PrimalRender.hpp
CGoGN/include/Algo/Render/GL2/topo3PrimalRender.hpp
+1
-1
CGoGN/include/Algo/Render/GL2/topoPrimalRender.h
CGoGN/include/Algo/Render/GL2/topoPrimalRender.h
+1
-1
CGoGN/include/Algo/Render/GL2/topoPrimalRender.hpp
CGoGN/include/Algo/Render/GL2/topoPrimalRender.hpp
+4
-4
CGoGN/include/Topology/generic/traversor/traversor3.h
CGoGN/include/Topology/generic/traversor/traversor3.h
+1
-1
CGoGN/include/Topology/map/map2.hpp
CGoGN/include/Topology/map/map2.hpp
+1
-1
No files found.
Apps/Tests/Algo/CMakeLists.txt
View file @
4b50f19b
...
...
@@ -10,14 +10,14 @@ add_subdirectory(Geometry)
#add_subdirectory(Histogram)
#add_subdirectory(ImplicitHierarchicalMesh)
add_subdirectory
(
Import
)
#
add_subdirectory(LinearSolving)
add_subdirectory
(
LinearSolving
)
add_subdirectory
(
MC
)
add_subdirectory
(
Modelisation
)
#
add_subdirectory(MovingObjects)
add_subdirectory
(
MovingObjects
)
#add_subdirectory(Multiresolution)
add_subdirectory
(
ProgressiveMesh
)
add_subdirectory
(
Remeshing
)
#
add_subdirectory(Render)
add_subdirectory
(
Render
)
add_subdirectory
(
Selection
)
add_subdirectory
(
Simulation
)
add_subdirectory
(
Tiling
)
...
...
Apps/Tests/Algo/LinearSolving/CMakeLists.txt
0 → 100644
View file @
4b50f19b
cmake_minimum_required
(
VERSION 2.6
)
project
(
testing_algo_linearSolving
)
add_executable
(
test_algo_linearSolving
algo_linearSolving.cpp
basic.cpp
)
target_link_libraries
(
test_algo_linearSolving
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
Apps/Tests/Algo/LinearSolving/algo_linearSolving.cpp
0 → 100644
View file @
4b50f19b
#include <iostream>
extern
int
test_basic
();
int
main
()
{
test_basic
();
return
0
;
}
Apps/Tests/Algo/LinearSolving/basic.cpp
View file @
4b50f19b
This diff is collapsed.
Click to expand it.
Apps/Tests/Algo/MovingObjects/CMakeLists.txt
0 → 100644
View file @
4b50f19b
cmake_minimum_required
(
VERSION 2.6
)
project
(
testing_algo_movingObjects
)
add_executable
(
test_algo_movingObjects
algo_movingObjects.cpp
particle_cell_2D.cpp
particle_cell_2D_memo.cpp
particle_cell_2D_secured.cpp
particle_cell_2DandHalf.cpp
particle_cell_2DandHalf_memo.cpp
particle_cell_3D.cpp
)
target_link_libraries
(
test_algo_movingObjects
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
Apps/Tests/Algo/MovingObjects/algo_movingObjects.cpp
0 → 100644
View file @
4b50f19b
#include <iostream>
extern
int
test_particle_cell_2D
();
extern
int
test_particle_cell_2D_memo
();
extern
int
test_particle_cell_2D_secured
();
extern
int
test_particle_cell_2DandHalf
();
extern
int
test_particle_cell_2DandHalf_memo
();
extern
int
test_particle_cell_3D
();
int
main
()
{
test_particle_cell_2D
();
test_particle_cell_2D_memo
();
test_particle_cell_2D_secured
();
test_particle_cell_2DandHalf
();
test_particle_cell_2DandHalf_memo
();
test_particle_cell_3D
();
return
0
;
}
Apps/Tests/Algo/MovingObjects/particle_base.cpp
deleted
100644 → 0
View file @
6018ea78
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, 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: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef PARTBASE_H
#define PARTBASE_H
//#include "Geometry/vector_gen.h"
namespace
CGoGN
{
namespace
Algo
{
namespace
MovingObjects
{
/* A particle base defines a position with a displacement function */
template
<
typename
PFP
>
class
ParticleBase
{
protected:
typename
PFP
::
VEC3
m_position
;
unsigned
int
m_state
;
public:
ParticleBase
(
const
typename
PFP
::
VEC3
&
position
)
:
m_position
(
position
),
m_state
(
FACE
)
{
}
virtual
~
ParticleBase
()
{
}
void
setState
(
unsigned
int
state
)
{
m_state
=
state
;
}
unsigned
int
getState
()
{
return
m_state
;
}
bool
move
(
const
typename
PFP
::
VEC3
&
position
)
{
m_position
=
position
;
return
true
;
}
const
typename
PFP
::
VEC3
&
getPosition
()
const
{
return
m_position
;
}
}
;
}
// namespace MovingObjects
}
// namespace Algo
}
// namespace CGoGN
#endif
Apps/Tests/Algo/MovingObjects/particle_cell_2D.cpp
View file @
4b50f19b
#ifndef PARTCELL_H
#define PARTCELL_H
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap3.h"
#include "Topology/gmap/embeddedGMap2.h"
#include "Algo/MovingObjects/particle_base.h"
#include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h"
#include "Algo/Geometry/orientation.h"
/* A particle cell is a particle base within a map, within a precise cell,
* the displacement function should indicate after each displacement
* wherein lies the new position of the particle
*/
#include "Algo/MovingObjects/particle_cell_2D.h"
namespace
CGoGN
{
using
namespace
CGoGN
;
namespace
Algo
struct
PFP1
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
namespace
Surface
{
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2D
<
PFP1
>;
namespace
MovingObjects
{
#ifndef PARTCELL25D_H
enum
struct
PFP2
:
public
PFP_DOUBLE
{
NO_CROSS
,
CROSS_EDGE
,
CROSS_OTHER
}
;
#endif
template
<
typename
PFP
>
class
ParticleCell2D
:
public
Algo
::
MovingObjects
::
ParticleBase
<
PFP
>
{
public:
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
VertexAttribute
<
VEC3
,
MAP
>
TAB_POS
;
MAP
&
m
;
const
TAB_POS
&
positionAttribut
;
Dart
d
;
Dart
lastCrossed
;
unsigned
int
crossCell
;
ParticleCell2D
(
MAP
&
map
,
Dart
belonging_cell
,
const
VEC3
&
pos
,
const
TAB_POS
&
tabPos
)
:
Algo
::
MovingObjects
::
ParticleBase
<
PFP
>
(
pos
),
m
(
map
),
positionAttribut
(
tabPos
),
d
(
belonging_cell
),
lastCrossed
(
belonging_cell
),
crossCell
(
NO_CROSS
)
{
}
~
ParticleCell2D
()
{
}
Dart
getCell
()
{
return
d
;
}
Geom
::
Orientation2D
getOrientationEdge
(
const
VEC3
&
point
,
Dart
d
)
;
typedef
EmbeddedMap2
MAP
;
};
void
display
()
;
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2D
<
PFP2
>
;
// template <unsigned int DD, typename TT>
// friend std::istream& operator>> (std::istream& in, Vector<DD,TT>& v) ;
VEC3
pointInFace
(
Dart
d
)
;
//
//struct PFP3 : public PFP_DOUBLE
//{
// typedef EmbeddedGMap2 MAP;
//};
//
//template class Algo::Surface::MovingObjects::ParticleCell2D<PFP3>;
VEC3
intersectLineEdge
(
const
VEC3
&
pA
,
const
VEC3
&
pB
,
Dart
d
)
;
Geom
::
Orientation2D
getOrientationFace
(
VEC3
sourcePoint
,
Dart
d
)
;
virtual
void
vertexState
(
const
VEC3
&
current
)
;
virtual
void
edgeState
(
const
VEC3
&
current
,
Geom
::
Orientation2D
sideOfEdge
=
Geom
::
ALIGNED
)
;
//just an orientation test : check which dart is aimed to leave the current face to reach an other position
Dart
faceOrientationState
(
const
VEC3
&
toward
)
;
virtual
void
faceState
(
const
VEC3
&
current
)
;
void
move
(
const
VEC3
&
goal
)
{
crossCell
=
NO_CROSS
;
if
(
!
Geom
::
arePointsEquals
(
goal
,
this
->
getPosition
()))
{
switch
(
this
->
getState
())
{
case
VERTEX
:
vertexState
(
goal
)
;
break
;
case
EDGE
:
edgeState
(
goal
)
;
break
;
case
FACE
:
faceState
(
goal
)
;
break
;
}
display
()
;
}
else
{
// TODO Des petits pas répétés peuvent faire sortir de la cellule actuelle
this
->
Algo
::
MovingObjects
::
ParticleBase
<
PFP
>::
move
(
goal
)
;
}
}
}
;
}
// namespace MovingObjects
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
#include "Algo/MovingObjects/particle_cell_2D.hpp"
int
test_particle_cell_2D
()
{
#endif
return
0
;
}
Apps/Tests/Algo/MovingObjects/particle_cell_2D_memo.cpp
View file @
4b50f19b
#ifndef PARTCELL2DMEMO_H
#define PARTCELL2DMEMO_H
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap3.h"
#include "Topology/gmap/embeddedGMap2.h"
//#define DEBUG
#include "Algo/MovingObjects/particle_cell_2D.h"
#include "Algo/MovingObjects/particle_cell_2D
_memo
.h"
#include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h"
#include "Geometry/orientation.h"
using
namespace
CGoGN
;
#include <iostream>
/* A particle cell is a particle base within a map, within a precise cell, the displacement function should indicate
after each displacement wherein lies the new position of the particle */
namespace
CGoGN
{
namespace
Algo
struct
PFP1
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
namespace
Surface
{
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DMemo
<
PFP1
>;
namespace
MovingObjects
{
template
<
typename
PFP
>
class
ParticleCell2DMemo
:
public
ParticleCell2D
<
PFP
>
struct
PFP2
:
public
PFP_DOUBLE
{
public:
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
VertexAttribute
<
VEC3
,
MAP
>
TAB_POS
;
private:
ParticleCell2DMemo
()
{
}
public:
typedef
EmbeddedMap2
MAP
;
};
ParticleCell2DMemo
(
MAP
&
map
,
Dart
belonging_cell
,
VEC3
pos
,
const
TAB_POS
&
tabPos
)
:
ParticleCell2D
<
PFP
>
(
map
,
belonging_cell
,
pos
,
tabPos
)
{
}
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DMemo
<
PFP2
>;
virtual
~
ParticleCell2DMemo
()
{
}
virtual
void
vertexState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
virtual
void
edgeState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
,
Geom
::
Orientation2D
sideOfEdge
=
Geom
::
ALIGNED
)
;
//struct PFP3 : public PFP_DOUBLE
//{
// typedef EmbeddedGMap2 MAP;
//};
//
//template class Algo::Surface::MovingObjects::ParticleCell2DMemo<PFP3>;
//
virtual
void
faceState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
std
::
vector
<
Dart
>
move
(
const
VEC3
&
goal
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
std
::
vector
<
Dart
>
move
(
const
VEC3
&
goal
);
}
;
}
// namespace MovingObjects
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
int
test_particle_cell_2D_memo
()
{
#include "Algo/MovingObjects/particle_cell_2D_memo.hpp"
return
0
;
}
#endif
Apps/Tests/Algo/MovingObjects/particle_cell_2D_secured.cpp
View file @
4b50f19b
#ifndef PARTCELL2DMEMOSECURED_H
#define PARTCELL2DMEMOSECURED_H
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap3.h"
#include "Topology/gmap/embeddedGMap2.h"
//#define DEBUG
#include "Algo/MovingObjects/particle_cell_2D_
memo
.h"
#include "Algo/MovingObjects/particle_cell_2D_
secured
.h"
#include "Algo/Geometry/inclusion.h"
#include "Geometry/intersection.h"
#include "Geometry/orientation.h"
using
namespace
CGoGN
;
#include <iostream>
/* A particle cell secured : version of particle cell-memo where particles might go outside the navigation map
* this class should be used for debug mode only */
namespace
CGoGN
{
namespace
Algo
struct
PFP1
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
namespace
Surface
{
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DSecured
<
PFP1
>;
namespace
MovingObjects
{
template
<
typename
PFP
>
class
ParticleCell2DSecured
:
public
ParticleCell2DMemo
<
PFP
>
struct
PFP2
:
public
PFP_DOUBLE
{
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
VertexAttribute
<
VEC3
,
MAP
>
TAB_POS
;
private:
ParticleCell2DSecured
()
{
std
::
cout
<<
"Particle Secured : for debugging (unoptimized)"
<<
std
::
endl
;
}
public:
typedef
EmbeddedMap2
MAP
;
};
ParticleCell2DSecured
(
MAP
&
map
,
Dart
belonging_cell
,
VEC3
pos
,
const
TAB_POS
&
tabPos
)
:
ParticleCell2DMemo
<
PFP
>
(
map
,
belonging_cell
,
pos
,
tabPos
)
{
// std::cout << "Particle Memo : for debugging (unoptimized)" << std::endl;
}
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DSecured
<
PFP2
>;
~
ParticleCell2DSecured
()
{
}
virtual
void
vertexState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
virtual
void
edgeState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
,
Geom
::
Orientation2D
sideOfEdge
=
Geom
::
ALIGNED
)
;
//struct PFP3 : public PFP_DOUBLE
//{
// typedef EmbeddedGMap2 MAP;
//};
//
//template class Algo::Surface::MovingObjects::ParticleCell2DSecured<PFP3>;
//
virtual
void
faceState
(
const
VEC3
&
current
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
std
::
vector
<
Dart
>
move
(
const
VEC3
&
goal
)
;
std
::
vector
<
Dart
>
move
(
const
VEC3
&
goal
,
CellMarkerMemo
<
MAP
,
FACE
>&
memo_cross
)
;
}
;
}
// namespace MovingObjects
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
int
test_particle_cell_2D_secured
()
{
#include "Algo/MovingObjects/particle_cell_2D_secured.hpp"
return
0
;
}
#endif
Apps/Tests/Algo/MovingObjects/particle_cell_2DandHalf.cpp
View file @
4b50f19b
#ifndef PARTCELL25D_H
#define PARTCELL25D_H
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap3.h"
#include "Topology/gmap/embeddedGMap2.h"
#include "Algo/MovingObjects/particle_base.h"
#include "Algo/Geometry/inclusion.h"
#include "Algo/Geometry/plane.h"
#include "Geometry/intersection.h"
#include "Geometry/orientation.h"
#include "Algo/MovingObjects/particle_cell_2DandHalf.h"
#include <iostream>
using
namespace
CGoGN
;
/* A particle cell is a particle base within a map, within a precise cell, the displacement function should indicate
after each displacement wherein lies the new position of the particle */
namespace
CGoGN
{
namespace
Algo
struct
PFP1
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
namespace
Surface
{
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DAndHalf
<
PFP1
>;
namespace
MovingObjects
{
#ifndef PARTCELL_H
enum
struct
PFP2
:
public
PFP_DOUBLE
{
NO_CROSS
,
CROSS_EDGE
,
CROSS_OTHER
typedef
EmbeddedMap2
MAP
;
};
#endif
template
<
typename
PFP
>
class
ParticleCell2DAndHalf
:
public
Algo
::
MovingObjects
::
ParticleBase
<
PFP
>
{
public
:
typedef
typename
PFP
::
MAP
MAP
;
typedef
typename
PFP
::
VEC3
VEC3
;
typedef
VertexAttribute
<
VEC3
,
MAP
>
TAB_POS
;
MAP
&
m
;
const
TAB_POS
&
m_positions
;
Dart
d
;
Dart
lastCrossed
;
unsigned
int
state
;
unsigned
int
crossCell
;
float
distance
;
ParticleCell2DAndHalf
(
MAP
&
map
)
:
m
(
map
)
{}
ParticleCell2DAndHalf
(
MAP
&
map
,
Dart
belonging_cell
,
VEC3
pos
,
const
TAB_POS
&
tabPos
)
:
Algo
::
MovingObjects
::
ParticleBase
<
PFP
>
(
pos
),
m
(
map
),
m_positions
(
tabPos
),
d
(
belonging_cell
),
lastCrossed
(
belonging_cell
),
state
(
FACE
),
crossCell
(
NO_CROSS
),
distance
(
0
)
{}
template
class
Algo
::
Surface
::
MovingObjects
::
ParticleCell2DAndHalf
<
PFP2
>;
Dart
getCell
()
{
return
d
;
}