mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
Merge pull request #1440 from erwincoumans/master
remove obsolete 'register' from BussIK
This commit is contained in:
commit
848be4710e
@ -1752,8 +1752,8 @@ void PhysicsServerExample::initPhysics()
|
||||
|
||||
|
||||
m_canvasRGBIndex = m_canvas->createCanvas("Synthetic Camera RGB data",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
//m_canvasDepthIndex = m_canvas->createCanvas("Synthetic Camera Depth data",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
//m_canvasSegMaskIndex = m_canvas->createCanvas("Synthetic Camera Segmentation Mask",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
m_canvasDepthIndex = m_canvas->createCanvas("Synthetic Camera Depth data",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
m_canvasSegMaskIndex = m_canvas->createCanvas("Synthetic Camera Segmentation Mask",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
|
||||
for (int i=0;i<gCamVisualizerWidth;i++)
|
||||
{
|
||||
@ -1898,6 +1898,60 @@ void PhysicsServerExample::updateGraphics()
|
||||
int flag = m_multiThreadedHelper->m_visualizerFlag;
|
||||
int enable = m_multiThreadedHelper->m_visualizerEnable;
|
||||
|
||||
if (flag == COV_ENABLE_RGB_BUFFER_PREVIEW)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
if (m_canvasRGBIndex<0)
|
||||
{
|
||||
m_canvasRGBIndex = m_canvas->createCanvas("Synthetic Camera RGB data",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (m_canvasRGBIndex>=0)
|
||||
{
|
||||
m_canvas->destroyCanvas(m_canvasRGBIndex);
|
||||
m_canvasRGBIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag == COV_ENABLE_DEPTH_BUFFER_PREVIEW)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
if (m_canvasDepthIndex<0)
|
||||
{
|
||||
m_canvasDepthIndex = m_canvas->createCanvas("Synthetic Camera Depth data",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (m_canvasDepthIndex>=0)
|
||||
{
|
||||
m_canvas->destroyCanvas(m_canvasDepthIndex);
|
||||
m_canvasDepthIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag == COV_ENABLE_SEGMENTATION_MARK_PREVIEW)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
if (m_canvasSegMaskIndex<0)
|
||||
{
|
||||
m_canvasSegMaskIndex = m_canvas->createCanvas("Synthetic Camera Segmentation Mask",gCamVisualizerWidth, gCamVisualizerHeight);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (m_canvasSegMaskIndex>=0)
|
||||
{
|
||||
m_canvas->destroyCanvas(m_canvasSegMaskIndex);
|
||||
m_canvasSegMaskIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flag==COV_ENABLE_VR_TELEPORTING)
|
||||
{
|
||||
gEnableTeleporting = (enable!=0);
|
||||
|
@ -600,6 +600,10 @@ enum b3ConfigureDebugVisualizerEnum
|
||||
COV_ENABLE_MOUSE_PICKING,
|
||||
COV_ENABLE_Y_AXIS_UP,
|
||||
COV_ENABLE_TINY_RENDERER,
|
||||
COV_ENABLE_RGB_BUFFER_PREVIEW,
|
||||
COV_ENABLE_DEPTH_BUFFER_PREVIEW,
|
||||
COV_ENABLE_SEGMENTATION_MARK_PREVIEW,
|
||||
|
||||
};
|
||||
|
||||
enum b3AddUserDebugItemEnum
|
||||
|
@ -51,14 +51,14 @@ LinearMapR2 LinearMapR2::Inverse() const // Returns inverse
|
||||
{
|
||||
|
||||
|
||||
register double detInv = 1.0/(m11*m22 - m12*m21) ;
|
||||
double detInv = 1.0/(m11*m22 - m12*m21) ;
|
||||
|
||||
return( LinearMapR2( m22*detInv, -m21*detInv, -m12*detInv, m11*detInv ) );
|
||||
}
|
||||
|
||||
LinearMapR2& LinearMapR2::Invert() // Converts into inverse.
|
||||
{
|
||||
register double detInv = 1.0/(m11*m22 - m12*m21) ;
|
||||
double detInv = 1.0/(m11*m22 - m12*m21) ;
|
||||
|
||||
double temp;
|
||||
temp = m11*detInv;
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
VectorR2& operator*= ( double m )
|
||||
{ x*=m; y*=m; return(*this); }
|
||||
VectorR2& operator/= ( double m )
|
||||
{ register double mInv = 1.0/m;
|
||||
{ double mInv = 1.0/m;
|
||||
x*=mInv; y*=mInv;
|
||||
return(*this); }
|
||||
VectorR2 operator- () const { return ( VectorR2(-x, -y) ); }
|
||||
@ -108,7 +108,7 @@ public:
|
||||
VectorR2& MakeUnit(); // Normalize() with error checking
|
||||
VectorR2& ReNormalize();
|
||||
bool IsUnit( double tolerance = 1.0e-15 ) const
|
||||
{ register double norm = Norm();
|
||||
{ double norm = Norm();
|
||||
return ( 1.0+tolerance>=norm && norm>=1.0-tolerance ); }
|
||||
bool IsZero() const { return ( x==0.0 && y==0.0 ); }
|
||||
bool NearZero(double tolerance) const { return( MaxAbs()<=tolerance );}
|
||||
@ -369,7 +369,7 @@ inline VectorR2& VectorR2::MakeUnit () // Convert to unit vector (or leave zero
|
||||
inline VectorR2& VectorR2::ReNormalize() // Convert near unit back to unit
|
||||
{
|
||||
double nSq = NormSq();
|
||||
register double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
*this *= mFact;
|
||||
return *this;
|
||||
}
|
||||
@ -395,7 +395,7 @@ inline VectorR2& VectorR2::Rotate( double costheta, double sintheta )
|
||||
|
||||
inline double VectorR2::MaxAbs() const
|
||||
{
|
||||
register double m;
|
||||
double m;
|
||||
m = (x>=0.0) ? x : -x;
|
||||
if ( y>m ) m=y;
|
||||
else if ( -y >m ) m = -y;
|
||||
@ -410,17 +410,17 @@ inline VectorR2 operator-( const VectorR2& u, const VectorR2& v )
|
||||
{
|
||||
return VectorR2(u.x-v.x, u.y-v.y );
|
||||
}
|
||||
inline VectorR2 operator*( const VectorR2& u, register double m)
|
||||
inline VectorR2 operator*( const VectorR2& u, double m)
|
||||
{
|
||||
return VectorR2( u.x*m, u.y*m );
|
||||
}
|
||||
inline VectorR2 operator*( register double m, const VectorR2& u)
|
||||
inline VectorR2 operator*( double m, const VectorR2& u)
|
||||
{
|
||||
return VectorR2( u.x*m, u.y*m );
|
||||
}
|
||||
inline VectorR2 operator/( const VectorR2& u, double m)
|
||||
{
|
||||
register double mInv = 1.0/m;
|
||||
double mInv = 1.0/m;
|
||||
return VectorR2( u.x*mInv, u.y*mInv );
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ inline VectorR2::VectorR2( const VectorHgR2& uH )
|
||||
|
||||
inline double NormalizeError (const VectorR2& u)
|
||||
{
|
||||
register double discrepancy;
|
||||
double discrepancy;
|
||||
discrepancy = u.x*u.x + u.y*u.y - 1.0;
|
||||
if ( discrepancy < 0.0 ) {
|
||||
discrepancy = -discrepancy;
|
||||
@ -626,7 +626,7 @@ inline double Matrix2x2::Diagonal( int i )
|
||||
}
|
||||
inline void Matrix2x2::MakeTranspose() // Transposes it.
|
||||
{
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m12;
|
||||
m12 = m21;
|
||||
m21=temp;
|
||||
@ -647,8 +647,8 @@ inline void Matrix2x2::operator*= (const Matrix2x2& B) // Matrix product
|
||||
|
||||
inline Matrix2x2& Matrix2x2::ReNormalize() // Re-normalizes nearly orthonormal matrix
|
||||
{
|
||||
register double alpha = m11*m11+m21*m21; // First column's norm squared
|
||||
register double beta = m12*m12+m22*m22; // Second column's norm squared
|
||||
double alpha = m11*m11+m21*m21; // First column's norm squared
|
||||
double beta = m12*m12+m22*m22; // Second column's norm squared
|
||||
alpha = 1.0 - 0.5*(alpha-1.0); // Get mult. factor
|
||||
beta = 1.0 - 0.5*(beta-1.0);
|
||||
m11 *= alpha; // Renormalize first column
|
||||
@ -657,7 +657,7 @@ inline Matrix2x2& Matrix2x2::ReNormalize() // Re-normalizes nearly orthonormal m
|
||||
m22 *= beta;
|
||||
alpha = m11*m12+m21*m22; // Columns' inner product
|
||||
alpha *= 0.5; // times 1/2
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m11-alpha*m12; // Subtract alpha times other column
|
||||
m12 -= alpha*m11;
|
||||
m11 = temp;
|
||||
@ -671,8 +671,8 @@ inline Matrix2x2& Matrix2x2::ReNormalize() // Re-normalizes nearly orthonormal m
|
||||
// Mostly intended for diagnostic purposes.
|
||||
inline double NormalizeError( const Matrix2x2& A)
|
||||
{
|
||||
register double discrepancy;
|
||||
register double newdisc;
|
||||
double discrepancy;
|
||||
double newdisc;
|
||||
discrepancy = A.m11*A.m11 + A.m21*A.m21 -1.0; // First column - inner product - 1
|
||||
if (discrepancy<0.0) {
|
||||
discrepancy = -discrepancy;
|
||||
@ -780,7 +780,7 @@ inline LinearMapR2 operator- (const LinearMapR2& A, const LinearMapR2& B)
|
||||
A.m12-B.m12, A.m22-B.m22 ) );
|
||||
}
|
||||
|
||||
inline LinearMapR2& LinearMapR2::operator*= (register double b)
|
||||
inline LinearMapR2& LinearMapR2::operator*= ( double b)
|
||||
{
|
||||
m11 *= b;
|
||||
m12 *= b;
|
||||
@ -789,13 +789,13 @@ inline LinearMapR2& LinearMapR2::operator*= (register double b)
|
||||
return ( *this);
|
||||
}
|
||||
|
||||
inline LinearMapR2 operator* ( const LinearMapR2& A, register double b)
|
||||
inline LinearMapR2 operator* ( const LinearMapR2& A, double b)
|
||||
{
|
||||
return( LinearMapR2( A.m11*b, A.m21*b,
|
||||
A.m12*b, A.m22*b ) );
|
||||
}
|
||||
|
||||
inline LinearMapR2 operator* ( register double b, const LinearMapR2& A)
|
||||
inline LinearMapR2 operator* ( double b, const LinearMapR2& A)
|
||||
{
|
||||
return( LinearMapR2( A.m11*b, A.m21*b,
|
||||
A.m12*b, A.m22*b ) );
|
||||
@ -803,13 +803,13 @@ inline LinearMapR2 operator* ( register double b, const LinearMapR2& A)
|
||||
|
||||
inline LinearMapR2 operator/ ( const LinearMapR2& A, double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return ( A*bInv );
|
||||
}
|
||||
|
||||
inline LinearMapR2& LinearMapR2::operator/= (register double b)
|
||||
inline LinearMapR2& LinearMapR2::operator/= ( double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return ( *this *= bInv );
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ const Matrix3x4 Matrix3x4::Identity(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0,
|
||||
|
||||
double VectorR3::MaxAbs() const
|
||||
{
|
||||
register double m;
|
||||
double m;
|
||||
m = (x>0.0) ? x : -x;
|
||||
if ( y>m ) m=y;
|
||||
else if ( -y >m ) m = -y;
|
||||
@ -124,9 +124,9 @@ VectorR3& VectorR3::RotateUnitInDirection ( const VectorR3& dir)
|
||||
|
||||
Matrix3x3& Matrix3x3::ReNormalize() // Re-normalizes nearly orthonormal matrix
|
||||
{
|
||||
register double alpha = m11*m11+m21*m21+m31*m31; // First column's norm squared
|
||||
register double beta = m12*m12+m22*m22+m32*m32; // Second column's norm squared
|
||||
register double gamma = m13*m13+m23*m23+m33*m33; // Third column's norm squared
|
||||
double alpha = m11*m11+m21*m21+m31*m31; // First column's norm squared
|
||||
double beta = m12*m12+m22*m22+m32*m32; // Second column's norm squared
|
||||
double gamma = m13*m13+m23*m23+m33*m33; // Third column's norm squared
|
||||
alpha = 1.0 - 0.5*(alpha-1.0); // Get mult. factor
|
||||
beta = 1.0 - 0.5*(beta-1.0);
|
||||
gamma = 1.0 - 0.5*(gamma-1.0);
|
||||
@ -145,7 +145,7 @@ Matrix3x3& Matrix3x3::ReNormalize() // Re-normalizes nearly orthonormal matrix
|
||||
alpha *= 0.5;
|
||||
beta *= 0.5;
|
||||
gamma *= 0.5;
|
||||
register double temp1, temp2;
|
||||
double temp1, temp2;
|
||||
temp1 = m11-alpha*m12-beta*m13; // Update row1
|
||||
temp2 = m12-alpha*m11-gamma*m13;
|
||||
m13 -= beta*m11+gamma*m12;
|
||||
@ -199,7 +199,7 @@ VectorR3 Matrix3x3::Solve(const VectorR3& u) const // Returns solution
|
||||
double sd23 = m31*m12-m11*m32;
|
||||
double sd33 = m11*m22-m21*m12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
|
||||
double rx = (u.x*sd11 + u.y*sd21 + u.z*sd31)*detInv;
|
||||
double ry = (u.x*sd12 + u.y*sd22 + u.z*sd32)*detInv;
|
||||
@ -215,9 +215,9 @@ VectorR3 Matrix3x3::Solve(const VectorR3& u) const // Returns solution
|
||||
|
||||
Matrix3x4& Matrix3x4::ReNormalize() // Re-normalizes nearly orthonormal matrix
|
||||
{
|
||||
register double alpha = m11*m11+m21*m21+m31*m31; // First column's norm squared
|
||||
register double beta = m12*m12+m22*m22+m32*m32; // Second column's norm squared
|
||||
register double gamma = m13*m13+m23*m23+m33*m33; // Third column's norm squared
|
||||
double alpha = m11*m11+m21*m21+m31*m31; // First column's norm squared
|
||||
double beta = m12*m12+m22*m22+m32*m32; // Second column's norm squared
|
||||
double gamma = m13*m13+m23*m23+m33*m33; // Third column's norm squared
|
||||
alpha = 1.0 - 0.5*(alpha-1.0); // Get mult. factor
|
||||
beta = 1.0 - 0.5*(beta-1.0);
|
||||
gamma = 1.0 - 0.5*(gamma-1.0);
|
||||
@ -236,7 +236,7 @@ Matrix3x4& Matrix3x4::ReNormalize() // Re-normalizes nearly orthonormal matrix
|
||||
alpha *= 0.5;
|
||||
beta *= 0.5;
|
||||
gamma *= 0.5;
|
||||
register double temp1, temp2;
|
||||
double temp1, temp2;
|
||||
temp1 = m11-alpha*m12-beta*m13; // Update row1
|
||||
temp2 = m12-alpha*m11-gamma*m13;
|
||||
m13 -= beta*m11+gamma*m12;
|
||||
@ -340,7 +340,7 @@ LinearMapR3 LinearMapR3::Inverse() const // Returns inverse
|
||||
double sd23 = m31*m12-m11*m32;
|
||||
double sd33 = m11*m22-m21*m12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
|
||||
return( LinearMapR3( sd11*detInv, sd12*detInv, sd13*detInv,
|
||||
sd21*detInv, sd22*detInv, sd23*detInv,
|
||||
@ -359,7 +359,7 @@ LinearMapR3& LinearMapR3::Invert() // Converts into inverse.
|
||||
double sd23 = m31*m12-m11*m32;
|
||||
double sd33 = m11*m22-m21*m12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
|
||||
m11 = sd11*detInv;
|
||||
m12 = sd21*detInv;
|
||||
@ -441,7 +441,7 @@ AffineMapR3 AffineMapR3::Inverse() const // Returns inverse
|
||||
double sd23 = m31*m12-m11*m32;
|
||||
double sd33 = m11*m22-m21*m12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
|
||||
// Make sd's hold the (transpose of) the inverse of the 3x3 part
|
||||
sd11 *= detInv;
|
||||
@ -475,7 +475,7 @@ AffineMapR3& AffineMapR3::Invert() // Converts into inverse.
|
||||
double sd23 = m31*m12-m11*m32;
|
||||
double sd33 = m11*m22-m21*m12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
double detInv = 1.0/(m11*sd11 + m12*sd12 + m13*sd13);
|
||||
|
||||
m11 = sd11*detInv;
|
||||
m12 = sd21*detInv;
|
||||
@ -541,9 +541,9 @@ RotationMapR3& RotationMapR3::Set( const Quaternion& quat )
|
||||
RotationMapR3& RotationMapR3::Set( const VectorR3& u, double theta )
|
||||
{
|
||||
assert ( fabs(u.NormSq()-1.0)<2.0e-6 );
|
||||
register double c = cos(theta);
|
||||
register double s = sin(theta);
|
||||
register double mc = 1.0-c;
|
||||
double c = cos(theta);
|
||||
double s = sin(theta);
|
||||
double mc = 1.0-c;
|
||||
double xmc = u.x*mc;
|
||||
double xymc = xmc*u.y;
|
||||
double xzmc = xmc*u.z;
|
||||
@ -673,9 +673,9 @@ RotationMapR3 RotateToMap( const VectorR3& fromVec, const VectorR3& toVec)
|
||||
RigidMapR3& RigidMapR3::SetRotationPart( const VectorR3& u, double theta )
|
||||
{
|
||||
assert ( fabs(u.NormSq()-1.0)<2.0e-6 );
|
||||
register double c = cos(theta);
|
||||
register double s = sin(theta);
|
||||
register double mc = 1.0-c;
|
||||
double c = cos(theta);
|
||||
double s = sin(theta);
|
||||
double mc = 1.0-c;
|
||||
double xmc = u.x*mc;
|
||||
double xymc = xmc*u.y;
|
||||
double xzmc = xmc*u.z;
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
VectorR3& operator*= ( double m )
|
||||
{ x*=m; y*=m; z*=m; return(*this); }
|
||||
VectorR3& operator/= ( double m )
|
||||
{ register double mInv = 1.0/m;
|
||||
{ double mInv = 1.0/m;
|
||||
x*=mInv; y*=mInv; z*=mInv;
|
||||
return(*this); }
|
||||
VectorR3 operator- () const { return ( VectorR3(-x, -y, -z) ); }
|
||||
@ -130,10 +130,10 @@ public:
|
||||
inline VectorR3& MakeUnit(); // Normalize() with error checking
|
||||
inline VectorR3& ReNormalize();
|
||||
bool IsUnit( ) const
|
||||
{ register double norm = Norm();
|
||||
{ double norm = Norm();
|
||||
return ( 1.000001>=norm && norm>=0.999999 ); }
|
||||
bool IsUnit( double tolerance ) const
|
||||
{ register double norm = Norm();
|
||||
{ double norm = Norm();
|
||||
return ( 1.0+tolerance>=norm && norm>=1.0-tolerance ); }
|
||||
bool NearZero(double tolerance) const { return( MaxAbs()<=tolerance );}
|
||||
// tolerance should be non-negative
|
||||
@ -646,17 +646,17 @@ inline VectorR3 operator-( const VectorR3& u, const VectorR3& v )
|
||||
{
|
||||
return VectorR3(u.x-v.x, u.y-v.y, u.z-v.z);
|
||||
}
|
||||
inline VectorR3 operator*( const VectorR3& u, register double m)
|
||||
inline VectorR3 operator*( const VectorR3& u, double m)
|
||||
{
|
||||
return VectorR3( u.x*m, u.y*m, u.z*m);
|
||||
}
|
||||
inline VectorR3 operator*( register double m, const VectorR3& u)
|
||||
inline VectorR3 operator*( double m, const VectorR3& u)
|
||||
{
|
||||
return VectorR3( u.x*m, u.y*m, u.z*m);
|
||||
}
|
||||
inline VectorR3 operator/( const VectorR3& u, double m)
|
||||
{
|
||||
register double mInv = 1.0/m;
|
||||
double mInv = 1.0/m;
|
||||
return VectorR3( u.x*mInv, u.y*mInv, u.z*mInv);
|
||||
}
|
||||
|
||||
@ -716,14 +716,14 @@ inline VectorR3::VectorR3( const VectorHgR3& uH )
|
||||
inline VectorR3& VectorR3::ReNormalize() // Convert near unit back to unit
|
||||
{
|
||||
double nSq = NormSq();
|
||||
register double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
*this *= mFact;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline double NormalizeError (const VectorR3& u)
|
||||
{
|
||||
register double discrepancy;
|
||||
double discrepancy;
|
||||
discrepancy = u.x*u.x + u.y*u.y + u.z*u.z - 1.0;
|
||||
if ( discrepancy < 0.0 ) {
|
||||
discrepancy = -discrepancy;
|
||||
@ -1000,7 +1000,7 @@ inline double Matrix3x3::Diagonal( int i )
|
||||
|
||||
inline void Matrix3x3::MakeTranspose() // Transposes it.
|
||||
{
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m12;
|
||||
m12 = m21;
|
||||
m21=temp;
|
||||
@ -1515,7 +1515,7 @@ inline LinearMapR3 operator- (const LinearMapR3& A, const Matrix3x3& B)
|
||||
A.m13-B.m13, A.m23-B.m23, A.m33-B.m33 ) );
|
||||
}
|
||||
|
||||
inline LinearMapR3& LinearMapR3::operator*= (register double b)
|
||||
inline LinearMapR3& LinearMapR3::operator*= ( double b)
|
||||
{
|
||||
m11 *= b;
|
||||
m12 *= b;
|
||||
@ -1529,14 +1529,14 @@ inline LinearMapR3& LinearMapR3::operator*= (register double b)
|
||||
return ( *this);
|
||||
}
|
||||
|
||||
inline LinearMapR3 operator* ( const LinearMapR3& A, register double b)
|
||||
inline LinearMapR3 operator* ( const LinearMapR3& A, double b)
|
||||
{
|
||||
return( LinearMapR3( A.m11*b, A.m21*b, A.m31*b,
|
||||
A.m12*b, A.m22*b, A.m32*b,
|
||||
A.m13*b, A.m23*b, A.m33*b ) );
|
||||
}
|
||||
|
||||
inline LinearMapR3 operator* ( register double b, const LinearMapR3& A)
|
||||
inline LinearMapR3 operator* ( double b, const LinearMapR3& A)
|
||||
{
|
||||
return( LinearMapR3( A.m11*b, A.m21*b, A.m31*b,
|
||||
A.m12*b, A.m22*b, A.m32*b,
|
||||
@ -1545,15 +1545,15 @@ inline LinearMapR3 operator* ( register double b, const LinearMapR3& A)
|
||||
|
||||
inline LinearMapR3 operator/ ( const LinearMapR3& A, double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return( LinearMapR3( A.m11*bInv, A.m21*bInv, A.m31*bInv,
|
||||
A.m12*bInv, A.m22*bInv, A.m32*bInv,
|
||||
A.m13*bInv, A.m23*bInv, A.m33*bInv ) );
|
||||
}
|
||||
|
||||
inline LinearMapR3& LinearMapR3::operator/= (register double b)
|
||||
inline LinearMapR3& LinearMapR3::operator/= ( double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return ( *this *= bInv );
|
||||
}
|
||||
|
||||
@ -1730,7 +1730,7 @@ inline AffineMapR3 operator- (const LinearMapR3& B, const AffineMapR3& A)
|
||||
}
|
||||
|
||||
|
||||
inline AffineMapR3& AffineMapR3::operator*= (register double b)
|
||||
inline AffineMapR3& AffineMapR3::operator*= ( double b)
|
||||
{
|
||||
m11 *= b;
|
||||
m12 *= b;
|
||||
@ -1747,7 +1747,7 @@ inline AffineMapR3& AffineMapR3::operator*= (register double b)
|
||||
return (*this);
|
||||
}
|
||||
|
||||
inline AffineMapR3 operator* (const AffineMapR3& A, register double b)
|
||||
inline AffineMapR3 operator* (const AffineMapR3& A, double b)
|
||||
{
|
||||
return(AffineMapR3( A.m11*b, A.m21*b, A.m31*b,
|
||||
A.m12*b, A.m22*b, A.m32*b,
|
||||
@ -1755,7 +1755,7 @@ inline AffineMapR3 operator* (const AffineMapR3& A, register double b)
|
||||
A.m14*b, A.m24*b, A.m34*b ) );
|
||||
}
|
||||
|
||||
inline AffineMapR3 operator* (register double b, const AffineMapR3& A)
|
||||
inline AffineMapR3 operator* ( double b, const AffineMapR3& A)
|
||||
{
|
||||
return(AffineMapR3( A.m11*b, A.m21*b, A.m31*b,
|
||||
A.m12*b, A.m22*b, A.m32*b,
|
||||
@ -1765,14 +1765,14 @@ inline AffineMapR3 operator* (register double b, const AffineMapR3& A)
|
||||
|
||||
inline AffineMapR3& AffineMapR3::operator/= (double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
*this *= bInv;
|
||||
return( *this );
|
||||
}
|
||||
|
||||
inline AffineMapR3 operator/ (const AffineMapR3& A, double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return(AffineMapR3( A.m11*bInv, A.m21*bInv, A.m31*bInv,
|
||||
A.m12*bInv, A.m22*bInv, A.m32*bInv,
|
||||
A.m13*bInv, A.m23*bInv, A.m33*bInv,
|
||||
@ -1823,7 +1823,7 @@ inline RotationMapR3 RotationMapR3::Inverse() const // Returns inverse
|
||||
|
||||
inline RotationMapR3& RotationMapR3::Invert() // Converts into inverse.
|
||||
{
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m12;
|
||||
m12 = m21;
|
||||
m21 = temp;
|
||||
@ -1934,7 +1934,7 @@ inline RigidMapR3& RigidMapR3::Invert() // Converts into inverse.
|
||||
m14 = new14;
|
||||
m24 = new24;
|
||||
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m12;
|
||||
m12 = m21;
|
||||
m21 = temp;
|
||||
|
@ -45,7 +45,7 @@ const Matrix4x4 Matrix4x4::Identity(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
|
||||
|
||||
double VectorR4::MaxAbs() const
|
||||
{
|
||||
register double m;
|
||||
double m;
|
||||
m = (x>0.0) ? x : -x;
|
||||
if ( y>m ) m=y;
|
||||
else if ( -y >m ) m = -y;
|
||||
@ -99,7 +99,7 @@ void Matrix4x4::operator*= (const Matrix4x4& B) // Matrix product
|
||||
|
||||
inline void ReNormalizeHelper ( double &a, double &b, double &c, double &d )
|
||||
{
|
||||
register double scaleF = a*a+b*b+c*c+d*d; // Inner product of Vector-R4
|
||||
double scaleF = a*a+b*b+c*c+d*d; // Inner product of Vector-R4
|
||||
scaleF = 1.0-0.5*(scaleF-1.0);
|
||||
a *= scaleF;
|
||||
b *= scaleF;
|
||||
@ -212,7 +212,7 @@ LinearMapR4 LinearMapR4::Inverse() const // Returns inverse
|
||||
double sd44 = m11*Tbt23C23 - m12*Tbt23C13 + m13*Tbt23C12;
|
||||
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 - m12*sd12 + m13*sd13 - m14*sd14);
|
||||
double detInv = 1.0/(m11*sd11 - m12*sd12 + m13*sd13 - m14*sd14);
|
||||
|
||||
return( LinearMapR4( sd11*detInv, -sd12*detInv, sd13*detInv, -sd14*detInv,
|
||||
-sd21*detInv, sd22*detInv, -sd23*detInv, sd24*detInv,
|
||||
@ -258,7 +258,7 @@ LinearMapR4& LinearMapR4::Invert() // Converts into inverse.
|
||||
double sd43 = m11*Tbt23C24 - m12*Tbt23C14 + m14*Tbt23C12;
|
||||
double sd44 = m11*Tbt23C23 - m12*Tbt23C13 + m13*Tbt23C12;
|
||||
|
||||
register double detInv = 1.0/(m11*sd11 - m12*sd12 + m13*sd13 - m14*sd14);
|
||||
double detInv = 1.0/(m11*sd11 - m12*sd12 + m13*sd13 - m14*sd14);
|
||||
|
||||
m11 = sd11*detInv;
|
||||
m12 = -sd21*detInv;
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
VectorR4& operator*= ( double m )
|
||||
{ x*=m; y*=m; z*=m; w*=m; return(*this); }
|
||||
VectorR4& operator/= ( double m )
|
||||
{ register double mInv = 1.0/m;
|
||||
{ double mInv = 1.0/m;
|
||||
x*=mInv; y*=mInv; z*=mInv; w*=mInv;
|
||||
return(*this); }
|
||||
VectorR4 operator- () const { return ( VectorR4(-x, -y, -z, -w) ); }
|
||||
@ -109,10 +109,10 @@ public:
|
||||
inline VectorR4& MakeUnit(); // Normalize() with error checking
|
||||
inline VectorR4& ReNormalize();
|
||||
bool IsUnit( ) const
|
||||
{ register double norm = Norm();
|
||||
{ double norm = Norm();
|
||||
return ( 1.000001>=norm && norm>=0.999999 ); }
|
||||
bool IsUnit( double tolerance ) const
|
||||
{ register double norm = Norm();
|
||||
{ double norm = Norm();
|
||||
return ( 1.0+tolerance>=norm && norm>=1.0-tolerance ); }
|
||||
bool IsZero() const { return ( x==0.0 && y==0.0 && z==0.0 && w==0.0); }
|
||||
bool NearZero(double tolerance) const { return( MaxAbs()<=tolerance );}
|
||||
@ -428,17 +428,17 @@ inline VectorR4 operator-( const VectorR4& u, const VectorR4& v )
|
||||
{
|
||||
return VectorR4(u.x-v.x, u.y-v.y, u.z-v.z, u.w-v.w);
|
||||
}
|
||||
inline VectorR4 operator*( const VectorR4& u, register double m)
|
||||
inline VectorR4 operator*( const VectorR4& u, double m)
|
||||
{
|
||||
return VectorR4( u.x*m, u.y*m, u.z*m, u.w*m );
|
||||
}
|
||||
inline VectorR4 operator*( register double m, const VectorR4& u)
|
||||
inline VectorR4 operator*( double m, const VectorR4& u)
|
||||
{
|
||||
return VectorR4( u.x*m, u.y*m, u.z*m, u.w*m );
|
||||
}
|
||||
inline VectorR4 operator/( const VectorR4& u, double m)
|
||||
{
|
||||
register double mInv = 1.0/m;
|
||||
double mInv = 1.0/m;
|
||||
return VectorR4( u.x*mInv, u.y*mInv, u.z*mInv, u.w*mInv );
|
||||
}
|
||||
|
||||
@ -486,14 +486,14 @@ inline VectorR4& VectorR4::AddScaled( const VectorR4& u, double s )
|
||||
inline VectorR4& VectorR4::ReNormalize() // Convert near unit back to unit
|
||||
{
|
||||
double nSq = NormSq();
|
||||
register double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
double mFact = 1.0-0.5*(nSq-1.0); // Multiplicative factor
|
||||
*this *= mFact;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline double NormalizeError (const VectorR4& u)
|
||||
{
|
||||
register double discrepancy;
|
||||
double discrepancy;
|
||||
discrepancy = u.x*u.x + u.y*u.y + u.z*u.z + u.w*u.w - 1.0;
|
||||
if ( discrepancy < 0.0 ) {
|
||||
discrepancy = -discrepancy;
|
||||
@ -796,7 +796,7 @@ inline double Matrix4x4::Diagonal( int i )
|
||||
|
||||
inline void Matrix4x4::MakeTranspose() // Transposes it.
|
||||
{
|
||||
register double temp;
|
||||
double temp;
|
||||
temp = m12;
|
||||
m12 = m21;
|
||||
m21=temp;
|
||||
@ -924,7 +924,7 @@ inline LinearMapR4 operator- (const LinearMapR4& A, const LinearMapR4& B)
|
||||
A.m14-B.m14, A.m24-B.m24, A.m34-B.m34, A.m44-B.m44 ) );
|
||||
}
|
||||
|
||||
inline LinearMapR4& LinearMapR4::operator*= (register double b)
|
||||
inline LinearMapR4& LinearMapR4::operator*= ( double b)
|
||||
{
|
||||
m11 *= b;
|
||||
m12 *= b;
|
||||
@ -945,7 +945,7 @@ inline LinearMapR4& LinearMapR4::operator*= (register double b)
|
||||
return ( *this);
|
||||
}
|
||||
|
||||
inline LinearMapR4 operator* ( const LinearMapR4& A, register double b)
|
||||
inline LinearMapR4 operator* ( const LinearMapR4& A, double b)
|
||||
{
|
||||
return( LinearMapR4( A.m11*b, A.m21*b, A.m31*b, A.m41*b,
|
||||
A.m12*b, A.m22*b, A.m32*b, A.m42*b,
|
||||
@ -953,7 +953,7 @@ inline LinearMapR4 operator* ( const LinearMapR4& A, register double b)
|
||||
A.m14*b, A.m24*b, A.m34*b, A.m44*b) );
|
||||
}
|
||||
|
||||
inline LinearMapR4 operator* ( register double b, const LinearMapR4& A)
|
||||
inline LinearMapR4 operator* ( double b, const LinearMapR4& A)
|
||||
{
|
||||
return( LinearMapR4( A.m11*b, A.m21*b, A.m31*b, A.m41*b,
|
||||
A.m12*b, A.m22*b, A.m32*b, A.m42*b,
|
||||
@ -963,13 +963,13 @@ inline LinearMapR4 operator* ( register double b, const LinearMapR4& A)
|
||||
|
||||
inline LinearMapR4 operator/ ( const LinearMapR4& A, double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return ( A*bInv );
|
||||
}
|
||||
|
||||
inline LinearMapR4& LinearMapR4::operator/= (register double b)
|
||||
inline LinearMapR4& LinearMapR4::operator/= ( double b)
|
||||
{
|
||||
register double bInv = 1.0/b;
|
||||
double bInv = 1.0/b;
|
||||
return ( *this *= bInv );
|
||||
}
|
||||
|
||||
|
@ -8209,6 +8209,9 @@ initpybullet(void)
|
||||
PyModule_AddIntConstant(m, "COV_ENABLE_KEYBOARD_SHORTCUTS", COV_ENABLE_KEYBOARD_SHORTCUTS);
|
||||
PyModule_AddIntConstant(m, "COV_ENABLE_MOUSE_PICKING", COV_ENABLE_MOUSE_PICKING);
|
||||
|
||||
PyModule_AddIntConstant(m, "COV_ENABLE_RGB_BUFFER_PREVIEW", COV_ENABLE_RGB_BUFFER_PREVIEW);
|
||||
PyModule_AddIntConstant(m, "COV_ENABLE_DEPTH_BUFFER_PREVIEW", COV_ENABLE_DEPTH_BUFFER_PREVIEW);
|
||||
PyModule_AddIntConstant(m, "COV_ENABLE_SEGMENTATION_MARK_PREVIEW", COV_ENABLE_SEGMENTATION_MARK_PREVIEW);
|
||||
|
||||
PyModule_AddIntConstant(m, "ER_TINY_RENDERER", ER_TINY_RENDERER);
|
||||
PyModule_AddIntConstant(m, "ER_BULLET_HARDWARE_OPENGL", ER_BULLET_HARDWARE_OPENGL);
|
||||
|
Loading…
Reference in New Issue
Block a user