mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 23:48:12 +08:00
添加包围盒的两个顶点
This commit is contained in:
parent
f5f2247274
commit
68cbbbafe4
@ -8,7 +8,7 @@
|
||||
|
||||
#include "mesh.h"
|
||||
#include "shader.h"
|
||||
|
||||
#include <limits>
|
||||
class Model {
|
||||
public:
|
||||
enum MODELSTATUS { LOADING, LOADED, ERR };
|
||||
@ -19,6 +19,12 @@ private:
|
||||
std::string _directory;
|
||||
MODELSTATUS _status = LOADING;
|
||||
|
||||
// largest point
|
||||
glm::vec3 right_up_front = glm::vec3(3e37f, 3e37f, 3e37f);
|
||||
// smallest point
|
||||
glm::vec3 left_down_back = -right_up_front;
|
||||
|
||||
|
||||
public:
|
||||
Model(std::string path);
|
||||
~Model();
|
||||
|
||||
@ -81,14 +81,17 @@ void SceneViewer::initializeGL() {
|
||||
vertexShader.dispose();
|
||||
fragmentShader.dispose();
|
||||
|
||||
Model* backpackModel = new Model("E:\\Repositories\\CollegeProjects\\CGAssignments\\FinalProject\\Models\\backpack\\backpack.obj");
|
||||
Model* backpackModel = new Model("D:/code/ComputerGraphic/SceneEditor/obj/nanosuit/nanosuit.obj");
|
||||
Logger::info("Model loaded");
|
||||
Renderable renderable(backpackModel);
|
||||
_objects.push_back(backpackModel);
|
||||
|
||||
_camera.setPosition(glm::vec3(0.0f, 0.0f, 3.0f));
|
||||
_camera.setPosition(glm::vec3(0.0f, 15.0f, 8.0f));
|
||||
_camera.setYaw(-90.0f);
|
||||
_camera.setPitch(0.0f);
|
||||
_camera.setPitch(-30.0f);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SceneViewer::resizeGL(int w, int h) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user