Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
ae9a74fa
Commit
ae9a74fa
authored
Jan 28, 2011
by
Pierre Kraemer
Browse files
pmView ok
parent
6abb69bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Apps/Examples/pmView.cpp
View file @
ae9a74fa
...
...
@@ -884,15 +884,14 @@ int main(int argc, char** argv)
char
*
filename
=
argv
[
1
]
;
mgw
->
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
"position"
)
;
GLint
t1
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
bool
success
=
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
,
mgw
->
position
,
Algo
::
Import
::
ImportSurfacique
::
UNKNOWNSURFACE
)
;
if
(
!
succes
s
)
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
filename
,
attrName
s
)
)
{
std
::
cerr
<<
"could not import "
<<
filename
<<
std
::
endl
;
exit
(
1
);
}
mgw
->
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
attrNames
[
0
])
;
GLint
t2
=
glutGet
(
GLUT_ELAPSED_TIME
)
;
GLfloat
seconds
=
(
t2
-
t1
)
/
1000.0
f
;
std
::
cout
<<
"import: "
<<
seconds
<<
" sec"
<<
std
::
endl
;
...
...
Apps/Examples/pmView.h
View file @
ae9a74fa
...
...
@@ -40,12 +40,15 @@
using
namespace
CGoGN
;
struct
PFP
{
// definition de la carte
struct
PFP
{
// definition of the map
typedef
EmbeddedMap2
<
Map2
>
MAP
;
// definition
du
type
de
re
e
l
utilis
e
// definition
of the
type
of
re
a
l
valu
e
typedef
float
REAL
;
// other types definitions
typedef
Geom
::
Vector
<
3
,
REAL
>
VEC3
;
typedef
Geom
::
Vector
<
6
,
REAL
>
VEC6
;
typedef
Geom
::
Matrix
<
3
,
3
,
REAL
>
MATRIX33
;
...
...
@@ -54,12 +57,8 @@ struct PFP {
typedef
AttributeHandler
<
VEC3
>
TVEC3
;
typedef
AttributeHandler
<
REAL
>
TREAL
;
typedef
AttributeHandler
<
MATRIX33
>
TFRAME
;
typedef
AttributeHandler
<
MATRIX36
>
TRGBFUNCS
;
};
INIT_STATICS_MAP
()
;
typedef
PFP
::
MAP
MAP
;
MAP
myMap
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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