Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FMatrix operator*( const FMatrix& Other ) const
- {
- FMatrix Result;
- Result.XPlane.X = XPlane.X * Other.XPlane.X + XPlane.Y * Other.YPlane.X + XPlane.Z * Other.ZPlane.X + XPlane.W * Other.WPlane.X;
- Result.XPlane.Y = XPlane.X * Other.XPlane.Y + XPlane.Y * Other.YPlane.Y + XPlane.Z * Other.ZPlane.Y + XPlane.W * Other.WPlane.Y;
- Result.XPlane.Z = XPlane.X * Other.XPlane.Z + XPlane.Y * Other.YPlane.Z + XPlane.Z * Other.ZPlane.Z + XPlane.W * Other.WPlane.Z;
- Result.XPlane.W = XPlane.X * Other.XPlane.W + XPlane.Y * Other.YPlane.W + XPlane.Z * Other.ZPlane.W + XPlane.W * Other.WPlane.W;
- Result.YPlane.X = YPlane.X * Other.XPlane.X + YPlane.Y * Other.YPlane.X + YPlane.Z * Other.ZPlane.X + YPlane.W * Other.WPlane.X;
- Result.YPlane.Y = YPlane.X * Other.XPlane.Y + YPlane.Y * Other.YPlane.Y + YPlane.Z * Other.ZPlane.Y + YPlane.W * Other.WPlane.Y;
- Result.YPlane.Z = YPlane.X * Other.XPlane.Z + YPlane.Y * Other.YPlane.Z + YPlane.Z * Other.ZPlane.Z + YPlane.W * Other.WPlane.Z;
- Result.YPlane.W = YPlane.X * Other.XPlane.W + YPlane.Y * Other.YPlane.W + YPlane.Z * Other.ZPlane.W + YPlane.W * Other.WPlane.W;
- Result.ZPlane.X = ZPlane.X * Other.XPlane.X + ZPlane.Y * Other.YPlane.X + ZPlane.Z * Other.ZPlane.X + ZPlane.W * Other.WPlane.X;
- Result.ZPlane.Y = ZPlane.X * Other.XPlane.Y + ZPlane.Y * Other.YPlane.Y + ZPlane.Z * Other.ZPlane.Y + ZPlane.W * Other.WPlane.Y;
- Result.ZPlane.Z = ZPlane.X * Other.XPlane.Z + ZPlane.Y * Other.YPlane.Z + ZPlane.Z * Other.ZPlane.Z + ZPlane.W * Other.WPlane.Z;
- Result.ZPlane.W = ZPlane.X * Other.XPlane.W + ZPlane.Y * Other.YPlane.W + ZPlane.Z * Other.ZPlane.W + ZPlane.W * Other.WPlane.W;
- Result.WPlane.X = WPlane.X * Other.XPlane.X + WPlane.Y * Other.YPlane.X + WPlane.Z * Other.ZPlane.X + WPlane.W * Other.WPlane.X;
- Result.WPlane.Y = WPlane.X * Other.XPlane.Y + WPlane.Y * Other.YPlane.Y + WPlane.Z * Other.ZPlane.Y + WPlane.W * Other.WPlane.Y;
- Result.WPlane.Z = WPlane.X * Other.XPlane.Z + WPlane.Y * Other.YPlane.Z + WPlane.Z * Other.ZPlane.Z + WPlane.W * Other.WPlane.Z;
- Result.WPlane.W = WPlane.X * Other.XPlane.W + WPlane.Y * Other.YPlane.W + WPlane.Z * Other.ZPlane.W + WPlane.W * Other.WPlane.W;
- return Result;
- }
Add Comment
Please, Sign In to add comment