Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
KennethVanhoey
CGoGN
Commits
55cb1ef4
Commit
55cb1ef4
authored
Nov 04, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modif simpleGMap3 et ajout dans CMakeList Release
parent
294531ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
19 deletions
+26
-19
Apps/Examples/Release/CMakeLists.txt
Apps/Examples/Release/CMakeLists.txt
+5
-0
Apps/Examples/simpleGMap3.cpp
Apps/Examples/simpleGMap3.cpp
+21
-19
No files found.
Apps/Examples/Release/CMakeLists.txt
View file @
55cb1ef4
...
...
@@ -59,6 +59,11 @@ QT4_WRAP_CPP(simpleGMap2_moc ../simpleGMap2.h)
add_executable
(
simpleGMap2 ../simpleGMap2.cpp
${
simpleGMap2_moc
}
)
target_link_libraries
(
simpleGMap2
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QT_LIBRARIES
}
)
QT4_WRAP_CPP
(
simpleGMap3_moc ../simpleGMap3.h
)
add_executable
(
simpleGMap3 ../simpleGMap3.cpp
${
simpleGMap3_moc
}
)
target_link_libraries
(
simpleGMap3
${
CGoGN_LIBS_R
}
${
COMMON_LIBS
}
${
QT_LIBRARIES
}
)
QT4_WRAP_CPP
(
extrusionView_moc ../extrusionView.h
)
add_executable
(
extrusionView ../extrusionView.cpp
${
extrusionView_moc
}
)
...
...
Apps/Examples/simpleGMap3.cpp
View file @
55cb1ef4
...
...
@@ -32,27 +32,29 @@ SimpleGMap3::SimpleGMap3()
{
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX
,
"position"
);
// Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
// Dart d = prim.hexaGrid_topo(2,2,1);
// prim.embedHexaGrid(1,1,1);
//
// Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f;
// myMap.cutEdge(d1);
// position[myMap.phi1(d1)] = mid0;
//
// VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid1;
//
//// d = myMap.phi1(myMap.phi1(d));
// d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid;
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
myMap
,
position
);
Dart
d
=
prim
.
hexaGrid_topo
(
2
,
2
,
1
);
prim
.
embedHexaGrid
(
1
,
1
,
1
);
Dart
d1
=
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
d
)))));
VEC3
mid0
=
(
position
[
d1
]
+
position
[
myMap
.
phi1
(
d1
)])
/
2.0
f
;
myMap
.
cutEdge
(
d1
);
position
[
myMap
.
phi1
(
d1
)]
=
mid0
;
VEC3
mid1
=
(
position
[
d
]
+
position
[
myMap
.
phi1
(
d
)])
/
2.0
f
;
myMap
.
cutEdge
(
d
);
position
[
myMap
.
phi1
(
d
)]
=
mid1
;
d
=
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
d
)))));
VEC3
mid
=
(
position
[
d
]
+
position
[
myMap
.
phi1
(
d
)])
/
2.0
f
;
myMap
.
cutEdge
(
d
);
position
[
myMap
.
phi1
(
d
)]
=
mid
;
for
(
unsigned
int
i
=
position
.
begin
()
;
i
!=
position
.
end
()
;
position
.
next
(
i
))
position
[
i
]
+=
VEC3
(
2
,
0
,
0
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim2
(
myMap
,
position
);
Dart
d
=
prim2
.
hexaGrid_topo
(
2
,
1
,
1
);
d
=
prim2
.
hexaGrid_topo
(
2
,
1
,
1
);
prim2
.
embedHexaGrid
(
1
,
1
,
1
);
d
=
myMap
.
phi2
(
myMap
.
phi1
(
myMap
.
phi1
(
myMap
.
phi2
(
d
))));
...
...
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