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

Method WorldToLocalVector

Source/Engine/Core/Math/Transform.cpp:193–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void Transform::WorldToLocalVector(const Vector3& vector, Vector3& result) const
194{
195 Float3 invScale = Scale;
196 if (invScale.X != 0.0f)
197 invScale.X = 1.0f / invScale.X;
198 if (invScale.Y != 0.0f)
199 invScale.Y = 1.0f / invScale.Y;
200 if (invScale.Z != 0.0f)
201 invScale.Z = 1.0f / invScale.Z;
202 const Quaternion invRotation = Orientation.Conjugated();
203 Vector3::Transform(vector, invRotation, result);
204 result *= invScale;
205}
206
207void Transform::WorldToLocal(const Quaternion& rotation, Quaternion& result) const
208{

Callers 6

CalculateSoundMixMethod · 0.45
IntersectsMethod · 0.45
IntersectsMethod · 0.45
SelectAxisMethod · 0.45
SetTangentSmoothInMethod · 0.45
SetTangentSmoothOutMethod · 0.45

Calls 2

ConjugatedMethod · 0.80
TransformClass · 0.70

Tested by

no test coverage detected