27#include <easy3d/renderer/camera.h>
28#include <easy3d/viewer/viewer.h>
29#include <easy3d/util/resource.h>
30#include <easy3d/util/initializer.h>
35int main(
int argc,
char** argv) {
39 const std::string file_name = resource::directory() +
"/data/easy3d.ply";
40 Viewer viewer(EXAMPLE_TITLE);
45 LOG(ERROR) <<
"failed to load model. Please make sure the file exists and format is correct.";
void setUpVector(const vec3 &up, bool noMove=true) const
Definition: camera.cpp:837
void setViewDirection(const vec3 &direction) const
Definition: camera.cpp:879
The built-in Easy3D viewer.
Definition: viewer.h:61
virtual Model * add_model(const std::string &file_name, bool create_default_drawables=true)
Add a model from a file to the viewer to be visualized. On success, the viewer will be in charge of t...
Definition: viewer.cpp:1204
Camera * camera()
Returns the camera used by the viewer. See Camera.
Definition: viewer.h:177
int run(bool see_all=true)
Run the viewer.
Definition: viewer.cpp:1090
Definition: collider.cpp:182
void initialize(bool use_log_file, bool use_setting_file, const std::string &resource_dir)
Initialization of Easy3D.
Definition: initializer.cpp:35