From fd56496e616a670b0d5fbe9a584b656a8a2e70e7 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 2 Nov 2015 14:24:50 -0600 Subject: [PATCH 1/3] recolor and rescale for path marker representations to make those easier toi distinguish and interact with --- Engine/source/scene/simPath.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Engine/source/scene/simPath.cpp b/Engine/source/scene/simPath.cpp index c25764ad1..eaad906d3 100644 --- a/Engine/source/scene/simPath.cpp +++ b/Engine/source/scene/simPath.cpp @@ -296,11 +296,11 @@ void Marker::initGFXResources() smVertexBuffer.set(GFX, 4, GFXBufferTypeStatic); GFXVertexPC* verts = smVertexBuffer.lock(); - verts[0].point = wedgePoints[0] * 0.25f; - verts[1].point = wedgePoints[1] * 0.25f; - verts[2].point = wedgePoints[2] * 0.25f; - verts[3].point = wedgePoints[3] * 0.25f; - verts[0].color = verts[1].color = verts[2].color = verts[3].color = GFXVertexColor(ColorI(0, 255, 0, 255)); + verts[0].point = wedgePoints[0] * 1.25f; + verts[1].point = wedgePoints[1] * 1.25f; + verts[2].point = wedgePoints[2] * 1.25f; + verts[3].point = wedgePoints[3] * 1.25f; + verts[0].color = verts[1].color = verts[2].color = verts[3].color = GFXVertexColor(ColorI(255, 0, 0, 255)); smVertexBuffer.unlock(); smPrimitiveBuffer.set(GFX, 24, 12, GFXBufferTypeStatic); @@ -417,7 +417,7 @@ bool Marker::onAdd() if(!Parent::onAdd()) return false; - mObjBox = Box3F(Point3F(-.25, -.25, -.25), Point3F(.25, .25, .25)); + mObjBox = Box3F(Point3F(-1.25, -1.25, -1.25), Point3F(1.25, 1.25, 1.25)); resetWorldBox(); if(gEditingMission) From aacbd5d2bce3ab4bf7ffaec1d5504a5977aeb587 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 2 Nov 2015 14:57:26 -0600 Subject: [PATCH 2/3] red to blue so you can easier tell which way the triangle is pointing at a glance --- Engine/source/scene/simPath.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Engine/source/scene/simPath.cpp b/Engine/source/scene/simPath.cpp index eaad906d3..edf7b1051 100644 --- a/Engine/source/scene/simPath.cpp +++ b/Engine/source/scene/simPath.cpp @@ -300,7 +300,9 @@ void Marker::initGFXResources() verts[1].point = wedgePoints[1] * 1.25f; verts[2].point = wedgePoints[2] * 1.25f; verts[3].point = wedgePoints[3] * 1.25f; - verts[0].color = verts[1].color = verts[2].color = verts[3].color = GFXVertexColor(ColorI(255, 0, 0, 255)); + verts[1].color = GFXVertexColor(ColorI(255, 0, 0, 255)); + verts[0].color = verts[2].color = verts[3].color = GFXVertexColor(ColorI(0, 0, 255, 255)); + smVertexBuffer.unlock(); smPrimitiveBuffer.set(GFX, 24, 12, GFXBufferTypeStatic); From 1c23583fbadd0ee47850f93b4deef6861def237c Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 2 Nov 2015 15:12:49 -0600 Subject: [PATCH 3/3] world editor spline lerp display. advancedist controls size between steps. highlighted the tip of the arrows --- Engine/source/gui/worldEditor/worldEditor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index 0273ffeb4..0ff5ff8c7 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/Engine/source/gui/worldEditor/worldEditor.cpp @@ -1303,7 +1303,7 @@ void WorldEditor::renderObjectFace(SceneObject * obj, const VectorF & normal, co PrimBuild::color( col ); - PrimBuild::begin( GFXTriangleFan, 4 ); + PrimBuild::begin( GFXTriangleStrip, 4 ); for(U32 k = 0; k < 4; k++) { PrimBuild::vertex3f(projPnts[k].x, projPnts[k].y, projPnts[k].z); @@ -1492,7 +1492,7 @@ void WorldEditor::renderSplinePath(SimPath::Path *path) F32 tmpT = t; while (tmpT < size - 1) { - tmpT = spline.advanceDist(tmpT, 4.0f); + tmpT = spline.advanceDist(tmpT, 1.0f); vCount++; } @@ -1514,7 +1514,7 @@ void WorldEditor::renderSplinePath(SimPath::Path *path) { CameraSpline::Knot k; spline.value(t, &k); - t = spline.advanceDist(t, 4.0f); + t = spline.advanceDist(t, 1.0f); k.mRotation.mulP(a, &vb[vIdx+0].point); k.mRotation.mulP(b, &vb[vIdx+1].point); @@ -1524,9 +1524,9 @@ void WorldEditor::renderSplinePath(SimPath::Path *path) vb[vIdx+1].point += k.mPosition; vb[vIdx+2].point += k.mPosition; - vb[vIdx+0].color.set(0, 255, 0, 100); - vb[vIdx+1].color.set(0, 255, 0, 100); - vb[vIdx+2].color.set(0, 255, 0, 100); + vb[vIdx+0].color.set(0, 255, 0, 0); + vb[vIdx+1].color.set(0, 255, 0, 255); + vb[vIdx+2].color.set(0, 255, 0, 0); // vb[vIdx+3] = vb[vIdx+1];