ApplyMatrix4 multiplies this ray origin and direction by the specified matrix4, basically transforming this ray coordinates.
(matrix4 *Matrix4)
| 490 | // ApplyMatrix4 multiplies this ray origin and direction |
| 491 | // by the specified matrix4, basically transforming this ray coordinates. |
| 492 | func (ray *Ray) ApplyMatrix4(matrix4 *Matrix4) *Ray { |
| 493 | |
| 494 | ray.direction.Add(&ray.origin).ApplyMatrix4(matrix4) |
| 495 | ray.origin.ApplyMatrix4(matrix4) |
| 496 | ray.direction.Sub(&ray.origin) |
| 497 | ray.direction.Normalize() |
| 498 | return ray |
| 499 | } |
| 500 | |
| 501 | // Equals returns if this ray is equal to other |
| 502 | func (ray *Ray) Equals(other *Ray) bool { |
no test coverage detected