-
Notifications
You must be signed in to change notification settings - Fork 7
GettingStarted Maps
Alexander Mock edited this page Oct 31, 2022
·
2 revisions
Triangle Meshes can be stored in various file formats. Rmagine utilizes the Open Asset Import Library (assimp) in order to support a wide range of well known file formats. After loading the raw scene graph buffers with Assimp it is converted into Rmagines internal scene graph structure. Dependend on the computation backend Embree
or OptiX
the scene graph is prepared for fast ray traversals by building the required acceleration structures.
#include <rmagine/map/EmbreeMap.hpp>
namespace rm = rmagine;
int main(int argc, char** argv)
{
std::string filename = "path/to/mesh/file";
rm::EmbreeMapPtr map = rm::import_embree_map(filename);
return 0;
}
#include <rmagine/map/OptixMap.hpp>
namespace rm = rmagine;
int main(int argc, char** argv)
{
std::string filename = "path/to/mesh/file";
rm::OptixMapPtr map = rm::import_optix_map(filename);
return 0;
}
After loading, the map consists of a complete scene graph. It then usually passed to a simulator (see next gettingstarted-sections). The advanced Map-section describes how to modify or create the internal maps from scratch.
Getting Started
Library
Extra