Commit 6abb69bd authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

linearTest ok

parent ae536cbb
...@@ -1033,15 +1033,14 @@ int main(int argc, char** argv) ...@@ -1033,15 +1033,14 @@ int main(int argc, char** argv)
char* filename = argv[1] ; char* filename = argv[1] ;
mgw->position = myMap.addAttribute<PFP::VEC3>(VERTEX_ORBIT, "position") ;
GLint t1 = glutGet(GLUT_ELAPSED_TIME) ; GLint t1 = glutGet(GLUT_ELAPSED_TIME) ;
bool success = Algo::Import::importMesh<PFP>(myMap, filename, mgw->position, Algo::Import::ImportSurfacique::UNKNOWNSURFACE) ; std::vector<std::string> attrNames ;
if(!success) if(!Algo::Import::importMesh<PFP>(myMap, filename, attrNames))
{ {
std::cerr << "could not import "<< filename << std::endl ; std::cerr << "could not import "<< filename << std::endl ;
return 1 ; return 1 ;
} }
mgw->position = myMap.getAttribute<PFP::VEC3>(VERTEX_ORBIT, attrNames[0]) ;
GLint t2 = glutGet(GLUT_ELAPSED_TIME) ; GLint t2 = glutGet(GLUT_ELAPSED_TIME) ;
GLfloat seconds = (t2 - t1) / 1000.0f ; GLfloat seconds = (t2 - t1) / 1000.0f ;
std::cout << "import: " << seconds << " sec" << std::endl ; std::cout << "import: " << seconds << " sec" << std::endl ;
......
...@@ -53,16 +53,18 @@ ...@@ -53,16 +53,18 @@
#endif #endif
using namespace CGoGN ; using namespace CGoGN ;
struct PFP { struct PFP
// definition de la carte {
// definition of the map
typedef Map2 MAP; typedef Map2 MAP;
// definition du type de reel utilise // definition of the type of real value
typedef float REAL; typedef float REAL;
// other types definitions
typedef Geom::Vector<3,REAL> VEC3; typedef Geom::Vector<3,REAL> VEC3;
typedef Geom::Vector<6,REAL> VEC6; typedef Geom::Vector<6,REAL> VEC6;
typedef Geom::Matrix<3,3,REAL> MATRIX33; typedef Geom::Matrix<3,3,REAL> MATRIX33;
...@@ -71,12 +73,8 @@ struct PFP { ...@@ -71,12 +73,8 @@ struct PFP {
typedef AttributeHandler<VEC3> TVEC3; typedef AttributeHandler<VEC3> TVEC3;
typedef AttributeHandler<REAL> TREAL; typedef AttributeHandler<REAL> TREAL;
typedef AttributeHandler<MATRIX33> TFRAME;
typedef AttributeHandler<MATRIX36> TRGBFUNCS;
}; };
INIT_STATICS_MAP() ;
typedef PFP::MAP MAP; typedef PFP::MAP MAP;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment