From 104ad1eaba7ada2d5f9b18ced70d06721908f0be Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 1 Oct 2021 23:18:37 +0200 Subject: Removed unused OpcodeLib --- Opcode/OpcodeLib/Ice/IceSegment.cpp | 57 ------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 Opcode/OpcodeLib/Ice/IceSegment.cpp (limited to 'Opcode/OpcodeLib/Ice/IceSegment.cpp') diff --git a/Opcode/OpcodeLib/Ice/IceSegment.cpp b/Opcode/OpcodeLib/Ice/IceSegment.cpp deleted file mode 100644 index ae99384..0000000 --- a/Opcode/OpcodeLib/Ice/IceSegment.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains code for segments. - * \file IceSegment.cpp - * \author Pierre Terdiman - * \date April, 4, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * IceSegment class. - * A segment is defined by S(t) = mP0 * (1 - t) + mP1 * t, with 0 <= t <= 1 - * Alternatively, a segment is S(t) = Origin + t * Direction for 0 <= t <= 1. - * Direction is not necessarily unit length. The end points are Origin = mP0 and Origin + Direction = mP1. - * - * \class IceSegment - * \author Pierre Terdiman - * \version 1.0 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Precompiled Header -#include "Stdafx.h" - -using namespace IceMaths; - -float IceSegment::SquareDistance(const IcePoint& point, float* t) const -{ - IcePoint Diff = point - mP0; - IcePoint Dir = mP1 - mP0; - float fT = Diff | Dir; - - if(fT<=0.0f) - { - fT = 0.0f; - } - else - { - float SqrLen= Dir.SquareMagnitude(); - if(fT>=SqrLen) - { - fT = 1.0f; - Diff -= Dir; - } - else - { - fT /= SqrLen; - Diff -= fT*Dir; - } - } - - if(t) *t = fT; - - return Diff.SquareMagnitude(); -} -- cgit v1.1