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
Hurstel
CGoGN
Commits
8e159d31
Commit
8e159d31
authored
Jan 17, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless typename
parent
e4048ec3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
36 deletions
+35
-36
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
...ins/differentialProperties/src/differentialProperties.cpp
+21
-21
SCHNApps/Plugins/importSurface/importSurface.cpp
SCHNApps/Plugins/importSurface/importSurface.cpp
+2
-3
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
+9
-9
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+3
-3
No files found.
SCHNApps/Plugins/differentialProperties/src/differentialProperties.cpp
View file @
8e159d31
...
...
@@ -47,8 +47,8 @@ void DifferentialPropertiesPlugin::cb_computeNormal()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
reinterpret
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP2
>*
mh
=
static
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_computeNormalDialog
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
std
::
string
normalName
;
...
...
@@ -56,10 +56,10 @@ void DifferentialPropertiesPlugin::cb_computeNormal()
normalName
=
m_computeNormalDialog
->
combo_normalAttribute
->
currentText
().
toUtf8
().
constData
();
else
normalName
=
m_computeNormalDialog
->
normalAttributeName
->
text
().
toUtf8
().
constData
();
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
if
(
!
normal
.
isValid
())
normal
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
normal
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
Algo
::
Surface
::
Geometry
::
computeNormalVertices
<
PFP2
>
(
*
map
,
position
,
normal
);
...
...
@@ -81,63 +81,63 @@ void DifferentialPropertiesPlugin::cb_computeCurvature()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
reinterpret
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP2
>*
mh
=
static
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
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
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
typename
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
normalName
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
normal
=
map
->
getAttribute
<
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
<
typename
PFP2
::
VEC3
>
Kmax
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
VertexAttribute
<
PFP2
::
VEC3
>
Kmax
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
if
(
!
Kmax
.
isValid
())
Kmax
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KmaxName
);
Kmax
=
map
->
addAttribute
<
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
<
typename
PFP2
::
REAL
>
kmax
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
VertexAttribute
<
PFP2
::
REAL
>
kmax
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
if
(
!
kmax
.
isValid
())
kmax
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kmaxName
);
kmax
=
map
->
addAttribute
<
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
<
typename
PFP2
::
VEC3
>
Kmin
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
VertexAttribute
<
PFP2
::
VEC3
>
Kmin
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
if
(
!
Kmin
.
isValid
())
Kmin
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KminName
);
Kmin
=
map
->
addAttribute
<
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
<
typename
PFP2
::
REAL
>
kmin
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
VertexAttribute
<
PFP2
::
REAL
>
kmin
=
map
->
getAttribute
<
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
if
(
!
kmin
.
isValid
())
kmin
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
VERTEX
>
(
kminName
);
kmin
=
map
->
addAttribute
<
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
<
typename
PFP2
::
VEC3
>
Knormal
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
VertexAttribute
<
PFP2
::
VEC3
>
Knormal
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
if
(
!
Knormal
.
isValid
())
Knormal
=
map
->
addAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
Knormal
=
map
->
addAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
KnormalName
);
EdgeAttribute
<
typename
PFP2
::
REAL
>
edgeAngle
=
map
->
getAttribute
<
typename
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
EdgeAttribute
<
PFP2
::
REAL
>
edgeAngle
=
map
->
getAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
if
(
!
edgeAngle
.
isValid
())
edgeAngle
=
map
->
addAttribute
<
typename
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
edgeAngle
=
map
->
addAttribute
<
PFP2
::
REAL
,
EDGE
>
(
"edgeAngle"
);
Algo
::
Surface
::
Geometry
::
computeAnglesBetweenNormalsOnEdges
<
PFP2
>
(
*
map
,
position
,
edgeAngle
);
Algo
::
Surface
::
Geometry
::
computeCurvatureVertices_NormalCycles_Projected
<
PFP2
>
(
*
map
,
0.01
f
*
mh
->
getBBdiagSize
(),
position
,
normal
,
edgeAngle
,
kmax
,
kmin
,
Kmax
,
Kmin
,
Knormal
);
...
...
SCHNApps/Plugins/importSurface/importSurface.cpp
View file @
8e159d31
...
...
@@ -22,16 +22,15 @@ void ImportSurfacePlugin::cb_import()
if
(
fi
.
exists
())
{
// typename PFP2::MAP* m = new typename PFP2::MAP();
GenericMap
*
m
=
m_window
->
createMap
(
2
);
typename
PFP2
::
MAP
*
map
=
static_cast
<
typename
PFP2
::
MAP
*>
(
m
);
PFP2
::
MAP
*
map
=
static_cast
<
PFP2
::
MAP
*>
(
m
);
MapHandler
<
PFP2
>*
h
=
new
MapHandler
<
PFP2
>
(
fi
.
baseName
(),
m_window
,
map
);
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Surface
::
Import
::
importMesh
<
PFP2
>
(
*
map
,
fileName
.
toUtf8
().
constData
(),
attrNames
);
// get vertex position attribute
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
CGoGN
::
VERTEX
>
(
attrNames
[
0
]);
// create VBO for vertex position attribute
h
->
createVBO
(
position
);
...
...
SCHNApps/Plugins/subdivideSurface/subdivideSurface.cpp
View file @
8e159d31
...
...
@@ -77,10 +77,10 @@ void SubdivideSurfacePlugin::cb_loopSubdivision()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
reinterpret
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP2
>*
mh
=
static
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
LoopSubdivision
<
PFP2
>
(
*
map
,
position
);
...
...
@@ -104,10 +104,10 @@ void SubdivideSurfacePlugin::cb_CCSubdivision()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
reinterpret
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP2
>*
mh
=
static
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
CatmullClarkSubdivision
<
PFP2
>
(
*
map
,
position
);
...
...
@@ -131,10 +131,10 @@ void SubdivideSurfacePlugin::cb_trianguleFaces()
if
(
!
currentItems
.
empty
())
{
const
QString
&
mapname
=
currentItems
[
0
]
->
text
();
MapHandler
<
PFP2
>*
mh
=
reinterpret
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
typename
PFP2
::
MAP
*
map
=
mh
->
getMap
();
MapHandler
<
PFP2
>*
mh
=
static
_cast
<
MapHandler
<
PFP2
>*>
(
m_window
->
getMap
(
mapname
));
PFP2
::
MAP
*
map
=
mh
->
getMap
();
std
::
string
positionName
=
m_dockTab
->
combo_positionAttribute
->
currentText
().
toUtf8
().
constData
();
VertexAttribute
<
typename
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
typename
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
VertexAttribute
<
PFP2
::
VEC3
>
position
=
map
->
getAttribute
<
PFP2
::
VEC3
,
VERTEX
>
(
positionName
);
Algo
::
Surface
::
Modelisation
::
trianguleFaces
<
PFP2
>
(
*
map
,
position
);
...
...
SCHNApps/include/mapHandler.h
View file @
8e159d31
...
...
@@ -103,11 +103,11 @@ public:
delete
m_map
;
}
typename
PFP
::
MAP
*
getMap
()
{
return
reinterpret
_cast
<
typename
PFP
::
MAP
*>
(
m_map
);
}
typename
PFP
::
MAP
*
getMap
()
{
return
static
_cast
<
typename
PFP
::
MAP
*>
(
m_map
);
}
void
updateBB
(
const
VertexAttribute
<
typename
PFP
::
VEC3
>&
position
)
{
CGoGN
::
Geom
::
BoundingBox
<
typename
PFP
::
VEC3
>
bb
=
CGoGN
::
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
*
(
reinterpret
_cast
<
typename
PFP
::
MAP
*>
(
m_map
)),
position
);
CGoGN
::
Geom
::
BoundingBox
<
typename
PFP
::
VEC3
>
bb
=
CGoGN
::
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
*
(
static
_cast
<
typename
PFP
::
MAP
*>
(
m_map
)),
position
);
m_bbMin
=
qglviewer
::
Vec
(
bb
.
min
()[
0
],
bb
.
min
()[
1
],
bb
.
min
()[
2
]);
m_bbMax
=
qglviewer
::
Vec
(
bb
.
max
()[
0
],
bb
.
max
()[
1
],
bb
.
max
()[
2
]);
m_bbDiagSize
=
(
m_bbMax
-
m_bbMin
).
norm
();
...
...
@@ -115,7 +115,7 @@ public:
void
updatePrimitives
(
int
primitive
,
const
FunctorSelect
&
good
=
allDarts
)
{
m_render
->
initPrimitives
<
PFP
>
(
*
(
reinterpret
_cast
<
typename
PFP
::
MAP
*>
(
m_map
)),
good
,
primitive
)
;
m_render
->
initPrimitives
<
PFP
>
(
*
(
static
_cast
<
typename
PFP
::
MAP
*>
(
m_map
)),
good
,
primitive
)
;
}
};
...
...
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