2
* Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
4
* Permission to use, copy, modify, distribute and sell this software
5
* and its documentation for any purpose is hereby granted without fee,
6
* provided that the above copyright notice appear in all copies.
7
* Erwin Coumans makes no representations about the suitability
8
* of this software for any purpose.
9
* It is provided "as is" without express or implied warranty.
11
#include "MinkowskiSumShape.h"
14
MinkowskiSumShape::MinkowskiSumShape(ConvexShape* shapeA,ConvexShape* shapeB)
18
m_transA.setIdentity();
19
m_transB.setIdentity();
22
SimdVector3 MinkowskiSumShape::LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const
24
SimdVector3 supVertexA = m_transA(m_shapeA->LocalGetSupportingVertexWithoutMargin(vec*m_transA.getBasis()));
25
SimdVector3 supVertexB = m_transB(m_shapeB->LocalGetSupportingVertexWithoutMargin(vec*m_transB.getBasis()));
26
return supVertexA + supVertexB;
29
float MinkowskiSumShape::GetMargin() const
31
return m_shapeA->GetMargin() + m_shapeB->GetMargin();
35
void MinkowskiSumShape::CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia)
38
inertia.setValue(0,0,0);