Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
class | btVector4 |
struct | btVector3FloatData |
struct | btVector3DoubleData |
Defines | |
#define | btVector3Data btVector3FloatData |
#define | btVector3DataName "btVector3FloatData" |
Functions | |
ATTRIBUTE_ALIGNED16 (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 | |
SIMD_FORCE_INLINE btVector3 | operator+ (const btVector3 &v1, const btVector3 &v2) |
Return the sum of two vectors (Point symantics) | |
SIMD_FORCE_INLINE btVector3 | operator* (const btVector3 &v1, const btVector3 &v2) |
Return the elementwise product of two vectors. | |
SIMD_FORCE_INLINE btVector3 | operator- (const btVector3 &v1, const btVector3 &v2) |
Return the difference between two vectors. | |
SIMD_FORCE_INLINE btVector3 | operator- (const btVector3 &v) |
Return the negative of the vector. | |
SIMD_FORCE_INLINE btVector3 | operator* (const btVector3 &v, const btScalar &s) |
Return the vector scaled by s. | |
SIMD_FORCE_INLINE btVector3 | operator* (const btScalar &s, const btVector3 &v) |
Return the vector scaled by s. | |
SIMD_FORCE_INLINE btVector3 | operator/ (const btVector3 &v, const btScalar &s) |
Return the vector inversely scaled by s. | |
SIMD_FORCE_INLINE btVector3 | operator/ (const btVector3 &v1, const btVector3 &v2) |
Return the vector inversely scaled by s. | |
SIMD_FORCE_INLINE btScalar | btDot (const btVector3 &v1, const btVector3 &v2) |
Return the dot product between two vectors. | |
SIMD_FORCE_INLINE btScalar | btDistance2 (const btVector3 &v1, const btVector3 &v2) |
Return the distance squared between two vectors. | |
SIMD_FORCE_INLINE btScalar | btDistance (const btVector3 &v1, const btVector3 &v2) |
Return the distance between two vectors. | |
SIMD_FORCE_INLINE btScalar | btAngle (const btVector3 &v1, const btVector3 &v2) |
Return the angle between two vectors. | |
SIMD_FORCE_INLINE btVector3 | btCross (const btVector3 &v1, const btVector3 &v2) |
Return the cross product of two vectors. | |
SIMD_FORCE_INLINE btScalar | btTriple (const btVector3 &v1, const btVector3 &v2, const btVector3 &v3) |
SIMD_FORCE_INLINE btVector3 | lerp (const btVector3 &v1, const btVector3 &v2, const btScalar &t) |
Return the linear interpolation between two vectors. | |
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 | |
template<class T > | |
SIMD_FORCE_INLINE void | btPlaneSpace1 (const T &n, T &p, T &q) |
#define btVector3Data btVector3FloatData |
Definition at line 28 of file btVector3.h.
Referenced by ATTRIBUTE_ALIGNED16(), and btSoftBody::serialize().
#define btVector3DataName "btVector3FloatData" |
Definition at line 29 of file btVector3.h.
ATTRIBUTE_ALIGNED16 | ( | class | ) |
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
No initialization constructor
Constructor from scalars
x | X value |
y | Y value |
z | Z value |
Add a vector to this one
The | vector to add to this one |
Subtract a vector from this one
The | vector to subtract |
Scale the vector
s | Scale factor |
Inversely scale the vector
s | Scale factor to divide by |
Return the dot product
v | The other vector in the dot product |
Return the length of the vector squared
Return the length of the vector
Return the distance squared between the ends of this and another vector This is symantically treating the vector like a point
Return the distance between the ends of this and another vector This is symantically treating the vector like a point
Normalize this vector x^2 + y^2 + z^2 = 1
Return a normalized version of this vector
Return a rotated version of this vector
wAxis | The axis to rotate about |
angle | The angle to rotate by |
Return the angle between this and another vector
v | The other vector |
Return a vector will the absolute values of each element
Return the cross product between this and another vector
v | The other vector |
Return the axis with the smallest value Note return values are 0,1,2 for x, y, or z
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z
Return the linear interpolation between this and another vector
v | The other vector |
t | The ration of this to v (t = 0 => return this, t=1 => return other) |
Elementwise multiply this vector by the other
v | The other vector |
Return the x value
Return the y value
Return the z value
Set the x value
Set the y value
Set the z value
Set the w value
Return the x value
Return the y value
Return the z value
Return the w value
operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
Set each element to the max of the current values and the values of another btVector3
other | The other btVector3 to compare with |
Set each element to the min of the current values and the values of another btVector3
other | The other btVector3 to compare with |
Definition at line 39 of file btVector3.h.
References angle(), btAcos(), btFabs(), btFullAssert, btSetMax(), btSetMin(), btSqrt(), btVector3Data, cross(), distance(), dot(), length(), lerp(), normalize(), operator!=(), operator*=(), operator+=(), TNT::operator-=(), operator/=(), operator==(), rotate(), SIMD_EPSILON, SIMD_FORCE_INLINE, and simple_enum_gen::w.
SIMD_FORCE_INLINE btScalar btAngle | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the angle between two vectors.
Definition at line 449 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 btCross | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the cross product of two vectors.
Definition at line 456 of file btVector3.h.
Referenced by btSoftBody::Body::angularVelocity(), btSoftBody::applyClusters(), AreaOf(), BaryCoord(), btSoftBody::clusterDImpulse(), btSoftBody::clusterVelocity(), btSoftBody::clusterVImpulse(), btSoftBody::dampClusters(), DistanceBetweenLines(), OcclusionBuffer::draw(), btSoftBodyHelpers::Draw(), gjkepa2_impl::GJK::EncloseOrigin(), gjkepa2_impl::EPA::Evaluate(), btSoftBody::getVolume(), maxdirsterid(), gjkepa2_impl::EPA::newface(), orth(), Orthogonalize(), btSoftBody::AJoint::Prepare(), gjkepa2_impl::GJK::projectorigin(), ProjectOrigin(), btSoftBody::RayFromToCaster::rayFromToTriangle(), tetravolume(), TriNormal(), btSoftBody::updateClusters(), btSoftBody::updateNormals(), and VolumeOf().
SIMD_FORCE_INLINE btScalar btDistance | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the distance between two vectors.
Definition at line 442 of file btVector3.h.
SIMD_FORCE_INLINE btScalar btDistance2 | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the distance squared between two vectors.
Definition at line 434 of file btVector3.h.
SIMD_FORCE_INLINE btScalar btDot | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the dot product between two vectors.
Definition at line 426 of file btVector3.h.
Referenced by above(), btSoftBody::applyForces(), btSoftBody::checkContact(), btDbvtAabbMm::Classify(), DistanceBetweenLines(), btSoftColliders::CollideSDF_RS::DoNode(), btSoftBodyHelpers::Draw(), gjkepa2_impl::EPA::Evaluate(), gjkepa2_impl::GJK::Evaluate(), EvaluateMedium(), gjkepa2_impl::EPA::expand(), btSoftBody::getVolume(), btSoftClusterCollisionShape::localGetSupportingVertex(), maxdirfiltered(), gjkepa2_impl::EPA::newface(), PlaneLineIntersection(), PlaneProject(), PlaneTest(), btSoftBody::AJoint::Prepare(), btDbvtAabbMm::ProjectMinimum(), ProjectOnAxis(), gjkepa2_impl::GJK::projectorigin(), ProjectOrigin(), btSoftBody::PSolve_RContacts(), btSoftBody::PSolve_SContacts(), btSoftBody::RayFromToCaster::rayFromToTriangle(), segmentsClosestPoints(), btSoftBody::AJoint::Solve(), btSoftBody::CJoint::Solve(), btSoftColliders::ClusterBase::SolveContact(), split(), tetravolume(), topdown(), VolumeOf(), and btSoftBody::VSolve_Links().
SIMD_FORCE_INLINE void btPlaneSpace1 | ( | const T & | n, |
T & | p, | ||
T & | q | ||
) |
Definition at line 684 of file btVector3.h.
References btFabs(), btRecipSqrt, and SIMDSQRT12.
Referenced by ATTRIBUTE_ALIGNED16(), btConeTwistConstraint::buildJacobian(), capsuleCapsuleDistance(), btSequentialImpulseConstraintSolver::convertContact(), CcdPhysicsEnvironment::createConstraint(), btIDebugDraw::drawPlane(), btSliderConstraint::getInfo2NonVirtual(), btConvexConvexAlgorithm::processCollision(), btConvexPlaneCollisionAlgorithm::processCollision(), and shortestArcQuat().
btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
Definition at line 639 of file btVector3.h.
Referenced by btSwapVector3Endian(), and btUnSwapVector3Endian().
SIMD_FORCE_INLINE void btSwapVector3Endian | ( | const btVector3 & | sourceVec, |
btVector3 & | destVec | ||
) |
btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
Definition at line 662 of file btVector3.h.
References btSwapScalarEndian(), and i.
SIMD_FORCE_INLINE btScalar btTriple | ( | const btVector3 & | v1, |
const btVector3 & | v2, | ||
const btVector3 & | v3 | ||
) |
Definition at line 462 of file btVector3.h.
Referenced by btMatrix3x3::determinant().
SIMD_FORCE_INLINE void btUnSwapVector3Endian | ( | btVector3 & | vector | ) |
btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
Definition at line 672 of file btVector3.h.
References btSwapScalarEndian(), and i.
SIMD_FORCE_INLINE btVector3 lerp | ( | const btVector3 & | v1, |
const btVector3 & | v2, | ||
const btScalar & | t | ||
) |
Return the linear interpolation between two vectors.
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 472 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator* | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the elementwise product of two vectors.
Definition at line 377 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator* | ( | const btVector3 & | v, |
const btScalar & | s | ||
) |
Return the vector scaled by s.
Definition at line 397 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator* | ( | const btScalar & | s, |
const btVector3 & | v | ||
) |
Return the vector scaled by s.
Definition at line 404 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator+ | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the sum of two vectors (Point symantics)
Definition at line 370 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator- | ( | const btVector3 & | v | ) |
Return the negative of the vector.
Definition at line 390 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator- | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the difference between two vectors.
Definition at line 384 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator/ | ( | const btVector3 & | v1, |
const btVector3 & | v2 | ||
) |
Return the vector inversely scaled by s.
Definition at line 419 of file btVector3.h.
SIMD_FORCE_INLINE btVector3 operator/ | ( | const btVector3 & | v, |
const btScalar & | s | ||
) |
Return the vector inversely scaled by s.
Definition at line 411 of file btVector3.h.
References btFullAssert.