fix Mac OSX build (compound-compound still broken on OSX)

remove operator= from b3Vector3 to make it POD/Plane Old Data
This commit is contained in:
Erwin Coumans
2013-08-20 12:45:05 -07:00
parent 677722bba3
commit d860e7f51a
5 changed files with 13 additions and 55 deletions

View File

@@ -109,7 +109,7 @@ void GpuRigidBodyDemo::initPhysics(const ConstructionInfo& ci)
m_data->m_config.m_maxConvexBodies = b3Max(m_data->m_config.m_maxConvexBodies,ci.arraySizeX*ci.arraySizeY*ci.arraySizeZ+10);
m_data->m_config.m_maxConvexShapes = m_data->m_config.m_maxConvexBodies;
m_data->m_config.m_maxBroadphasePairs = 32*m_data->m_config.m_maxConvexBodies;
m_data->m_config.m_maxBroadphasePairs = 16*m_data->m_config.m_maxConvexBodies;
m_data->m_config.m_maxContactCapacity = m_data->m_config.m_maxBroadphasePairs;

View File

@@ -16,8 +16,8 @@ subject to the following restrictions:
///todo: make this configurable in the gui
bool useShadowMap=true;
float shadowMapWidth=8192;
float shadowMapHeight=8192;
float shadowMapWidth=4096;
float shadowMapHeight=4096;
float shadowMapWorldSize=300;
float WHEEL_MULTIPLIER=3.f;
float MOUSE_MOVE_MULTIPLIER = 0.4f;

View File

@@ -255,9 +255,9 @@ public:
V2 = V2 + b3v0100;
V3 = V3 + b3v0010;
m_el[0] = V1;
m_el[1] = V2;
m_el[2] = V3;
m_el[0] = b3MakeVector3(V1);
m_el[1] = b3MakeVector3(V2);
m_el[2] = b3MakeVector3(V3);
#else
b3Scalar xs = q.getX() * s, ys = q.getY() * s, zs = q.getZ() * s;
b3Scalar wx = q.getW() * xs, wy = q.getW() * ys, wz = q.getW() * zs;
@@ -312,9 +312,9 @@ public:
void setIdentity()
{
#if (defined(B3_USE_SSE_IN_API)&& defined (B3_USE_SSE)) || defined(B3_USE_NEON)
m_el[0] = b3v1000;
m_el[1] = b3v0100;
m_el[2] = b3v0010;
m_el[0] = b3MakeVector3(b3v1000);
m_el[1] = b3MakeVector3(b3v0100);
m_el[2] = b3MakeVector3(b3v0010);
#else
setValue(b3Scalar(1.0), b3Scalar(0.0), b3Scalar(0.0),
b3Scalar(0.0), b3Scalar(1.0), b3Scalar(0.0),
@@ -1164,7 +1164,7 @@ operator*(const b3Vector3& v, const b3Matrix3x3& m)
c0 = _mm_add_ps(c0, c1);
c2 = _mm_mul_ps(c2, _mm_and_ps(m[2].mVec128, b3vFFF0fMask) );
return b3Vector3(_mm_add_ps(c0, c2));
return b3MakeVector3(_mm_add_ps(c0, c2));
#elif defined(B3_USE_NEON)
const float32x4_t vv = v.mVec128;
const float32x2_t vlo = vget_low_f32(vv);
@@ -1182,7 +1182,7 @@ operator*(const b3Vector3& v, const b3Matrix3x3& m)
c0 = vaddq_f32(c0, c1);
c0 = vaddq_f32(c0, c2);
return b3Vector3(c0);
return b3MakeVector3(c0);
#else
return b3MakeVector3(m.tdotx(v), m.tdoty(v), m.tdotz(v));
#endif

View File

@@ -844,9 +844,9 @@ b3QuatRotate(const b3Quaternion& rotation, const b3Vector3& v)
b3Quaternion q = rotation * v;
q *= rotation.inverse();
#if defined (B3_USE_SSE_IN_API) && defined (B3_USE_SSE)
return b3Vector3(_mm_and_ps(q.get128(), b3vFFF0fMask));
return b3MakeVector3(_mm_and_ps(q.get128(), b3vFFF0fMask));
#elif defined(B3_USE_NEON)
return b3Vector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), b3vFFF0Mask));
return b3MakeVector3((float32x4_t)vandq_s32((int32x4_t)q.get128(), b3vFFF0Mask));
#else
return b3MakeVector3(q.getX(),q.getY(),q.getZ());
#endif

View File

@@ -129,38 +129,6 @@ public:
public:
#if (defined (B3_USE_SSE_IN_API) && defined (B3_USE_SSE) )|| defined (B3_USE_NEON)
/*
B3_FORCE_INLINE b3Vector3( b3SimdFloat4 v)
{
mVec128 = v;
}
B3_FORCE_INLINE b3Vector3(const b3Vector3& rhs)
{
mVec128 = rhs.mVec128;
}
*/
// Assignment Operator
B3_FORCE_INLINE b3Vector3&
operator=(const b3Vector3& v)
{
mVec128 = v.mVec128;
return *this;
}
#else
#endif // #if defined (B3_USE_SSE_IN_API) || defined (B3_USE_NEON)
/**@brief Add a vector to this one
* @param The vector to add to this one */
@@ -1075,16 +1043,6 @@ public:
#if (defined (B3_USE_SSE_IN_API)&& defined (B3_USE_SSE)) || defined (B3_USE_NEON)
B3_FORCE_INLINE b3Vector4&
operator=(const b3Vector4& v)
{
mVec128 = v.mVec128;
return *this;
}
#endif // #if defined (B3_USE_SSE_IN_API) || defined (B3_USE_NEON)
B3_FORCE_INLINE b3Vector4 absolute4() const
{