Blender V2.61 - r43446
|
#include <MT_Vector3.h>
Public Member Functions | |
virtual | ~MT_Vector3 () |
MT_Vector3 () | |
MT_Vector3 (const float *v) | |
MT_Vector3 (const double *v) | |
MT_Vector3 (MT_Scalar xx, MT_Scalar yy, MT_Scalar zz) | |
MT_Vector3 & | operator+= (const MT_Vector3 &v) |
MT_Vector3 & | operator-= (const MT_Vector3 &v) |
MT_Vector3 & | operator*= (MT_Scalar s) |
MT_Vector3 & | operator/= (MT_Scalar s) |
MT_Scalar | dot (const MT_Vector3 &v) const |
MT_Scalar | length2 () const |
MT_Scalar | length () const |
MT_Vector3 | absolute () const |
void | noiseGate (MT_Scalar threshold) |
void | normalize () |
MT_Vector3 | normalized () const |
MT_Vector3 | safe_normalized () const |
void | scale (MT_Scalar x, MT_Scalar y, MT_Scalar z) |
MT_Vector3 | scaled (MT_Scalar x, MT_Scalar y, MT_Scalar z) const |
bool | fuzzyZero () const |
MT_Scalar | angle (const MT_Vector3 &v) const |
MT_Vector3 | cross (const MT_Vector3 &v) const |
MT_Scalar | triple (const MT_Vector3 &v1, const MT_Vector3 &v2) const |
int | closestAxis () const |
Static Public Member Functions | |
static MT_Vector3 | random () |
Definition at line 53 of file MT_Vector3.h.
virtual MT_Vector3::~MT_Vector3 | ( | ) | [inline, virtual] |
Definition at line 55 of file MT_Vector3.h.
MT_Vector3::MT_Vector3 | ( | ) | [inline] |
Definition at line 56 of file MT_Vector3.h.
Referenced by absolute(), cross(), random(), safe_normalized(), and scaled().
MT_Vector3::MT_Vector3 | ( | const float * | v | ) | [inline] |
Definition at line 57 of file MT_Vector3.h.
MT_Vector3::MT_Vector3 | ( | const double * | v | ) | [inline] |
Definition at line 58 of file MT_Vector3.h.
Definition at line 59 of file MT_Vector3.h.
GEN_INLINE MT_Vector3 MT_Vector3::absolute | ( | ) | const |
Definition at line 57 of file MT_Vector3.inl.
References MT_Tuple3::m_co, MT_abs(), and MT_Vector3().
Referenced by closestAxis().
GEN_INLINE MT_Scalar MT_Vector3::angle | ( | const MT_Vector3 & | v | ) | const |
Definition at line 88 of file MT_Vector3.inl.
References acos(), dot(), length2(), MT_assert, MT_fuzzyZero(), and sqrt().
Referenced by MT_angle().
GEN_INLINE int MT_Vector3::closestAxis | ( | ) | const |
Definition at line 106 of file MT_Vector3.inl.
References absolute().
Referenced by SG_Spatial::inside(), KX_Scene::MarkVisible(), and RAS_CalcTexMatrix().
GEN_INLINE MT_Vector3 MT_Vector3::cross | ( | const MT_Vector3 & | v | ) | const |
Definition at line 94 of file MT_Vector3.inl.
References MT_Tuple3::m_co, and MT_Vector3().
Referenced by KX_GameObject::AlignAxisToVect(), KX_BlenderRenderTools::applyTransform(), GPC_RenderTools::applyTransform(), BOP_collinear(), BOP_concave(), BOP_convex(), BOP_getCircleCenter(), BOP_intersectCoplanarFaces(), BOP_overlap(), BSP_TMesh::BuildNormal(), LOD_QuadricEditor::BuildQuadrics(), LOD_NdQuadricEditor::BuildQuadrics(), IK_QPositionTask::ComputeJacobian(), BSP_CSGMesh::FacePlane(), getNavmeshNormal(), ImageRender::ImageRender(), MT_CmMatrix4x4::MT_CmMatrix4x4(), MT_cross(), MT_Plane3::MT_Plane3(), RAS_CalcTexMatrix(), KX_BlenderRenderTools::RayHit(), GPC_RenderTools::RayHit(), BSP_CSGMesh::SC_Face(), RAS_OpenGLRasterizer::SetViewMatrix(), KX_TrackToActuator::Update(), and KX_ConstraintActuator::Update().
GEN_INLINE MT_Scalar MT_Vector3::dot | ( | const MT_Vector3 & | v | ) | const |
Definition at line 50 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
Referenced by KX_GameObject::AlignAxisToVect(), angle(), angle(), KX_BlenderRenderTools::applyTransform(), GPC_RenderTools::applyTransform(), LOD_QuadricEditor::BuildQuadrics(), LOD_NdQuadricEditor::BuildQuadrics(), KX_Camera::ExtractFrustumSphere(), length2(), MT_dot(), MT_Plane3::MT_Plane3(), nearestPointToObstacle(), RAS_CalcTexMatrix(), KX_RayCast::RayTest(), ImageRender::Render(), MT_Plane3::signedDistance(), KX_TrackToActuator::Update(), KX_ObjectActuator::Update(), and KX_ConstraintActuator::Update().
GEN_INLINE bool MT_Vector3::fuzzyZero | ( | ) | const |
Definition at line 61 of file MT_Vector3.inl.
References length2(), and MT_fuzzyZero().
Referenced by LOD_QuadricEditor::BuildQuadrics(), LOD_NdQuadricEditor::BuildQuadrics(), RAS_OpenGLRasterizer::FlushDebugShapes(), MT_fuzzyZero(), nearestPointToObstacle(), and KX_SteeringActuator::Update().
GEN_INLINE MT_Scalar MT_Vector3::length | ( | ) | const |
Definition at line 55 of file MT_Vector3.inl.
References length2(), and sqrt().
Referenced by KX_GameObject::AlignAxisToVect(), BOP_getCircleCenter(), LOD_NdQuadricEditor::BuildQuadrics(), IK_QCenterOfMassTask::ComputeJacobian(), IK_QOrientationTask::ComputeJacobian(), IK_QPositionTask::ComputeJacobian(), IK_QPositionTask::Distance(), BSP_CSGMesh::FacePlane(), init(), KX_ConstraintActuator::KX_ConstraintActuator(), MatrixToAxisAngle(), MT_length(), nearestPointToObstacle(), normalize(), normalize(), normalized(), safe_normalized(), MT_Quaternion::setRotation(), MT_ExpMap::setRotation(), IK_QSegment::SetTransform(), BL_ShapeActionActuator::Update(), IK_QSwingSegment::UpdateAngle(), and IK_QSphericalSegment::UpdateAngle().
GEN_INLINE MT_Scalar MT_Vector3::length2 | ( | ) | const |
Definition at line 54 of file MT_Vector3.inl.
References dot().
Referenced by angle(), fuzzyZero(), length(), MT_length2(), noiseGate(), KX_RayCast::RayTest(), KX_ConstraintActuator::Update(), KX_SteeringActuator::Update(), KX_TrackToActuator::Update(), and KX_ObjectActuator::UpdateFuzzyFlags().
GEN_INLINE void MT_Vector3::noiseGate | ( | MT_Scalar | threshold | ) |
Definition at line 65 of file MT_Vector3.inl.
References length2(), and MT_Tuple3::setValue().
GEN_INLINE void MT_Vector3::normalize | ( | ) |
Definition at line 71 of file MT_Vector3.inl.
References length().
Referenced by KX_GameObject::AlignAxisToVect(), KX_BlenderRenderTools::applyTransform(), GPC_RenderTools::applyTransform(), BOP_collinear(), BOP_getCircleCenter(), LOD_QuadricEditor::BuildQuadrics(), LOD_NdQuadricEditor::BuildQuadrics(), KX_RaySensor::Evaluate(), RAS_CalcTexMatrix(), KX_TrackToActuator::Update(), KX_SteeringActuator::Update(), and KX_ConstraintActuator::Update().
GEN_INLINE MT_Vector3 MT_Vector3::normalized | ( | ) | const |
Definition at line 72 of file MT_Vector3.inl.
References length().
Referenced by GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BOP_intersectCoplanarFaces(), MT_CmMatrix4x4::MT_CmMatrix4x4(), and nearestPointToObstacle().
GEN_INLINE MT_Vector3 & MT_Vector3::operator*= | ( | MT_Scalar | s | ) |
Definition at line 13 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
GEN_INLINE MT_Vector3 & MT_Vector3::operator+= | ( | const MT_Vector3 & | v | ) |
Reimplemented in MT_Point3.
Definition at line 3 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
GEN_INLINE MT_Vector3 & MT_Vector3::operator-= | ( | const MT_Vector3 & | v | ) |
Reimplemented in MT_Point3.
Definition at line 8 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
GEN_INLINE MT_Vector3 & MT_Vector3::operator/= | ( | MT_Scalar | s | ) |
Definition at line 18 of file MT_Vector3.inl.
References MT_assert, and MT_fuzzyZero().
GEN_INLINE MT_Vector3 MT_Vector3::random | ( | ) | [static] |
Definition at line 111 of file MT_Vector3.inl.
References cos(), MT_2_PI(), MT_random(), MT_Vector3(), sin(), sqrt(), and MT_Tuple3::z().
GEN_INLINE MT_Vector3 MT_Vector3::safe_normalized | ( | ) | const |
Definition at line 73 of file MT_Vector3.inl.
References len(), length(), MT_fuzzyZero(), and MT_Vector3().
Referenced by BOP_intersectCoplanarFaces(), BSP_TMesh::BuildNormal(), getNavmeshNormal(), MT_Plane3::MT_Plane3(), and KX_TrackToActuator::Update().
Definition at line 80 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
Referenced by bl_ConvertBlenderObject_Single().
GEN_INLINE MT_Vector3 MT_Vector3::scaled | ( | MT_Scalar | x, |
MT_Scalar | y, | ||
MT_Scalar | z | ||
) | const |
Definition at line 84 of file MT_Vector3.inl.
References MT_Tuple3::m_co, and MT_Vector3().
GEN_INLINE MT_Scalar MT_Vector3::triple | ( | const MT_Vector3 & | v1, |
const MT_Vector3 & | v2 | ||
) | const |
Definition at line 100 of file MT_Vector3.inl.
References MT_Tuple3::m_co.
Referenced by MT_triple().