Esempio n. 1
0
		public static void btTransformAabb( ref btVector3 halfExtents, double margin,  btITransform t
				, out btVector3 aabbMinOut, out btVector3 aabbMaxOut )
		{
			btVector3 halfExtentsWithMargin; halfExtents.AddScale( ref btVector3.One, margin, out halfExtentsWithMargin );
			btMatrix3x3 abs_b; t.getBasis().absolute( out abs_b );
			btVector3 extent; halfExtentsWithMargin.dot3( ref abs_b.m_el0, ref abs_b.m_el1, ref abs_b.m_el2, out extent );
			t.m_origin.Sub( ref extent, out aabbMinOut );
			t.m_origin.Add( ref extent, out aabbMaxOut );
		}
Esempio n. 2
0
		public void inverseTimes( btITransform t, out btTransform result )
		{
			btVector3 v;
			t.getOrigin().Sub( ref m_origin, out v );
			btMatrix3x3 m;
			t.getBasis( out m );
			m_basis.transposeTimes( ref m, out result.m_basis );
			m_basis.ApplyInverse( ref v, out result.m_origin );
		}
Esempio n. 3
0
		///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
		void getAabb( btITransform t, out btVector3 aabbMin, out btVector3 aabbMax );
Esempio n. 4
0
		public void Apply( btITransform t2, out btTransform result )
		{
			m_basis.Apply( t2.getBasis(), out result.m_basis );
			Apply( t2.getOrigin(), out result.m_origin );
		}