Esempio n. 1
0
		public static bool Equals( int3 a, int3 b )
		{
			if( a.x != b.x ) return false;
			if( a.y != b.y ) return false;
			if( a.z != b.z ) return false;
			return true;
		}
Esempio n. 2
0
		public bool Equals( int3 b )
		{
			if( x != b.x ) return false;
			if( y != b.y ) return false;
			if( z != b.z ) return false;
			return true;
		}
Esempio n. 3
0
			public btHullTriangle( int a, int b, int c )
			{
				v = new int3( a, b, c );
				n = new int3( -1, -1, -1 );
				vmax = -1;
				rise = 0.0;
			}
Esempio n. 4
0
		int shareedge( int3 a, int3 b )
		{
			int i;
			for( i = 0; i < 3; i++ )
			{
				int i1 = ( i + 1 ) % 3;
				if( hasedge( a, b[i1], b[i] ) ) return 1;
			}
			return 0;
		}
Esempio n. 5
0
		static bool hasvert( int3 t, int v )
		{
			return ( t[0] == v || t[1] == v || t[2] == v );
		}
Esempio n. 6
0
		static bool hasedge( int3 t, int a, int b )
		{
			for( int i = 0; i < 3; i++ )
			{
				int i1 = ( i + 1 ) % 3;
				if( t[i] == a && t[i1] == b ) return true;
			}
			return false;
		}
Esempio n. 7
0
		static bool above( btVector3[] vertices, int3 t, ref btVector3 p, double epsilon )
		{
			btVector3 n;
			btPlane.TriNormal( ref vertices[t[0]], ref vertices[t[1]], ref vertices[t[2]], out n );
			p.Sub( ref vertices[t[0]], out p );
			return ( n.dot( ref p ) > epsilon ); // btScalar.SIMD_EPSILON???
		}