[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31679] branches/soc-2010-nicks/extern/ recastnavigation/Recast: Recast: remove unused files

Benoit Bolsee benoit.bolsee at online.be
Tue Aug 31 23:32:58 CEST 2010


Revision: 31679
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31679
Author:   ben2610
Date:     2010-08-31 23:32:58 +0200 (Tue, 31 Aug 2010)

Log Message:
-----------
Recast: remove unused files

Removed Paths:
-------------
    branches/soc-2010-nicks/extern/recastnavigation/Recast/Include/RecastDebugDraw.h
    branches/soc-2010-nicks/extern/recastnavigation/Recast/Source/RecastDebugDraw.cpp

Deleted: branches/soc-2010-nicks/extern/recastnavigation/Recast/Include/RecastDebugDraw.h
===================================================================
--- branches/soc-2010-nicks/extern/recastnavigation/Recast/Include/RecastDebugDraw.h	2010-08-31 15:12:24 UTC (rev 31678)
+++ branches/soc-2010-nicks/extern/recastnavigation/Recast/Include/RecastDebugDraw.h	2010-08-31 21:32:58 UTC (rev 31679)
@@ -1,59 +0,0 @@
-//
-// Copyright (c) 2009 Mikko Mononen memon at inside.org
-//
-// This software is provided 'as-is', without any express or implied
-// warranty.  In no event will the authors be held liable for any damages
-// arising from the use of this software.
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would be
-//    appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-//    misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-//
-
-#ifndef RECAST_DEBUGDRAW_H
-#define RECAST_DEBUGDRAW_H
-
-inline int bit(int a, int b)
-{
-	return (a & (1 << b)) >> b;
-}
-
-inline void intToCol(int i, float* col)
-{
-	int	r = bit(i, 0) + bit(i, 3) * 2 + 1;
-	int	g = bit(i, 1) + bit(i, 4) * 2 + 1;
-	int	b = bit(i, 2) + bit(i, 5) * 2 + 1;
-	col[0] = 1 - r*63.0f/255.0f;
-	col[1] = 1 - g*63.0f/255.0f;
-	col[2] = 1 - b*63.0f/255.0f;
-}
-
-void rcDebugDrawHeightfieldSolid(const struct rcHeightfield& hf);
-void rcDebugDrawHeightfieldWalkable(const struct rcHeightfield& hf);
-
-void rcDebugDrawMesh(const float* verts, int nverts, const int* tris, const float* normals, int ntris, const unsigned char* flags);
-void rcDebugDrawMeshSlope(const float* verts, int nverts, const int* tris, const float* normals, int ntris, const float walkableSlopeAngle);
-
-void rcDebugDrawCompactHeightfieldSolid(const struct rcCompactHeightfield& chf);
-void rcDebugDrawCompactHeightfieldRegions(const struct rcCompactHeightfield& chf);
-void rcDebugDrawCompactHeightfieldDistance(const struct rcCompactHeightfield& chf);
-
-void rcDebugDrawRegionConnections(const struct rcContourSet& cset, const float alpha = 1.0f);
-void rcDebugDrawRawContours(const struct rcContourSet& cset, const float alpha = 1.0f);
-void rcDebugDrawContours(const struct rcContourSet& cset, const float alpha = 1.0f);
-void rcDebugDrawPolyMesh(const struct rcPolyMesh& mesh);
-void rcDebugDrawPolyMeshDetail(const struct rcPolyMeshDetail& dmesh);
-
-void rcDebugDrawCylinderWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, const float* col);
-void rcDebugDrawBoxWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, const float* col);
-void rcDebugDrawBox(float minx, float miny, float minz, float maxx, float maxy, float maxz,
-					const float* col1, const float* col2);
-void rcDrawArc(const float* p0, const float* p1);
-
-#endif // RECAST_DEBUGDRAW_H

Deleted: branches/soc-2010-nicks/extern/recastnavigation/Recast/Source/RecastDebugDraw.cpp
===================================================================
--- branches/soc-2010-nicks/extern/recastnavigation/Recast/Source/RecastDebugDraw.cpp	2010-08-31 15:12:24 UTC (rev 31678)
+++ branches/soc-2010-nicks/extern/recastnavigation/Recast/Source/RecastDebugDraw.cpp	2010-08-31 21:32:58 UTC (rev 31679)
@@ -1,799 +0,0 @@
-//
-// Copyright (c) 2009 Mikko Mononen memon at inside.org
-//
-// This software is provided 'as-is', without any express or implied
-// warranty.  In no event will the authors be held liable for any damages
-// arising from the use of this software.
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-// 1. The origin of this software must not be misrepresented; you must not
-//    claim that you wrote the original software. If you use this software
-//    in a product, an acknowledgment in the product documentation would be
-//    appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-//    misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-//
-
-#define _USE_MATH_DEFINES
-#include <math.h>
-#include "RecastDebugDraw.h"
-#include "SDL.h"
-#include "SDL_Opengl.h"
-#include "MeshLoaderObj.h"
-#include "Recast.h"
-
-void rcDebugDrawMesh(const float* verts, int nverts,
-					 const int* tris, const float* normals, int ntris,
-					 const unsigned char* flags)
-{	
-	glBegin(GL_TRIANGLES);
-	for (int i = 0; i < ntris*3; i += 3)
-	{
-		float a = (2+normals[i+0]+normals[i+1])/4;
-		if (flags && !flags[i/3])
-			glColor3f(a,a*0.3f,a*0.1f);
-		else
-			glColor3f(a,a,a);
-		glVertex3fv(&verts[tris[i]*3]);
-		glVertex3fv(&verts[tris[i+1]*3]);
-		glVertex3fv(&verts[tris[i+2]*3]);
-	}
-	glEnd();
-}
-
-void rcDebugDrawMeshSlope(const float* verts, int nverts,
-						  const int* tris, const float* normals, int ntris,
-						  const float walkableSlopeAngle)
-{
-	const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI);
-	
-	glBegin(GL_TRIANGLES);
-	for (int i = 0; i < ntris*3; i += 3)
-	{
-		const float* norm = &normals[i];
-		float a = (2+norm[0]+norm[1])/4;
-		if (norm[1] > walkableThr)
-			glColor3f(a,a,a);
-		else
-			glColor3f(a,a*0.3f,a*0.1f);
-		glVertex3fv(&verts[tris[i]*3]);
-		glVertex3fv(&verts[tris[i+1]*3]);
-		glVertex3fv(&verts[tris[i+2]*3]);
-	}
-	glEnd();
-}
-
-void drawBoxWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, const float* col)
-{
-	glColor4fv(col);
-	
-	// Top
-	glVertex3f(minx, miny, minz);
-	glVertex3f(maxx, miny, minz);
-	glVertex3f(maxx, miny, minz);
-	glVertex3f(maxx, miny, maxz);
-	glVertex3f(maxx, miny, maxz);
-	glVertex3f(minx, miny, maxz);
-	glVertex3f(minx, miny, maxz);
-	glVertex3f(minx, miny, minz);
-	
-	// bottom
-	glVertex3f(minx, maxy, minz);
-	glVertex3f(maxx, maxy, minz);
-	glVertex3f(maxx, maxy, minz);
-	glVertex3f(maxx, maxy, maxz);
-	glVertex3f(maxx, maxy, maxz);
-	glVertex3f(minx, maxy, maxz);
-	glVertex3f(minx, maxy, maxz);
-	glVertex3f(minx, maxy, minz);
-	
-	// Sides
-	glVertex3f(minx, miny, minz);
-	glVertex3f(minx, maxy, minz);
-	glVertex3f(maxx, miny, minz);
-	glVertex3f(maxx, maxy, minz);
-	glVertex3f(maxx, miny, maxz);
-	glVertex3f(maxx, maxy, maxz);
-	glVertex3f(minx, miny, maxz);
-	glVertex3f(minx, maxy, maxz);
-}
-
-void drawBox(float minx, float miny, float minz, float maxx, float maxy, float maxz,
-			 const float* col1, const float* col2)
-{
-	float verts[8*3] =
-	{
-		minx, miny, minz,
-		maxx, miny, minz,
-		maxx, miny, maxz,
-		minx, miny, maxz,
-		minx, maxy, minz,
-		maxx, maxy, minz,
-		maxx, maxy, maxz,
-		minx, maxy, maxz,
-	};
-	static const float dim[6] =
-	{
-		0.95f, 0.55f, 0.65f, 0.85f, 0.65f, 0.85f, 
-	};
-	static const unsigned char inds[6*5] =
-	{
-		0,  7, 6, 5, 4,
-		1,  0, 1, 2, 3,
-		2,  1, 5, 6, 2,
-		3,  3, 7, 4, 0,
-		4,  2, 6, 7, 3,
-		5,  0, 4, 5, 1,
-	};
-	
-	const unsigned char* in = inds;
-	for (int i = 0; i < 6; ++i)
-	{
-		float d = dim[*in]; in++;
-		if (i == 0)
-			glColor4f(d*col2[0],d*col2[1],d*col2[2], col2[3]);
-		else
-			glColor4f(d*col1[0],d*col1[1],d*col1[2], col1[3]);
-		glVertex3fv(&verts[*in*3]); in++;
-		glVertex3fv(&verts[*in*3]); in++;
-		glVertex3fv(&verts[*in*3]); in++;
-		glVertex3fv(&verts[*in*3]); in++;
-	}
-}
-
-void rcDebugDrawCylinderWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, const float* col)
-{
-	static const int NUM_SEG = 16;
-	float dir[NUM_SEG*2];
-	for (int i = 0; i < NUM_SEG; ++i)
-	{
-		const float a = (float)i/(float)NUM_SEG*(float)M_PI*2;
-		dir[i*2] = cosf(a);
-		dir[i*2+1] = sinf(a);
-	}
-
-	const float cx = (maxx + minx)/2;
-	const float cz = (maxz + minz)/2;
-	const float rx = (maxx - minx)/2;
-	const float rz = (maxz - minz)/2;
-	
-	glColor4fv(col);
-	glBegin(GL_LINES);
-	for (int i = 0, j=NUM_SEG-1; i < NUM_SEG; j=i++)
-	{
-		glVertex3f(cx+dir[j*2+0]*rx, miny, cz+dir[j*2+1]*rz);
-		glVertex3f(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz);
-		glVertex3f(cx+dir[j*2+0]*rx, maxy, cz+dir[j*2+1]*rz);
-		glVertex3f(cx+dir[i*2+0]*rx, maxy, cz+dir[i*2+1]*rz);
-	}
-	for (int i = 0; i < NUM_SEG; i += NUM_SEG/4)
-	{
-		glVertex3f(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz);
-		glVertex3f(cx+dir[i*2+0]*rx, maxy, cz+dir[i*2+1]*rz);
-	}
-	glEnd();
-}
-
-void rcDebugDrawBoxWire(float minx, float miny, float minz, float maxx, float maxy, float maxz, const float* col)
-{
-	glBegin(GL_LINES);
-	drawBoxWire(minx, miny, minz, maxx, maxy, maxz, col);
-	glEnd();
-}
-
-void rcDebugDrawBox(float minx, float miny, float minz, float maxx, float maxy, float maxz,
-					const float* col1, const float* col2)
-{
-	glBegin(GL_QUADS);
-	drawBox(minx, miny, minz, maxx, maxy, maxz, col1, col2);
-	glEnd();
-}
-
-
-void rcDebugDrawHeightfieldSolid(const rcHeightfield& hf)
-{
-	static const float col0[4] = { 1,1,1,1 };
-	
-	const float* orig = hf.bmin;
-	const float cs = hf.cs;
-	const float ch = hf.ch;
-	
-	const int w = hf.width;
-	const int h = hf.height;
-	
-	glBegin(GL_QUADS);
-	
-	for (int y = 0; y < h; ++y)
-	{
-		for (int x = 0; x < w; ++x)
-		{
-			float fx = orig[0] + x*cs;
-			float fz = orig[2] + y*cs;
-			const rcSpan* s = hf.spans[x + y*w];
-			while (s)
-			{
-				drawBox(fx, orig[1]+s->smin*ch, fz, fx+cs, orig[1] + s->smax*ch, fz+cs, col0, col0);
-				s = s->next;
-			}
-		}
-	}
-	glEnd();
-}
-
-void rcDebugDrawHeightfieldWalkable(const rcHeightfield& hf)
-{
-	static const float col0[4] = { 1,1,1,1 };
-	static const float col1[4] = { 0.25f,0.44f,0.5f,1 };
-	
-	const float* orig = hf.bmin;
-	const float cs = hf.cs;
-	const float ch = hf.ch;
-	
-	const int w = hf.width;
-	const int h = hf.height;
-	
-	glBegin(GL_QUADS);
-	
-	for (int y = 0; y < h; ++y)
-	{
-		for (int x = 0; x < w; ++x)
-		{
-			float fx = orig[0] + x*cs;
-			float fz = orig[2] + y*cs;
-			const rcSpan* s = hf.spans[x + y*w];
-			while (s)
-			{
-				bool csel = (s->flags & 0x1) == 0;
-				drawBox(fx, orig[1]+s->smin*ch, fz, fx+cs, orig[1] + s->smax*ch, fz+cs, col0, csel ? col0 : col1);
-				s = s->next;
-			}
-		}
-	}
-	glEnd();
-}
-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list