Open epernod opened 6 years ago
First discussion with @damienmarchal . To generate the data on the flow.
Backup gitter discussion here:
Loader {
std::vector<Data<std::vector<Vec3f>> positions;
load(){
for(auto& mesh : assimp.meshes ) {
BaseData* data = new Data<std::vector<Vec3f>>() ;
WriteOnlAccessor acc = WriteOnlyAccessor(data);
acc.resize(mesh.vertices.size());
for( int i ; i< mesh.vertices.size();++i ){
acc[i] = v[i] ;
}
positions.push_back(data);
addData(data, mesh.name+"_positions") ;
}
}
}
Data<std::string>* t = new Data<std::string>() ;
t = new(t) Data<std::string>(obj->initData(t, std::string(""), dataName, dataHelp)) ;
Hello,
I would like to discuss a design to represent mesh loaded from a file that contains several child meshes.
For example FBX or COLLADA can now be loaded in Sofa using the SofaAssimp plugin but for the moment all child meshes are merged in one big mesh. We loose the information of Bones etc..
The API from sofa::core::loader::MeshLoader doesn't support several mesh for the moment.
Any suggestion?
Suggested labels: