switch to glm

This commit is contained in:
hyzboy 2021-09-24 01:53:44 +08:00
parent 80cae7618c
commit 6c6ee96be1
7 changed files with 25 additions and 21 deletions

2
CMCore

@ -1 +1 @@
Subproject commit 2493989c5e830bd954c326772b4410580e975c8d
Subproject commit e469041733b2446bad783c5176a1480622f78a0e

@ -1 +1 @@
Subproject commit 2dc2e3ef9587a69eb29216411f9de322c65860a6
Subproject commit c8141fd275ce2ac9f4087c446eb04ba1be3a93b3

View File

@ -5,6 +5,7 @@
#include<hgl/math/Vector.h>
#include<hgl/type/RectScope.h>
#include<hgl/type/Color4f.h>
#include<hgl/graph/AABB.h>
namespace hgl
{
namespace graph
@ -82,7 +83,8 @@ namespace hgl
PlaneCreateInfo()
{
tile.Set(1,1);
tile.x=1.0f;
tile.y=1.0f;
}
};//struct PlaneCreateInfo
@ -104,15 +106,15 @@ namespace hgl
void Set(const AABB &box)
{
center=box.CenterPoint().xyz();
size=box.Size().xyz();
center=box.center;
size=box.length;
}
CubeCreateInfo()
{
center.Set(0,0,0);
size.Set(1,1,1);
tile.Set(1,1);
center=Vector3f(0,0,0);
size=Vector3f(1,1,1);
tile=Vector2f(1,1);
has_color=false;
}
@ -120,7 +122,7 @@ namespace hgl
CubeCreateInfo(const AABB &box)
{
Set(box);
tile.Set(1,1);
tile=Vector2f(1,1);
has_color=false;
}

View File

@ -23,10 +23,10 @@ namespace hgl
void Set(const Matrix4f &w,const Matrix4f &vp)
{
l2w=w;
inverse_l2w=l2w.Inverted();
inverse_l2w=inverse(l2w);
mvp=vp*l2w;
inverse_mvp=mvp.Inverted();
inverse_mvp=inverse(mvp);
}
CompOperatorMemcmp(const MVPMatrix &);

View File

@ -4,6 +4,7 @@
#include<hgl/type/List.h>
#include<hgl/graph/SceneOrient.h>
#include<hgl/graph/VK.h>
#include<hgl/graph/AABB.h>
namespace hgl
{
namespace graph

View File

@ -5,6 +5,7 @@
#include<hgl/type/Map.h>
#include<hgl/type/String.h>
#include<hgl/math/Math.h>
#include<hgl/graph/AABB.h>
VK_NAMESPACE_BEGIN
/**
* <br>

View File

@ -15,8 +15,8 @@ namespace hgl
}
else
{
BoundingBox.minPoint=vec::zero;
BoundingBox.maxPoint=vec::zero;
BoundingBox.minPoint=Vector3f(0,0,0);
BoundingBox.maxPoint=Vector3f(0,0,0);
WorldBoundingBox=LocalBoundingBox=BoundingBox;
}