| 191 | } |
| 192 | |
| 193 | void 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 | |
| 207 | void Transform::WorldToLocal(const Quaternion& rotation, Quaternion& result) const |
| 208 | { |
no test coverage detected