Bullet Collision Detection & Physics Library: btVector3.h File Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Macros | Functions
btVector3.h File Reference
`#include "btScalar.h"`
`#include "btMinMax.h"`
`#include "btAlignedAllocator.h"`
Include dependency graph for btVector3.h:

Go to the source code of this file.

## Classes
class | btVector3
| btVector3 can be used to represent 3D points and vectors. More...
class | btVector4
struct | btVector3FloatData
struct | btVector3DoubleData

## Macros
#define | btVector3Data btVector3FloatData
#define | btVector3DataName "btVector3FloatData"

## Functions
btVector3 | operator+ (const btVector3 &v1, const btVector3 &v2)
| Return the sum of two vectors (Point symantics)
btVector3 | operator* (const btVector3 &v1, const btVector3 &v2)
| Return the elementwise product of two vectors.
btVector3 | operator- (const btVector3 &v1, const btVector3 &v2)
| Return the difference between two vectors.
btVector3 | operator- (const btVector3 &v)
| Return the negative of the vector.
btVector3 | operator* (const btVector3 &v, const btScalar &s)
| Return the vector scaled by s.
btVector3 | operator* (const btScalar &s, const btVector3 &v)
| Return the vector scaled by s.
btVector3 | operator/ (const btVector3 &v, const btScalar &s)
| Return the vector inversely scaled by s.
btVector3 | operator/ (const btVector3 &v1, const btVector3 &v2)
| Return the vector inversely scaled by s.
btScalar | btDot (const btVector3 &v1, const btVector3 &v2)
| Return the dot product between two vectors.
btScalar | btDistance2 (const btVector3 &v1, const btVector3 &v2)
| Return the distance squared between two vectors.
btScalar | btDistance (const btVector3 &v1, const btVector3 &v2)
| Return the distance between two vectors.
btScalar | btAngle (const btVector3 &v1, const btVector3 &v2)
| Return the angle between two vectors.
btVector3 | btCross (const btVector3 &v1, const btVector3 &v2)
| Return the cross product of two vectors.
btScalar | btTriple (const btVector3 &v1, const btVector3 &v2, const btVector3 &v3)
btVector3 | lerp (const btVector3 &v1, const btVector3 &v2, const btScalar &t)
| Return the linear interpolation between two vectors.
void | btSwapScalarEndian (const btScalar &sourceVal, btScalar &destVal)
| btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
void | btSwapVector3Endian (const btVector3 &sourceVec, btVector3 &destVec)
| btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
void | btUnSwapVector3Endian (btVector3 &vector)
| btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
template<class T >
void | btPlaneSpace1 (const T &n, T &p, T &q)

## Macro Definition Documentation

## ◆ btVector3Data

#define btVector3Data btVector3FloatData

Definition at line 27 of file btVector3.h.

## ◆ btVector3DataName

#define btVector3DataName "btVector3FloatData"

Definition at line 28 of file btVector3.h.

## Function Documentation

## ◆ btAngle()

btScalar btAngle | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the angle between two vectors.

Definition at line 911 of file btVector3.h.

## ◆ btCross()

btVector3 btCross | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the cross product of two vectors.

Definition at line 918 of file btVector3.h.

## ◆ btDistance()

btScalar btDistance | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the distance between two vectors.

Definition at line 904 of file btVector3.h.

## ◆ btDistance2()

btScalar btDistance2 | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the distance squared between two vectors.

Definition at line 897 of file btVector3.h.

## ◆ btDot()

btScalar btDot | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the dot product between two vectors.

Definition at line 890 of file btVector3.h.

## ◆ btPlaneSpace1()

template<class T >

void btPlaneSpace1 | ( | const T & | n,
|  | T & | p,
|  | T & | q
| ) |  |
| inline

Definition at line 1251 of file btVector3.h.

## ◆ btSwapScalarEndian()

void btSwapScalarEndian | ( | const btScalar & | sourceVal,
|  | btScalar & | destVal
| ) |  |
| inline

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

Definition at line 1208 of file btVector3.h.

## ◆ btSwapVector3Endian()

void btSwapVector3Endian | ( | const btVector3 & | sourceVec,
|  | btVector3 & | destVec
| ) |  |
| inline

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

Definition at line 1231 of file btVector3.h.

## ◆ btTriple()

btScalar btTriple | ( | const btVector3 & | v1,
|  | const btVector3 & | v2,
|  | const btVector3 & | v3
| ) |  |
| inline

Definition at line 924 of file btVector3.h.

## ◆ btUnSwapVector3Endian()

void btUnSwapVector3Endian | ( | btVector3 & | vector | ) |
| inline

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

Definition at line 1240 of file btVector3.h.

## ◆ lerp()

btVector3 lerp | ( | const btVector3 & | v1,
|  | const btVector3 & | v2,
|  | const btScalar & | t
| ) |  |
| inline

Return the linear interpolation between two vectors.

Parameters

  v1 | One vector
  v2 | The other vector
  t | The ration of this to v (t = 0 => return v1, t=1 => return v2)

Definition at line 934 of file btVector3.h.

## ◆ operator*() [1/3]

btVector3 operator* | ( | const btScalar & | s,
|  | const btVector3 & | v
| ) |  |
| inline

Return the vector scaled by s.

Definition at line 836 of file btVector3.h.

## ◆ operator*() [2/3]

btVector3 operator* | ( | const btVector3 & | v,
|  | const btScalar & | s
| ) |  |
| inline

Return the vector scaled by s.

Definition at line 820 of file btVector3.h.

## ◆ operator*() [3/3]

btVector3 operator* | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the elementwise product of two vectors.

Definition at line 770 of file btVector3.h.

## ◆ operator+()

btVector3 operator+ | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the sum of two vectors (Point symantics)

Definition at line 754 of file btVector3.h.

## ◆ operator-() [1/2]

btVector3 operator- | ( | const btVector3 & | v | ) |
| inline

Return the negative of the vector.

Definition at line 806 of file btVector3.h.

## ◆ operator-() [2/2]

btVector3 operator- | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the difference between two vectors.

Definition at line 786 of file btVector3.h.

## ◆ operator/() [1/2]

btVector3 operator/ | ( | const btVector3 & | v,
|  | const btScalar & | s
| ) |  |
| inline

Return the vector inversely scaled by s.

Definition at line 843 of file btVector3.h.

## ◆ operator/() [2/2]

btVector3 operator/ | ( | const btVector3 & | v1,
|  | const btVector3 & | v2
| ) |  |
| inline

Return the vector inversely scaled by s.

Definition at line 860 of file btVector3.h.