1#ifndef DANDELION_SCENE_SCENE_H
2#define DANDELION_SCENE_SCENE_H
11#include <spdlog/spdlog.h>
56 Scene(
const Scene& other) =
delete;
82 bool save(
const std::string_view directory);
92 bool load(
const std::string_view directory);
119 std::vector<std::unique_ptr<Group>>
groups;
bool during_animation
定义 scene.h:195
void reset_simulation()
定义 scene.cpp:362
bool check_during_simulation()
定义 scene.cpp:375
Scene(Scene &other)=delete
void render_lights(const Shader &shader)
在渲染模式下绘制光源。
定义 scene.cpp:161
void render(const Shader &shader, WorkingMode mode)
绘制整个场景。
定义 scene.cpp:380
std::vector< std::unique_ptr< Group > > groups
定义 scene.h:119
bool load(const std::string_view directory)
从指定目录中加载保存的场景数据。
定义 scene.cpp:274
void render_camera(const Shader &shader)
在渲染模式 (Rendering mode) 下绘制代表相机视锥的线框。
定义 scene.cpp:114
static void render_ground(const Shader &shader)
绘制空间坐标轴和 平面上表示地面的网格线。
定义 scene.cpp:54
std::shared_ptr< spdlog::logger > logger
定义 scene.h:203
void stop_simulation()
定义 scene.cpp:357
GL::LineSet arrows
定义 scene.h:201
static Eigen::Vector3f initial_camera_target
定义 scene.h:156
bool import_model(const std::string &file_path)
从指定路径导入模型文件到这个场景中。
定义 scene.cpp:196
void clear()
清除场景中所有元素
定义 scene.cpp:329
std::list< Light > lights
定义 scene.h:132
static Eigen::Vector3f initial_camera_pos
定义 scene.h:151
void start_simulation()
定义 scene.cpp:340
std::unique_ptr< HalfedgeMesh > halfedge_mesh
定义 scene.h:134
Scene(const Scene &other)=delete
Camera main_camera
定义 scene.h:128
bool save(const std::string_view directory)
保存所有场景数据到指定的目录中。
定义 scene.cpp:212
static constexpr std::string_view metadata_filename
定义 scene.h:161
std::chrono::time_point< std::chrono::steady_clock > last_update
定义 scene.h:197
std::vector< Object * > all_objects
定义 scene.h:199
Object * selected_object
当前被选中的物体。
定义 scene.h:126
Scene(Scene &&other)=delete
void simulation_update()
计算场景中所有物体下一帧要渲染的运动状态。
定义 scene.cpp:437
Camera camera
定义 scene.h:130
对 GLSL Shader 的简单封装。
定义 shader.hpp:24
这个文件定义了一些和渲染(离线渲染或场景预览)相关的常量、枚举等。
WorkingMode
定义 rendering.hpp:46
表示观察点的相机,既可以用于预览视角,也可以用于渲染视角。
定义 camera.h:24
在预览场景时绘制若干线条。
定义 gl.hpp:334