no 'const int' but inline for a few methods
remove redundant/unreachable 'breaks'
This commit is contained in:
@@ -295,7 +295,7 @@ public:
|
|||||||
return m_interpolationAngularVelocity;
|
return m_interpolationAngularVelocity;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int getIslandTag() const
|
SIMD_FORCE_INLINE int getIslandTag() const
|
||||||
{
|
{
|
||||||
return m_islandTag1;
|
return m_islandTag1;
|
||||||
}
|
}
|
||||||
@@ -305,7 +305,7 @@ public:
|
|||||||
m_islandTag1 = tag;
|
m_islandTag1 = tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int getCompanionId() const
|
SIMD_FORCE_INLINE int getCompanionId() const
|
||||||
{
|
{
|
||||||
return m_companionId;
|
return m_companionId;
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,7 @@ public:
|
|||||||
m_companionId = id;
|
m_companionId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const btScalar getHitFraction() const
|
SIMD_FORCE_INLINE btScalar getHitFraction() const
|
||||||
{
|
{
|
||||||
return m_hitFraction;
|
return m_hitFraction;
|
||||||
}
|
}
|
||||||
@@ -326,7 +326,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const int getCollisionFlags() const
|
SIMD_FORCE_INLINE int getCollisionFlags() const
|
||||||
{
|
{
|
||||||
return m_collisionFlags;
|
return m_collisionFlags;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
{
|
{
|
||||||
return btVector3(0,0,0);
|
return btVector3(0,0,0);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case BOX_SHAPE_PROXYTYPE:
|
case BOX_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btBoxShape* convexShape = (btBoxShape*)this;
|
btBoxShape* convexShape = (btBoxShape*)this;
|
||||||
@@ -81,7 +80,6 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
btFsels(localDir.y(), halfExtents.y(), -halfExtents.y()),
|
btFsels(localDir.y(), halfExtents.y(), -halfExtents.y()),
|
||||||
btFsels(localDir.z(), halfExtents.z(), -halfExtents.z()));
|
btFsels(localDir.z(), halfExtents.z(), -halfExtents.z()));
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case TRIANGLE_SHAPE_PROXYTYPE:
|
case TRIANGLE_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
||||||
@@ -91,7 +89,6 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
btVector3 sup = vertices[dots.maxAxis()];
|
btVector3 sup = vertices[dots.maxAxis()];
|
||||||
return btVector3(sup.getX(),sup.getY(),sup.getZ());
|
return btVector3(sup.getX(),sup.getY(),sup.getZ());
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CYLINDER_SHAPE_PROXYTYPE:
|
case CYLINDER_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btCylinderShape* cylShape = (btCylinderShape*)this;
|
btCylinderShape* cylShape = (btCylinderShape*)this;
|
||||||
@@ -152,7 +149,6 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
return btVector3(tmp.getX(),tmp.getY(),tmp.getZ());
|
return btVector3(tmp.getX(),tmp.getY(),tmp.getZ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CAPSULE_SHAPE_PROXYTYPE:
|
case CAPSULE_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btVector3 vec0(localDir.getX(),localDir.getY(),localDir.getZ());
|
btVector3 vec0(localDir.getX(),localDir.getY(),localDir.getZ());
|
||||||
@@ -209,7 +205,6 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
}
|
}
|
||||||
return btVector3(supVec.getX(),supVec.getY(),supVec.getZ());
|
return btVector3(supVec.getX(),supVec.getY(),supVec.getZ());
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
|
case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btConvexPointCloudShape* convexPointCloudShape = (btConvexPointCloudShape*)this;
|
btConvexPointCloudShape* convexPointCloudShape = (btConvexPointCloudShape*)this;
|
||||||
@@ -224,14 +219,12 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
|
|||||||
int numPoints = convexHullShape->getNumPoints ();
|
int numPoints = convexHullShape->getNumPoints ();
|
||||||
return convexHullSupport (localDir, points, numPoints,convexHullShape->getLocalScalingNV());
|
return convexHullSupport (localDir, points, numPoints,convexHullShape->getLocalScalingNV());
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
#ifndef __SPU__
|
#ifndef __SPU__
|
||||||
return this->localGetSupportingVertexWithoutMargin (localDir);
|
return this->localGetSupportingVertexWithoutMargin (localDir);
|
||||||
#else
|
#else
|
||||||
btAssert (0);
|
btAssert (0);
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// should never reach here
|
// should never reach here
|
||||||
@@ -261,31 +254,26 @@ btScalar btConvexShape::getMarginNonVirtual () const
|
|||||||
btSphereShape* sphereShape = (btSphereShape*)this;
|
btSphereShape* sphereShape = (btSphereShape*)this;
|
||||||
return sphereShape->getRadius ();
|
return sphereShape->getRadius ();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case BOX_SHAPE_PROXYTYPE:
|
case BOX_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btBoxShape* convexShape = (btBoxShape*)this;
|
btBoxShape* convexShape = (btBoxShape*)this;
|
||||||
return convexShape->getMarginNV ();
|
return convexShape->getMarginNV ();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case TRIANGLE_SHAPE_PROXYTYPE:
|
case TRIANGLE_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
||||||
return triangleShape->getMarginNV ();
|
return triangleShape->getMarginNV ();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CYLINDER_SHAPE_PROXYTYPE:
|
case CYLINDER_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btCylinderShape* cylShape = (btCylinderShape*)this;
|
btCylinderShape* cylShape = (btCylinderShape*)this;
|
||||||
return cylShape->getMarginNV();
|
return cylShape->getMarginNV();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CAPSULE_SHAPE_PROXYTYPE:
|
case CAPSULE_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
|
btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
|
||||||
return capsuleShape->getMarginNV();
|
return capsuleShape->getMarginNV();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
|
case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case CONVEX_HULL_SHAPE_PROXYTYPE:
|
case CONVEX_HULL_SHAPE_PROXYTYPE:
|
||||||
@@ -293,14 +281,12 @@ btScalar btConvexShape::getMarginNonVirtual () const
|
|||||||
btPolyhedralConvexShape* convexHullShape = (btPolyhedralConvexShape*)this;
|
btPolyhedralConvexShape* convexHullShape = (btPolyhedralConvexShape*)this;
|
||||||
return convexHullShape->getMarginNV();
|
return convexHullShape->getMarginNV();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
#ifndef __SPU__
|
#ifndef __SPU__
|
||||||
return this->getMargin ();
|
return this->getMargin ();
|
||||||
#else
|
#else
|
||||||
btAssert (0);
|
btAssert (0);
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// should never reach here
|
// should never reach here
|
||||||
@@ -339,7 +325,6 @@ void btConvexShape::getAabbNonVirtual (const btTransform& t, btVector3& aabbMin,
|
|||||||
aabbMax = center + extent;
|
aabbMax = center + extent;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case TRIANGLE_SHAPE_PROXYTYPE:
|
case TRIANGLE_SHAPE_PROXYTYPE:
|
||||||
{
|
{
|
||||||
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
btTriangleShape* triangleShape = (btTriangleShape*)this;
|
||||||
|
|||||||
Reference in New Issue
Block a user