mirror of
https://github.com/SWG-Source/src.git
synced 2026-10-10 02:13:27 -04:00
Removed STLport requirement
This commit is contained in:
@@ -913,7 +913,7 @@ void BuildConvexHull ( VertexList const & verts, VertexList & outPoly )
|
||||
|
||||
int count = verts.size();
|
||||
|
||||
BuildConvexHull( sortedVerts.begin(), count, outPoly );
|
||||
BuildConvexHull( &sortedVerts.front(), count, outPoly );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@@ -1512,7 +1512,7 @@ bool CalcAvoidancePoints3d ( Sphere const & mob, Vector const & delta, Sphere co
|
||||
|
||||
Vector I,J;
|
||||
|
||||
if(abs(K.y) > 0.95)
|
||||
if(std::abs(K.y) > 0.95)
|
||||
{
|
||||
// line A-B is almost vertical, build orthonormal basis using X axis
|
||||
|
||||
@@ -1781,14 +1781,14 @@ bool testPortalVis ( CellProperty const * cellA, Vector const & pointA, CellProp
|
||||
|
||||
bool epsilonEqual ( Sphere const & A, Sphere const & B, float epsilon )
|
||||
{
|
||||
if(abs(A.getRadius() - B.getRadius()) > epsilon) return false;
|
||||
if(std::abs(A.getRadius() - B.getRadius()) > epsilon) return false;
|
||||
|
||||
Vector cA = A.getCenter();
|
||||
Vector cB = B.getCenter();
|
||||
|
||||
if(abs(cA.x - cB.x) > epsilon) return false;
|
||||
if(abs(cA.y - cB.y) > epsilon) return false;
|
||||
if(abs(cA.z - cB.z) > epsilon) return false;
|
||||
if(std::abs(cA.x - cB.x) > epsilon) return false;
|
||||
if(std::abs(cA.y - cB.y) > epsilon) return false;
|
||||
if(std::abs(cA.z - cB.z) > epsilon) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -718,9 +718,9 @@ Range ProjectAxis ( Line3d const & L, AxialBox const & B )
|
||||
Vector const & N = L.getNormal();
|
||||
Vector extent = B.getDelta();
|
||||
|
||||
real x = abs( Collision3d::ComponentAlong( Vector::unitX, N ) ) * extent.x;
|
||||
real y = abs( Collision3d::ComponentAlong( Vector::unitY, N ) ) * extent.y;
|
||||
real z = abs( Collision3d::ComponentAlong( Vector::unitZ, N ) ) * extent.z;
|
||||
real x = std::abs( Collision3d::ComponentAlong( Vector::unitX, N ) ) * extent.x;
|
||||
real y = std::abs( Collision3d::ComponentAlong( Vector::unitY, N ) ) * extent.y;
|
||||
real z = std::abs( Collision3d::ComponentAlong( Vector::unitZ, N ) ) * extent.z;
|
||||
|
||||
real d = x + y + z;
|
||||
|
||||
@@ -735,9 +735,9 @@ Range ProjectAxis ( Line3d const & L, OrientedBox const & B )
|
||||
{
|
||||
Vector const & N = L.getNormal();
|
||||
|
||||
real x = abs( Collision3d::ComponentAlong( B.getAxisX(), N ) ) * B.getExtentX();
|
||||
real y = abs( Collision3d::ComponentAlong( B.getAxisY(), N ) ) * B.getExtentY();
|
||||
real z = abs( Collision3d::ComponentAlong( B.getAxisZ(), N ) ) * B.getExtentZ();
|
||||
real x = std::abs( Collision3d::ComponentAlong( B.getAxisX(), N ) ) * B.getExtentX();
|
||||
real y = std::abs( Collision3d::ComponentAlong( B.getAxisY(), N ) ) * B.getExtentY();
|
||||
real z = std::abs( Collision3d::ComponentAlong( B.getAxisZ(), N ) ) * B.getExtentZ();
|
||||
|
||||
real d = x + y + z;
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "sharedObject/Portal.h"
|
||||
#include "sharedObject/Tweakable.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
static VectorArgb gs_forceFieldColor(0.6f,0.5f,0.5f,1.0f);
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -1614,7 +1614,7 @@ bool FloorMesh::findFloorTri ( FloorLocator const & testLoc,
|
||||
|
||||
// ----------
|
||||
|
||||
if(abs(dist) < gs_hopTolerance)
|
||||
if(std::abs(dist) < gs_hopTolerance)
|
||||
{
|
||||
// Floor tri is above the test point but within the hop
|
||||
// tolerance and we're allowing hops - we can hop up onto it.
|
||||
@@ -2911,7 +2911,7 @@ PathWalkResult FloorMesh::pathWalkCircleGetIds ( FloorLocator const & inStartLoc
|
||||
{
|
||||
float stepDistance = delta.magnitude();
|
||||
|
||||
float contactDist = abs(stepDistance * circleHitTime);
|
||||
float contactDist = std::abs(stepDistance * circleHitTime);
|
||||
|
||||
if((circleHitTime < 0) && (contactDist > wallEpsilon))
|
||||
{
|
||||
@@ -3619,8 +3619,8 @@ bool FloorMesh::dropTest ( FloorLocator const & testLoc, float hopHeight, FloorL
|
||||
|
||||
if( findClosestPair(line,-1,closestBelow,closestAbove) )
|
||||
{
|
||||
float distBelow = abs(closestBelow.getOffset());
|
||||
float distAbove = abs(closestAbove.getOffset());
|
||||
float distBelow = std::abs(closestBelow.getOffset());
|
||||
float distAbove = std::abs(closestAbove.getOffset());
|
||||
|
||||
closestAbove.setSurface(this);
|
||||
closestBelow.setSurface(this);
|
||||
@@ -3701,7 +3701,7 @@ bool FloorMesh::dropTest ( FloorLocator const & testLoc, int triID, FloorLocator
|
||||
|
||||
if(testIntersect(line,triID,tempLoc))
|
||||
{
|
||||
float absDist = abs(tempLoc.getOffset());
|
||||
float absDist = std::abs(tempLoc.getOffset());
|
||||
|
||||
if(absDist <= ConfigSharedCollision::getHopHeight())
|
||||
{
|
||||
|
||||
@@ -461,7 +461,7 @@ bool TestTriTri ( Triangle3d const & A, Triangle3d const & B )
|
||||
|
||||
bool TestSpherePlane ( Sphere const & A, Plane3d const & B )
|
||||
{
|
||||
float dist = abs(Distance3d::DistancePointPlane(A.getCenter(),B));
|
||||
float dist = std::abs(Distance3d::DistancePointPlane(A.getCenter(),B));
|
||||
|
||||
return dist <= A.getRadius();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user