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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
e4048ec3
Commit
e4048ec3
authored
Jan 17, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: try to create maps from window object
parent
b216aa33
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
84 additions
and
88 deletions
+84
-88
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
...s/differentialProperties/include/differentialProperties.h
+0
-15
SCHNApps/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
...ins/differentialProperties/src/computeCurvatureDialog.cpp
+2
-2
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
...lugins/differentialProperties/src/computeNormalDialog.cpp
+1
-1
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
...ins/differentialProperties/src/differentialProperties.cpp
+24
-24
SCHNApps/Plugins/importSurface/importSurface.cpp
SCHNApps/Plugins/importSurface/importSurface.cpp
+6
-4
SCHNApps/Plugins/importSurface/importSurface.h
SCHNApps/Plugins/importSurface/importSurface.h
+0
-12
SCHNApps/Plugins/renderVector/renderVector.cpp
SCHNApps/Plugins/renderVector/renderVector.cpp
+8
-3
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
+13
-13
SCHNApps/Plugins/subdivideSurface/subdivideSurface.h
SCHNApps/Plugins/subdivideSurface/subdivideSurface.h
+0
-14
SCHNApps/include/types.h
SCHNApps/include/types.h
+14
-0
SCHNApps/include/window.h
SCHNApps/include/window.h
+1
-0
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+15
-0
No files found.
SCHNApps/Plugins/differentialProperties/include/differentialProperties.h
View file @
e4048ec3
...
...
@@ -6,26 +6,11 @@
#include "computeNormalDialog.h"
#include "computeCurvatureDialog.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/generic/attributeHandler.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
struct
PFP
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
REAL
REAL
;
typedef
PFP
::
VEC3
VEC3
;
class
DifferentialPropertiesPlugin
:
public
Plugin
{
Q_OBJECT
...
...
SCHNApps/Plugins/differentialProperties/src/computeCurvatureDialog.cpp
View file @
e4048ec3
...
...
@@ -52,8 +52,8 @@ void ComputeCurvatureDialog::cb_selectedMapChanged()
std
::
vector
<
std
::
string
>
types
;
cont
.
getAttributesNames
(
names
);
cont
.
getAttributesTypes
(
types
);
std
::
string
vec3TypeName
=
nameOfType
(
VEC3
());
std
::
string
realTypeName
=
nameOfType
(
REAL
());
std
::
string
vec3TypeName
=
nameOfType
(
typename
PFP2
::
VEC3
());
std
::
string
realTypeName
=
nameOfType
(
typename
PFP2
::
REAL
());
unsigned
int
j
=
0
;
unsigned
int
k
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
names
.
size
();
++
i
)
...
...
SCHNApps/Plugins/differentialProperties/src/computeNormalDialog.cpp
View file @
e4048ec3
...
...
@@ -43,7 +43,7 @@ void ComputeNormalDialog::cb_selectedMapChanged()
std
::
vector
<
std
::
string
>
types
;
cont
.
getAttributesNames
(
names
);
cont
.
getAttributesTypes
(
types
);
std
::
string
vec3TypeName
=
nameOfType
(
VEC3
());
std
::
string
vec3TypeName
=
nameOfType
(
typename
PFP2
::
VEC3
());
unsigned
int
j
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
names
.
size
();
++
i
)
{
...
...
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
View file @
e4048ec3
...
...
@@ -47,8 +47,8 @@ void DifferentialPropertiesPlugin::cb_computeNormal()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP
>*>
(
m_window
->
getMap
(
mapname
));
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP
2
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_computeNormalDialog
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
std
::
string
normalName
;
...
...
@@ -56,12 +56,12 @@ void DifferentialPropertiesPlugin::cb_computeNormal()
normalName
=
m_computeNormalDialog
->
combo_normalAttribute
->
currentText
().
toUtf8
().
constData
();
else
normalName
=
m_computeNormalDialog
->
normalAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
position
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
VEC3
>
normal
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
normalName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
if
(
!
normal
.
isValid
())
normal
=
map
->
addAttribute
<
VEC3
,
VERTEX
>
(
normalName
);
normal
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP
>
(
*
map
,
position
,
normal
);
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP
2
>
(
*
map
,
position
,
normal
);
if
(
m_computeNormalDialog
->
check_createVBO
->
checkState
()
==
Qt
::
Checked
)
mh
->
createVBO
(
normal
);
...
...
@@ -81,66 +81,66 @@ void DifferentialPropertiesPlugin::cb_computeCurvature()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP
>*>
(
m_window
->
getMap
(
mapname
));
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP
2
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_computeCurvatureDialog
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
std
::
string
normalName
=
m_computeCurvatureDialog
->
combo_normalAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
position
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
VEC3
>
normal
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
normalName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
std
::
string
KmaxName
;
if
(
m_computeCurvatureDialog
->
KmaxAttributeName
->
text
().
isEmpty
())
KmaxName
=
m_computeCurvatureDialog
->
combo_KmaxAttribute
->
currentText
().
toUtf8
().
constData
();
else
KmaxName
=
m_computeCurvatureDialog
->
KmaxAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
Kmax
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
KmaxName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
Kmax
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
if
(
!
Kmax
.
isValid
())
Kmax
=
map
->
addAttribute
<
VEC3
,
VERTEX
>
(
KmaxName
);
Kmax
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
std
::
string
kmaxName
;
if
(
m_computeCurvatureDialog
->
kmaxAttributeName
->
text
().
isEmpty
())
kmaxName
=
m_computeCurvatureDialog
->
combo_kmaxAttribute
->
currentText
().
toUtf8
().
constData
();
else
kmaxName
=
m_computeCurvatureDialog
->
kmaxAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
REAL
>
kmax
=
map
->
getAttribute
<
REAL
,
VERTEX
>
(
kmaxName
);
VertexAttribute
<
typename
PFP2
::
REAL
>
kmax
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
if
(
!
kmax
.
isValid
())
kmax
=
map
->
addAttribute
<
REAL
,
VERTEX
>
(
kmaxName
);
kmax
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
std
::
string
KminName
;
if
(
m_computeCurvatureDialog
->
KminAttributeName
->
text
().
isEmpty
())
KminName
=
m_computeCurvatureDialog
->
combo_KminAttribute
->
currentText
().
toUtf8
().
constData
();
else
KminName
=
m_computeCurvatureDialog
->
KminAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
Kmin
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
KminName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
Kmin
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
if
(
!
Kmin
.
isValid
())
Kmin
=
map
->
addAttribute
<
VEC3
,
VERTEX
>
(
KminName
);
Kmin
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
std
::
string
kminName
;
if
(
m_computeCurvatureDialog
->
kminAttributeName
->
text
().
isEmpty
())
kminName
=
m_computeCurvatureDialog
->
combo_kminAttribute
->
currentText
().
toUtf8
().
constData
();
else
kminName
=
m_computeCurvatureDialog
->
kminAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
REAL
>
kmin
=
map
->
getAttribute
<
REAL
,
VERTEX
>
(
kminName
);
VertexAttribute
<
typename
PFP2
::
REAL
>
kmin
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
if
(
!
kmin
.
isValid
())
kmin
=
map
->
addAttribute
<
REAL
,
VERTEX
>
(
kminName
);
kmin
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
std
::
string
KnormalName
;
if
(
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
().
isEmpty
())
KnormalName
=
m_computeCurvatureDialog
->
combo_KnormalAttribute
->
currentText
().
toUtf8
().
constData
();
else
KnormalName
=
m_computeCurvatureDialog
->
KnormalAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
Knormal
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
KnormalName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
Knormal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
if
(
!
Knormal
.
isValid
())
Knormal
=
map
->
addAttribute
<
VEC3
,
VERTEX
>
(
KnormalName
);
Knormal
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
EdgeAttribute
<
REAL
>
edgeAngle
=
map
->
getAttribute
<
REAL
,
EDGE
>
(
"edgeAngle"
);
EdgeAttribute
<
typename
PFP2
::
REAL
>
edgeAngle
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
if
(
!
edgeAngle
.
isValid
())
edgeAngle
=
map
->
addAttribute
<
REAL
,
EDGE
>
(
"edgeAngle"
);
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
>
(
*
map
,
position
,
edgeAngle
);
edgeAngle
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP
2
>
(
*
map
,
position
,
edgeAngle
);
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles_Projected
<
PFP
>
(
*
map
,
0.01
f
*
mh
->
getBBdiagSize
(),
position
,
normal
,
edgeAngle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles_Projected
<
PFP
2
>
(
*
map
,
0.01
f
*
mh
->
getBBdiagSize
(),
position
,
normal
,
edgeAngle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
if
(
m_computeCurvatureDialog
->
check_KmaxCreateVBO
->
checkState
()
==
Qt
::
Checked
)
mh
->
createVBO
(
Kmax
);
...
...
SCHNApps/Plugins/importSurface/importSurface.cpp
View file @
e4048ec3
...
...
@@ -22,14 +22,16 @@ void ImportSurfacePlugin::cb_import()
if
(
fi
.
exists
())
{
MAP
*
m
=
new
MAP
();
MapHandler
<
PFP
>*
h
=
new
MapHandler
<
PFP
>
(
fi
.
baseName
(),
m_window
,
m
);
// typename PFP2::MAP* m = new typename PFP2::MAP();
GenericMap
*
m
=
m_window
->
createMap
(
2
);
typename
PFP2
::
MAP
*
map
=
static_cast
<
typename
PFP2
::
MAP
*>
(
m
);
MapHandler
<
PFP2
>*
h
=
new
MapHandler
<
PFP2
>
(
fi
.
baseName
(),
m_window
,
map
);
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Surface
::
Import
::
importMesh
<
PFP
>
(
*
m
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
Algo
::
Surface
::
Import
::
importMesh
<
PFP
2
>
(
*
map
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
VEC3
>
position
=
m
->
getAttribute
<
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
// create VBO for vertex position attribute
h
->
createVBO
(
position
);
...
...
SCHNApps/Plugins/importSurface/importSurface.h
View file @
e4048ec3
...
...
@@ -3,23 +3,11 @@
#include "plugin.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
struct
PFP
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
ImportSurfacePlugin
:
public
Plugin
{
Q_OBJECT
...
...
SCHNApps/Plugins/renderVector/renderVector.cpp
View file @
e4048ec3
...
...
@@ -216,6 +216,7 @@ void RenderVectorDockTab::refreshUI(ParameterSet* params)
PerMapParameterSet
&
p
=
params
->
perMap
[
map
->
getName
()];
QList
<
Utils
::
VBO
*>
vbos
=
map
->
getVBOList
();
unsigned
int
j
=
0
;
for
(
int
i
=
0
;
i
<
vbos
.
count
();
++
i
)
{
combo_positionVBO
->
addItem
(
QString
::
fromStdString
(
vbos
[
i
]
->
name
()));
...
...
@@ -230,9 +231,13 @@ void RenderVectorDockTab::refreshUI(ParameterSet* params)
else
if
(
vbos
[
i
]
==
p
.
positionVBO
)
combo_positionVBO
->
setCurrentIndex
(
i
);
if
(
vbos
[
i
]
->
dataSize
()
==
3
)
{
list_vectorVBO
->
addItem
(
QString
::
fromStdString
(
vbos
[
i
]
->
name
()));
if
(
std
::
find
(
p
.
vectorVBO
.
begin
(),
p
.
vectorVBO
.
end
(),
vbos
[
i
])
!=
p
.
vectorVBO
.
end
())
list_vectorVBO
->
item
(
i
)
->
setSelected
(
true
);
list_vectorVBO
->
item
(
j
)
->
setSelected
(
true
);
++
j
;
}
}
if
(
p
.
positionVBO
==
NULL
&&
vbos
.
count
()
>
0
)
...
...
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
View file @
e4048ec3
...
...
@@ -56,7 +56,7 @@ void SubdivideSurfacePlugin::cb_selectedMapChanged()
std
::
vector
<
std
::
string
>
types
;
cont
.
getAttributesNames
(
names
);
cont
.
getAttributesTypes
(
types
);
std
::
string
vec3TypeName
=
VEC3
::
CGoGNnameOfType
(
);
std
::
string
vec3TypeName
=
nameOfType
(
PFP2
::
VEC3
()
);
unsigned
int
j
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
names
.
size
();
++
i
)
{
...
...
@@ -77,12 +77,12 @@ void SubdivideSurfacePlugin::cb_loopSubdivision()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP
>*>
(
m_window
->
getMap
(
mapname
));
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP
2
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
position
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
LoopSubdivision
<
PFP
>
(
*
map
,
position
);
Algo
::
Surface
::
Modelisation
::
LoopSubdivision
<
PFP
2
>
(
*
map
,
position
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
POINTS
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
...
...
@@ -104,12 +104,12 @@ void SubdivideSurfacePlugin::cb_CCSubdivision()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP
>*>
(
m_window
->
getMap
(
mapname
));
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP
2
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
position
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
CatmullClarkSubdivision
<
PFP
>
(
*
map
,
position
);
Algo
::
Surface
::
Modelisation
::
CatmullClarkSubdivision
<
PFP
2
>
(
*
map
,
position
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
POINTS
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
...
...
@@ -131,12 +131,12 @@ void SubdivideSurfacePlugin::cb_trianguleFaces()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP
>*>
(
m_window
->
getMap
(
mapname
));
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP
2
>*
mh
=
reinterpret_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
VEC3
>
position
=
map
->
getAttribute
<
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
trianguleFaces
<
PFP
>
(
*
map
,
position
);
Algo
::
Surface
::
Modelisation
::
trianguleFaces
<
PFP
2
>
(
*
map
,
position
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
POINTS
);
mh
->
updatePrimitives
(
Algo
::
Render
::
GL2
::
LINES
);
...
...
SCHNApps/Plugins/subdivideSurface/subdivideSurface.h
View file @
e4048ec3
...
...
@@ -4,25 +4,11 @@
#include "plugin.h"
#include "ui_subdivideSurface.h"
#include "Topology/generic/functor.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/generic/attributeHandler.h"
using
namespace
CGoGN
;
using
namespace
SCHNApps
;
struct
PFP
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
SubdivideSurfaceDockTab
:
public
QWidget
,
public
Ui
::
SubdivideSurfaceWidget
{
public:
...
...
SCHNApps/include/types.h
View file @
e4048ec3
...
...
@@ -5,6 +5,10 @@
#include <QMap>
#include <QString>
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/map/embeddedMap3.h"
namespace
CGoGN
{
...
...
@@ -14,6 +18,16 @@ class VBO;
class
GLSLShader
;
}
struct
PFP2
:
public
PFP_STANDARD
{
typedef
EmbeddedMap2
MAP
;
};
struct
PFP3
:
public
PFP_STANDARD
{
typedef
EmbeddedMap3
MAP
;
};
namespace
SCHNApps
{
...
...
SCHNApps/include/window.h
View file @
e4048ec3
...
...
@@ -252,6 +252,7 @@ public:
* MANAGE MAPS
*********************************************************/
GenericMap
*
createMap
(
unsigned
int
dim
);
bool
addMap
(
MapHandlerGen
*
map
);
void
removeMap
(
const
QString
&
name
);
MapHandlerGen
*
getMap
(
const
QString
&
name
)
const
;
...
...
SCHNApps/src/window.cpp
View file @
e4048ec3
...
...
@@ -507,6 +507,21 @@ Plugin* Window::checkPluginDependencie(QString name, Plugin* dependantPlugin)
* MANAGE MAPS
*********************************************************/
GenericMap
*
Window
::
createMap
(
unsigned
int
dim
)
{
GenericMap
*
map
=
NULL
;
switch
(
dim
)
{
case
2
:
map
=
new
PFP2
::
MAP
();
break
;
case
3
:
map
=
new
PFP3
::
MAP
();
break
;
}
return
map
;
}
bool
Window
::
addMap
(
MapHandlerGen
*
map
)
{
if
(
h_maps
.
contains
(
map
->
getName
()))
...
...
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