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
KennethVanhoey
CGoGN
Commits
a177c353
Commit
a177c353
authored
Jan 07, 2014
by
Lionel Untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding demo tiling app
parent
941f7fd3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
5 deletions
+147
-5
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+1
-1
Apps/SandBox/CMakeLists.txt
Apps/SandBox/CMakeLists.txt
+5
-2
Apps/SandBox/tilings.cpp
Apps/SandBox/tilings.cpp
+138
-0
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+1
-0
include/Algo/Export/export.h
include/Algo/Export/export.h
+1
-1
include/Algo/Export/export.hpp
include/Algo/Export/export.hpp
+1
-1
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
a177c353
...
...
@@ -214,7 +214,7 @@ void MyQT::cb_initGL()
// create the renders
m_topo_render
=
new
Algo
::
Render
::
GL2
::
Topo3Render
();
m_explode_render
=
new
Algo
::
Render
::
GL2
::
ExplodeVolumeRender
(
true
,
true
,
fals
e
);
m_explode_render
=
new
Algo
::
Render
::
GL2
::
ExplodeVolumeRender
(
true
,
true
,
tru
e
);
// SelectorDartNoBoundary<PFP::MAP> nb(myMap);
m_topo_render
->
updateData
<
PFP
>
(
myMap
,
position
,
0.8
f
,
0.8
f
,
0.8
f
);
...
...
Apps/SandBox/CMakeLists.txt
View file @
a177c353
...
...
@@ -23,8 +23,11 @@ ENDIF(WIN32)
#define exec to compile
add_executable
(
multi_att multi_att.cpp
)
target_link_libraries
(
multi_att
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
add_executable
(
multi_att multi_att.cpp
)
target_link_libraries
(
multi_att
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
add_executable
(
tilings tilings.cpp
)
target_link_libraries
(
tilings
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
# Example with Qt
#
...
...
Apps/SandBox/tilings.cpp
0 → 100644
View file @
a177c353
/*******************************************************************************
* 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 *
* *
*******************************************************************************/
#include <iostream>
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Algo/Export/export.h"
#include "Algo/Tiling/square.h"
//#include "Algo/Tiling/triangular.h"
//#include "Algo/Tiling/hexagonal.h"
using
namespace
CGoGN
;
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct
PFP
:
public
PFP_STANDARD
{
// definition of the map
typedef
EmbeddedMap2
MAP
;
};
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
{
CGoGNout
<<
"Usage : "
<<
argv
[
0
]
<<
" tiling-type"
<<
CGoGNendl
;
return
0
;
}
unsigned
int
tiling
;
std
::
istringstream
iss
(
argv
[
1
]);
iss
>>
tiling
;
// declaration of the map
PFP
::
MAP
myMap
;
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
"position"
);
switch
(
tiling
)
{
case
1
:
{
std
::
cout
<<
"square grid tiling"
<<
std
::
endl
;
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
g
(
myMap
,
10
,
10
,
true
);
g
.
embedIntoGrid
(
position
,
50
,
50
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"square_grid.off"
);
break
;
}
case
2
:
{
std
::
cout
<<
"square grid twisted strip tiling"
<<
std
::
endl
;
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
g
(
myMap
,
10
,
10
,
true
);
g
.
embedIntoTwistedStrip
(
position
,
0.3
,
0.8
,
5
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"square_grid_strip.off"
);
break
;
}
case
3
:
{
std
::
cout
<<
"square grid helocoid tiling"
<<
std
::
endl
;
Algo
::
Surface
::
Tilings
::
Square
::
Grid
<
PFP
>
g
(
myMap
,
20
,
20
,
true
);
g
.
embedIntoHelicoid
(
position
,
0.3
,
0.8
,
5.0
,
2.0
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"square_grid_helicoid.off"
);
break
;
}
case
4
:
{
std
::
cout
<<
"square cylinder tiling"
<<
std
::
endl
;
Algo
::
Surface
::
Tilings
::
Square
::
Cylinder
<
PFP
>
c
(
myMap
,
20
,
20
);
c
.
closeTop
();
c
.
closeBottom
();
//c.triangleTop();
//c.triangleBottom();
c
.
embedIntoCylinder
(
position
,
0.5
,
0.7
,
5.0
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"square_cylinder.off"
);
break
;
}
case
5
:
{
std
::
cout
<<
"square cylinder sphere tiling"
<<
std
::
endl
;
Algo
::
Surface
::
Tilings
::
Square
::
Cylinder
<
PFP
>
c
(
myMap
,
20
,
20
);
c
.
closeTop
();
c
.
closeBottom
();
c
.
triangleTop
();
c
.
triangleBottom
();
c
.
embedIntoSphere
(
position
,
0.5
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"square_cylinder_sphere.off"
);
break
;
}
default:
{
break
;
}
}
return
0
;
}
SCHNApps/Plugins/CMakeLists.txt
View file @
a177c353
...
...
@@ -10,6 +10,7 @@ ADD_SUBDIRECTORY(surface_subdivision)
ADD_SUBDIRECTORY
(
surface_selection
)
ADD_SUBDIRECTORY
(
surface_deformation
)
ADD_SUBDIRECTORY
(
surface_modelisation
)
ADD_SUBDIRECTORY
(
surface_tilings
)
ADD_SUBDIRECTORY
(
volume_import
)
#ADD_SUBDIRECTORY(volume_render)
include/Algo/Export/export.h
View file @
a177c353
...
...
@@ -81,7 +81,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
* @return true
*/
template
<
typename
PFP
>
bool
exportOBJ
(
typename
PFP
::
MAP
&
map
,
const
typename
PFP
::
TVEC3
&
position
,
const
char
*
filename
)
;
bool
exportOBJ
(
typename
PFP
::
MAP
&
map
,
const
VertexAttribute
<
typename
PFP
::
VEC3
>
&
position
,
const
char
*
filename
)
;
/**
* export the map into a Trian file
...
...
include/Algo/Export/export.hpp
View file @
a177c353
...
...
@@ -393,7 +393,7 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
}
/*
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const
typename PFP::TVEC3
& position, const char* filename)
bool exportOBJ(typename PFP::MAP& map, const
VertexAttribute<typename PFP::VEC3>
& position, const char* filename)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
...
...
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