Back to index

supertuxkart  0.5+dfsg1
Classes | Functions
btVector3.h File Reference
#include "btQuadWord.h"

Go to the source code of this file.

Classes

class  btVector3
 btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers More...
class  btVector4

Functions

SIMD_FORCE_INLINE btVector3 operator+ (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btVector3 operator* (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btVector3 operator- (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btVector3 operator- (const btVector3 &v)
SIMD_FORCE_INLINE btVector3 operator* (const btVector3 &v, const btScalar &s)
SIMD_FORCE_INLINE btVector3 operator* (const btScalar &s, const btVector3 &v)
SIMD_FORCE_INLINE btVector3 operator/ (const btVector3 &v, const btScalar &s)
SIMD_FORCE_INLINE btVector3 operator/ (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btScalar dot (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btScalar distance2 (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btScalar distance (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btScalar angle (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btVector3 cross (const btVector3 &v1, const btVector3 &v2)
SIMD_FORCE_INLINE btScalar triple (const btVector3 &v1, const btVector3 &v2, const btVector3 &v3)
SIMD_FORCE_INLINE btVector3 lerp (const btVector3 &v1, const btVector3 &v2, const btScalar &t)
SIMD_FORCE_INLINE bool operator== (const btVector3 &p1, const btVector3 &p2)
SIMD_FORCE_INLINE void btSwapScalarEndian (const btScalar &sourceVal, btScalar &destVal)
 btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
SIMD_FORCE_INLINE void btSwapVector3Endian (const btVector3 &sourceVec, btVector3 &destVec)
 btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
SIMD_FORCE_INLINE void btUnSwapVector3Endian (btVector3 &vector)
 btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization

Function Documentation

SIMD_FORCE_INLINE btScalar angle ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 251 of file btVector3.h.

{ 
       return v1.angle(v2); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE void btSwapScalarEndian ( const btScalar sourceVal,
btScalar destVal 
)

btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization

Definition at line 408 of file btVector3.h.

{
       #ifdef BT_USE_DOUBLE_PRECISION
       unsigned char* dest = (unsigned char*) &destVal;
       unsigned char* src  = (unsigned char*) &sourceVal;
       dest[0] = src[7];
    dest[1] = src[6];
    dest[2] = src[5];
    dest[3] = src[4];
    dest[4] = src[3];
    dest[5] = src[2];
    dest[6] = src[1];
    dest[7] = src[0];
#else
       unsigned char* dest = (unsigned char*) &destVal;
       unsigned char* src  = (unsigned char*) &sourceVal;
       dest[0] = src[3];
    dest[1] = src[2];
    dest[2] = src[1];
    dest[3] = src[0];
#endif //BT_USE_DOUBLE_PRECISION
}

Here is the caller graph for this function:

SIMD_FORCE_INLINE void btSwapVector3Endian ( const btVector3 sourceVec,
btVector3 destVec 
)

btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization

Definition at line 431 of file btVector3.h.

{
       for (int i=0;i<4;i++)
       {
              btSwapScalarEndian(sourceVec[i],destVec[i]);
       }

}

Here is the call graph for this function:

btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization

Definition at line 441 of file btVector3.h.

{

       btVector3     swappedVec;
       for (int i=0;i<4;i++)
       {
              btSwapScalarEndian(vector[i],swappedVec[i]);
       }
       vector = swappedVec;
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 cross ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 257 of file btVector3.h.

{ 
       return v1.cross(v2); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

SIMD_FORCE_INLINE btScalar distance ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 245 of file btVector3.h.

{ 
       return v1.distance(v2); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

SIMD_FORCE_INLINE btScalar distance2 ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 238 of file btVector3.h.

{ 
       return v1.distance2(v2); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

SIMD_FORCE_INLINE btScalar dot ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 230 of file btVector3.h.

{ 
       return v1.dot(v2); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 lerp ( const btVector3 v1,
const btVector3 v2,
const btScalar t 
)

Definition at line 269 of file btVector3.h.

{
       return v1.lerp(v2, t);
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator* ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 187 of file btVector3.h.

{
       return btVector3(v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator* ( const btVector3 v,
const btScalar s 
)

Definition at line 205 of file btVector3.h.

{
       return btVector3(v.x() * s, v.y() * s, v.z() * s);
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator* ( const btScalar s,
const btVector3 v 
)

Definition at line 211 of file btVector3.h.

{ 
       return v * s; 
}
SIMD_FORCE_INLINE btVector3 operator+ ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 181 of file btVector3.h.

{
       return btVector3(v1.x() + v2.x(), v1.y() + v2.y(), v1.z() + v2.z());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator- ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 193 of file btVector3.h.

{
       return btVector3(v1.x() - v2.x(), v1.y() - v2.y(), v1.z() - v2.z());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator- ( const btVector3 v)

Definition at line 199 of file btVector3.h.

{
       return btVector3(-v.x(), -v.y(), -v.z());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 operator/ ( const btVector3 v,
const btScalar s 
)

Definition at line 217 of file btVector3.h.

{
       btFullAssert(s != btScalar(0.0));
       return v * (btScalar(1.0) / s);
}
SIMD_FORCE_INLINE btVector3 operator/ ( const btVector3 v1,
const btVector3 v2 
)

Definition at line 224 of file btVector3.h.

{
       return btVector3(v1.x() / v2.x(),v1.y() / v2.y(),v1.z() / v2.z());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE bool operator== ( const btVector3 p1,
const btVector3 p2 
)

Definition at line 275 of file btVector3.h.

{
       return p1.x() == p2.x() && p1.y() == p2.y() && p1.z() == p2.z();
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btScalar triple ( const btVector3 v1,
const btVector3 v2,
const btVector3 v3 
)

Definition at line 263 of file btVector3.h.

{
       return v1.triple(v2, v3);
}

Here is the call graph for this function:

Here is the caller graph for this function: