From 3148eec68533253866559a774939584b30e62c73 Mon Sep 17 00:00:00 2001 From: chronokun Date: Wed, 22 Jul 2015 15:32:02 +1200 Subject: [PATCH] Fixed bug(? kinda) with plane clipping points being too close together for gtkradiant's liking. --- ReflexToQ3/main.cpp | 4 ++-- ReflexToQ3/testout.map | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 ReflexToQ3/testout.map diff --git a/ReflexToQ3/main.cpp b/ReflexToQ3/main.cpp index 9b5ff67..fe92788 100644 --- a/ReflexToQ3/main.cpp +++ b/ReflexToQ3/main.cpp @@ -32,10 +32,10 @@ TPlanePoints GetPlanePoints(const TVector3f* _kpPoints, const size_t _kNumPoints const TVector3f kCenter = ScalarMultiply(TVector3f(), Temp, (1.0f / (float)_kNumPoints)); // Find Tangent - const TVector3f kTangent = Normalize(TVector3f(), Subtract(TVector3f(), _kpPoints[1], _kpPoints[0])); + const TVector3f kTangent = ScalarMultiply(TVector3f(), Normalize(TVector3f(), Subtract(TVector3f(), _kpPoints[1], _kpPoints[0])), 128.0f); // Find BiTangent - const TVector3f kBiTangent = Normalize(TVector3f(), CrossProduct(TVector3f(), kNormal, kTangent)); + const TVector3f kBiTangent = ScalarMultiply(TVector3f(), Normalize(TVector3f(), CrossProduct(TVector3f(), kNormal, kTangent)), 128.0f); PlanePoints.m_A = Add(TVector3f(), kCenter, kBiTangent); PlanePoints.m_B = kCenter; diff --git a/ReflexToQ3/testout.map b/ReflexToQ3/testout.map new file mode 100644 index 0000000..b4f42e4 --- /dev/null +++ b/ReflexToQ3/testout.map @@ -0,0 +1,40 @@ +reflex map version 6 +entity + type WorldSpawn +brush + vertices + -256.000000 0.000000 256.000000 + 256.000000 0.000000 256.000000 + 256.000000 0.000000 -256.000000 + -256.000000 0.000000 -256.000000 + -256.000000 -16.000000 256.000000 + 256.000000 -16.000000 256.000000 + 256.000000 -16.000000 -256.000000 + -256.000000 -16.000000 -256.000000 + faces + 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 3 + 0.000000 0.000000 1.000000 1.000000 0.000000 6 5 4 7 + 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 6 + 0.000000 0.000000 1.000000 1.000000 0.000000 0 3 7 4 + 0.000000 0.000000 1.000000 1.000000 0.000000 3 2 6 7 + 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 4 5 +brush + vertices + -64.000000 64.000000 256.000000 + 64.000000 64.000000 256.000000 + 64.000000 0.000000 128.000000 + -64.000000 0.000000 256.000000 + -64.000000 0.000000 128.000000 + 64.000000 0.000000 256.000000 + faces + 0.000000 0.000000 1.000000 1.000000 0.000000 3 0 4 + 0.000000 0.000000 1.000000 1.000000 0.000000 2 1 5 + 0.000000 0.000000 1.000000 1.000000 0.000000 0 1 2 4 + 0.000000 0.000000 1.000000 1.000000 0.000000 1 0 3 5 + 0.000000 0.000000 1.000000 1.000000 0.000000 3 4 2 5 +entity + type PlayerSpawn +entity + type CameraPath + UInt8 posLerp 2 + UInt8 angleLerp 2