diff --git a/example/Gizmo/Gizmo3DMove.cpp b/example/Gizmo/Gizmo3DMove.cpp index c24cd446..c880bfd0 100644 --- a/example/Gizmo/Gizmo3DMove.cpp +++ b/example/Gizmo/Gizmo3DMove.cpp @@ -151,11 +151,9 @@ private: { struct PlaneGridCreateInfo pgci; - pgci.grid_size.width =32; - pgci.grid_size.height=32; + pgci.grid_size.Set(32,32); - pgci.sub_count.width =8; - pgci.sub_count.height=8; + pgci.sub_count.Set(8,8); pgci.lum=0.5; pgci.sub_lum=0.75; @@ -206,7 +204,7 @@ private: public: - bool Init(int w,int h) override + bool Init(uint w,uint h) override { if(!SceneAppFramework::Init(w,h)) return(false); diff --git a/inc/hgl/graph/Light.h b/inc/hgl/graph/Light.h index 49f0cc56..389646d0 100644 --- a/inc/hgl/graph/Light.h +++ b/inc/hgl/graph/Light.h @@ -2,7 +2,7 @@ #define HGL_GRAPH_LIGHT_INCLUDE #include -#include +#include namespace hgl { namespace graph diff --git a/src/SceneGraph/InlineGeometry.cpp b/src/SceneGraph/InlineGeometry.cpp index dfae2bbb..0a3cbe44 100644 --- a/src/SceneGraph/InlineGeometry.cpp +++ b/src/SceneGraph/InlineGeometry.cpp @@ -166,24 +166,24 @@ namespace hgl { PrimitiveCreater rc(db,vil); - if(!rc.Init(((pgci->grid_size.width+1)+(pgci->grid_size.height+1))*2)) + if(!rc.Init(((pgci->grid_size.Width()+1)+(pgci->grid_size.Height()+1))*2)) return(nullptr); AutoDelete vertex=rc.AccessVAD(VAN::Position); - const float right=float(pgci->grid_size.width)/2.0f; + const float right=float(pgci->grid_size.Width())/2.0f; const float left =-right; - const float bottom=float(pgci->grid_size.height)/2.0f; + const float bottom=float(pgci->grid_size.Height())/2.0f; const float top =-bottom; - for(int row=0;row<=pgci->grid_size.height;row++) + for(int row=0;row<=pgci->grid_size.Height();row++) { vertex->WriteLine( Vector3f(left ,top+row,0), Vector3f(right,top+row,0)); } - for(int col=0;col<=pgci->grid_size.width;col++) + for(int col=0;col<=pgci->grid_size.Width();col++) { vertex->WriteLine(Vector3f(left+col,top, 0), Vector3f(left+col,bottom,0)); @@ -192,17 +192,17 @@ namespace hgl AutoDelete lum=rc.AccessVAD(VAN::Luminance); if(lum) { - for(int row=0;row<=pgci->grid_size.height;row++) + for(int row=0;row<=pgci->grid_size.Height();row++) { - if((row%pgci->sub_count.height)==0) + if((row%pgci->sub_count.Height())==0) lum->RepeatWrite(pgci->sub_lum,2); else lum->RepeatWrite(pgci->lum,2); } - for(int col=0;col<=pgci->grid_size.width;col++) + for(int col=0;col<=pgci->grid_size.Width();col++) { - if((col%pgci->sub_count.width)==0) + if((col%pgci->sub_count.Width())==0) lum->RepeatWrite(pgci->sub_lum,2); else lum->RepeatWrite(pgci->lum,2);