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
KennethVanhoey
CGoGN
Commits
336ed673
Commit
336ed673
authored
Feb 24, 2011
by
Sylvain Thery
Browse files
bug
parent
b6651cd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Apps/Tuto/tuto5.cpp
View file @
336ed673
...
...
@@ -380,33 +380,38 @@ void myGlutWin::myKeyboard(unsigned char keycode, int x, int y)
int
main
(
int
argc
,
char
**
argv
)
{
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Import
::
importInESS
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
);
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
attrNames
[
0
])
;
//plongement
// Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
// dglobal = prim.hexaGrid_topo(3,3,3);
// prim.embedHexaGrid(1.0f,1.0f,1.0f);
// std::vector<std::string> attrNames ;
// Algo::Import::importInESS<PFP>(myMap, argv[1], attrNames);
// position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
>
(
VERTEX_ORBIT
,
"position"
);
Algo
::
Modelisation
::
Primitive3D
<
PFP
>
prim
(
myMap
,
position
);
int
nb
=
3
;
if
(
argc
>
1
)
nb
=
atoi
(
argv
[
1
]);
dglobal
=
prim
.
hexaGrid_topo
(
nb
,
nb
,
nb
);
prim
.
embedHexaGrid
(
1.0
f
,
1.0
f
,
1.0
f
);
// Geom::Matrix44f mat;
// mat.identity();
// Geom::scale(2.0f, 2.0f,2.0f,mat);
// prim.transform(mat);
Dart
d
=
Algo
::
Modelisation
::
Polyhedron
<
PFP
>::
createOrientedPolyhedron
(
myMap
,
6
);
dglobal
=
d
;
position
[
d
]
=
PFP
::
VEC3
(
0
);
position
[
myMap
.
phi1
(
d
)]
=
PFP
::
VEC3
(
1
,
0
,
0
);
position
[
myMap
.
phi1
(
myMap
.
phi1
(
d
))]
=
PFP
::
VEC3
(
1
,
0
,
1
);
position
[
myMap
.
phi_1
(
d
)]
=
PFP
::
VEC3
(
0
,
0
,
1
);
d
=
myMap
.
phi_1
(
myMap
.
phi2
(
myMap
.
phi_1
(
myMap
.
phi_1
(
myMap
.
phi2
(
myMap
.
phi_1
(
d
))))));
position
[
d
]
=
PFP
::
VEC3
(
1
,
1
,
0
);
position
[
myMap
.
phi1
(
d
)]
=
PFP
::
VEC3
(
0
,
1
,
0
);
position
[
myMap
.
phi1
(
myMap
.
phi1
(
d
))]
=
PFP
::
VEC3
(
0
,
1
,
1
);
position
[
myMap
.
phi_1
(
d
)]
=
PFP
::
VEC3
(
1
,
1
,
1
);
//
Dart d = Algo::Modelisation::Polyhedron<PFP>::createOrientedPolyhedron(myMap,6);
//
dglobal=d;
//
//
position[d] = PFP::VEC3(0);
//
position[myMap.phi1(d)] = PFP::VEC3(1,0,0);
//
position[myMap.phi1(myMap.phi1(d))] = PFP::VEC3(1,0,1);
//
position[myMap.phi_1(d)] = PFP::VEC3(0,0,1);
//
//
d = myMap.phi_1(myMap.phi2(myMap.phi_1(myMap.phi_1(myMap.phi2(myMap.phi_1(d))))));
//
position[d] = PFP::VEC3(1,1,0);
//
position[myMap.phi1(d)] = PFP::VEC3(0,1,0);
//
position[myMap.phi1(myMap.phi1(d))] = PFP::VEC3(0,1,1);
//
position[myMap.phi_1(d)] = PFP::VEC3(1,1,1);
// Dart d = Algo::Modelisation::Polyhedron<PFP>::createOrientedPolyhedron(myMap,4);
// dglobal=d;
...
...
Apps/Tuto/tuto_ogl2.cpp
View file @
336ed673
...
...
@@ -177,7 +177,6 @@ int main(int argc, char **argv)
// mgw.m_render->initPrimitives<PFP>(myMap, allDarts,Algo::Render::VBO::POINTS);
mgw
.
mainLoop
();
return
0
;
...
...
include/Algo/Render/gl3mapRender.h
View file @
336ed673
...
...
@@ -78,13 +78,25 @@ protected:
* vbo buffers
*/
GLuint
m_VBOBuffers
[
NB_BUFFERS
]
;
// bool m_allocatedBuffers[NB_BUFFERS] ;
// bool m_usedBuffers[NB_BUFFERS] ;
/**
*
*/
bool
m_allocatedAttributes
[
NB_BUFFERS
]
;
/**
*
*/
bool
m_usedAttributes
[
NB_BUFFERS
]
;
/**
*
*/
unsigned
int
m_AttributesDataSize
[
NB_BUFFERS
];
/**
*
*/
std
::
map
<
std
::
string
,
GLuint
>
m_attributebyName
;
...
...
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