Renamed to Square from plane
This commit is contained in:
parent
ca6d99b6fb
commit
e02aaf812d
@ -20,14 +20,14 @@ enum class GizmoColor:uint
|
||||
|
||||
enum class GizmoShape:uint
|
||||
{
|
||||
Plane=0, //平面
|
||||
Square=0, //方块
|
||||
Cube, //立方体
|
||||
Sphere, //球
|
||||
Cone, //圆锥
|
||||
Cylinder, //圆柱
|
||||
Torus, //圆环
|
||||
|
||||
ENUM_CLASS_RANGE(Plane,Torus)
|
||||
ENUM_CLASS_RANGE(Square,Torus)
|
||||
};
|
||||
|
||||
bool InitGizmoResource(RenderResource *);
|
||||
|
@ -61,9 +61,9 @@ bool InitGizmoMoveStaticMesh()
|
||||
|
||||
Renderable *plane[3]=
|
||||
{
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Red),
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Green),
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Blue)
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Red),
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Green),
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Blue)
|
||||
};
|
||||
|
||||
if(!sphere)
|
||||
|
@ -59,11 +59,11 @@ bool InitGizmoScaleStaticMesh()
|
||||
GetGizmoRenderable(GizmoShape::Cube,GizmoColor::Blue),
|
||||
};
|
||||
|
||||
Renderable *plane[3]=
|
||||
Renderable *square[3]=
|
||||
{
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Red),
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Green),
|
||||
GetGizmoRenderable(GizmoShape::Plane,GizmoColor::Blue)
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Red),
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Green),
|
||||
GetGizmoRenderable(GizmoShape::Square,GizmoColor::Blue)
|
||||
};
|
||||
|
||||
if(!center_cube)
|
||||
@ -77,7 +77,7 @@ bool InitGizmoScaleStaticMesh()
|
||||
if(!cube[i])
|
||||
return(false);
|
||||
|
||||
if(!plane[i])
|
||||
if(!square[i])
|
||||
return(false);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ bool InitGizmoScaleStaticMesh()
|
||||
|
||||
tm.SetScale(plane_scale);
|
||||
tm.SetTranslation(GIZMO_TWO_AXIS_OFFSET,GIZMO_TWO_AXIS_OFFSET,0);
|
||||
root_node->CreateSubNode(tm,plane[2]);
|
||||
root_node->CreateSubNode(tm,square[2]);
|
||||
}
|
||||
|
||||
{
|
||||
@ -119,7 +119,7 @@ bool InitGizmoScaleStaticMesh()
|
||||
|
||||
tm.SetScale(plane_scale);
|
||||
tm.SetTranslation(0,GIZMO_TWO_AXIS_OFFSET,GIZMO_TWO_AXIS_OFFSET);
|
||||
root_node->CreateSubNode(tm,plane[0]);
|
||||
root_node->CreateSubNode(tm,square[0]);
|
||||
}
|
||||
|
||||
{
|
||||
@ -135,7 +135,7 @@ bool InitGizmoScaleStaticMesh()
|
||||
|
||||
tm.SetScale(plane_scale);
|
||||
tm.SetTranslation(GIZMO_TWO_AXIS_OFFSET,0,GIZMO_TWO_AXIS_OFFSET);
|
||||
root_node->CreateSubNode(tm,plane[1]);
|
||||
root_node->CreateSubNode(tm,square[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ namespace
|
||||
using namespace inline_geometry;
|
||||
|
||||
{
|
||||
InitGizmoRenderable(GizmoShape::Plane,CreatePlane(gizmo_triangle.prim_creater),gizmo_triangle.pipeline);
|
||||
InitGizmoRenderable(GizmoShape::Square,CreatePlaneSqaure(gizmo_triangle.prim_creater),gizmo_triangle.pipeline);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
{
|
||||
PrimitiveCreater pc(device,material->GetDefaultVIL());
|
||||
|
||||
ro_plane=inline_geometry::CreatePlane(&pc);
|
||||
ro_plane=inline_geometry::CreatePlaneSqaure(&pc);
|
||||
|
||||
if(ro_plane)
|
||||
db->Add(ro_plane);
|
||||
|
@ -83,9 +83,9 @@ namespace hgl
|
||||
Primitive *CreatePlaneGrid3D(PrimitiveCreater *pc,const PlaneGridCreateInfo *pgci);
|
||||
|
||||
/**
|
||||
* 创建一个平面(三角形)
|
||||
* 创建一个平面正方形(三角形)
|
||||
*/
|
||||
Primitive *CreatePlane(PrimitiveCreater *pc);
|
||||
Primitive *CreatePlaneSqaure(PrimitiveCreater *pc);
|
||||
|
||||
struct CubeCreateInfo
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ namespace hgl
|
||||
return pc->Create();
|
||||
}
|
||||
|
||||
Primitive *CreatePlane(PrimitiveCreater *pc)
|
||||
Primitive *CreatePlaneSqaure(PrimitiveCreater *pc)
|
||||
{
|
||||
const float xy_vertices [] = { -0.5f,-0.5f,0.0f, +0.5f,-0.5f,0.0f, +0.5f,+0.5f,0.0f, -0.5f,+0.5f,0.0f };
|
||||
float xy_tex_coord[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f };
|
||||
|
Loading…
x
Reference in New Issue
Block a user