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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
49a9059f
Commit
49a9059f
authored
Jan 28, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first ok
parent
cc9276e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
Apps/Examples/first.cpp
Apps/Examples/first.cpp
+9
-12
No files found.
Apps/Examples/first.cpp
View file @
49a9059f
...
...
@@ -82,12 +82,15 @@ inline X lerp( X u, X v, double a )
struct
PFP
{
// definition de la carte
struct
PFP
{
// definition of the map
typedef
Map2
MAP
;
// definition
du type de reel utilis
e
// definition
of the type of real 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
;
...
...
@@ -96,15 +99,9 @@ struct PFP {
typedef
AttributeHandler
<
VEC3
>
TVEC3
;
typedef
AttributeHandler
<
REAL
>
TREAL
;
typedef
AttributeHandler
<
MATRIX33
>
TFRAME
;
typedef
AttributeHandler
<
MATRIX36
>
TRGBFUNCS
;
};
INIT_STATICS_MAP
();
//class MyPosFunctor : public FunctorAttribute<Geom::Vec3f>
//{
//public:
...
...
@@ -338,16 +335,16 @@ int main(int argc, char **argv)
AttributeHandler
<
NoMathIOAttribute
<
Pipos
>
>
tablestring
=
myMap
.
addAttribute
<
NoMathIOAttribute
<
Pipos
>
>
(
VERTEX_ORBIT
,
"strings"
);
PFP
::
TVEC3
tablePosition
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX_ORBIT
,
"position"
);
PFP
::
TVEC3
tableNormal
=
myMap
.
addAttribute
<
Geom
::
Vec3f
>
(
VERTEX_ORBIT
,
"normals"
);
bool
success
=
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
"liver.trian"
,
tablePosition
,
Algo
::
Import
::
ImportSurfacique
::
UNKNOWNSURFACE
)
;
if
(
!
success
)
std
::
vector
<
std
::
string
>
attrNames
;
if
(
!
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
"liver.trian"
,
attrNames
)
)
{
std
::
cerr
<<
"Import fail"
<<
std
::
endl
;
exit
(
1
);
}
PFP
::
TVEC3
tablePosition
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
attrNames
[
0
]);
std
::
cout
<<
"Nombre de sommets: "
<<
myMap
.
getNbCells
(
VERTEX_ORBIT
)
<<
std
::
endl
;
SelectorTrue
allDarts
;
...
...
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