MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / FindBestAxisVectors

Method FindBestAxisVectors

Source/Engine/Core/Math/Vector3.cpp:299–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297
298template<>
299void Float3::FindBestAxisVectors(Float3& firstAxis, Float3& secondAxis) const
300{
301 const float absX = Math::Abs(X);
302 const float absY = Math::Abs(Y);
303 const float absZ = Math::Abs(Z);
304 if (absZ > absX && absZ > absY)
305 firstAxis = Float3(1, 0, 0);
306 else
307 firstAxis = Float3(0, 0, 1);
308 firstAxis = (firstAxis - *this * (firstAxis | *this)).GetNormalized();
309 secondAxis = firstAxis ^ *this;
310}
311
312template<>
313float Float3::TriangleArea(const Float3& v0, const Float3& v1, const Float3& v2)

Callers 1

SolveTwoBoneIKMethod · 0.80

Calls 4

Float3Class · 0.85
Double3Class · 0.85
AbsFunction · 0.70
GetNormalizedMethod · 0.45

Tested by

no test coverage detected