确认矩阵转换方式,并需求尽快增加设备输入处理,以方便镜头控制调试查看
This commit is contained in:
parent
cb29a37755
commit
67cf0c612e
@ -127,11 +127,6 @@ namespace
|
|||||||
|
|
||||||
Matrix4f MatrixRotate(const aiMatrix4x4 &s)
|
Matrix4f MatrixRotate(const aiMatrix4x4 &s)
|
||||||
{
|
{
|
||||||
//return Matrix4f(s.a1,s.b1,s.c1,s.d1,
|
|
||||||
// s.a2,s.b2,s.c2,s.d2,
|
|
||||||
// s.a3,s.b3,s.c3,s.d3,
|
|
||||||
// s.a4,s.b4,s.c4,s.d4);
|
|
||||||
|
|
||||||
return Matrix4f(s.a1,s.a2,s.a3,s.a4,
|
return Matrix4f(s.a1,s.a2,s.a3,s.a4,
|
||||||
s.b1,s.b2,s.b3,s.b4,
|
s.b1,s.b2,s.b3,s.b4,
|
||||||
s.c1,s.c2,s.c3,s.c4,
|
s.c1,s.c2,s.c3,s.c4,
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
|
|
||||||
constexpr uint32_t SCREEN_WIDTH=256;
|
constexpr uint32_t SCREEN_WIDTH=1280;
|
||||||
constexpr uint32_t SCREEN_HEIGHT=256;
|
constexpr uint32_t SCREEN_HEIGHT=960;
|
||||||
|
|
||||||
vulkan::Renderable *CreateMeshRenderable(SceneDB *db,vulkan::Material *mtl,const MeshData *mesh)
|
vulkan::Renderable *CreateMeshRenderable(SceneDB *db,vulkan::Material *mtl,const MeshData *mesh)
|
||||||
{
|
{
|
||||||
@ -117,14 +117,15 @@ private:
|
|||||||
void InitCamera()
|
void InitCamera()
|
||||||
{
|
{
|
||||||
math::vec center_point=model_data->bounding_box.CenterPoint();
|
math::vec center_point=model_data->bounding_box.CenterPoint();
|
||||||
math::vec min_point=model_data->bounding_box.minPoint;
|
|
||||||
math::vec max_point=model_data->bounding_box.maxPoint;
|
math::vec max_point=model_data->bounding_box.maxPoint;
|
||||||
|
|
||||||
|
max_point.x*=3.0f;
|
||||||
|
max_point.y=center_point.y;
|
||||||
|
max_point.z=center_point.z;
|
||||||
|
|
||||||
camera.type=CameraType::Perspective;
|
camera.type=CameraType::Perspective;
|
||||||
camera.center=center_point.xyz();
|
camera.center=center_point.xyz();
|
||||||
camera.eye=max_point.xyz();
|
camera.eye=max_point.xyz();
|
||||||
//camera.center.Set(0,0,0);
|
|
||||||
//camera.eye.Set(10,10,5);
|
|
||||||
camera.up_vector.Set(0,0,1);
|
camera.up_vector.Set(0,0,1);
|
||||||
camera.forward_vector.Set(0,1,0);
|
camera.forward_vector.Set(0,1,0);
|
||||||
camera.znear=4;
|
camera.znear=4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user