rayzor

diff src/vmath.cc @ 1:a826bf0fb169

fixed line endings
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 09:05:26 +0300
parents 2a5340a6eee4
children d94a69933a71
line diff
     1.1 --- a/src/vmath.cc	Sat Apr 05 08:46:27 2014 +0300
     1.2 +++ b/src/vmath.cc	Sat Apr 05 09:05:26 2014 +0300
     1.3 @@ -1,18 +1,18 @@
     1.4 -#include "vmathmat.h"
     1.5 -#include "vmath.h"
     1.6 -
     1.7 -void Matrix4x4::lookat(const Vector3 &pos, const Vector3 &targ, const Vector3 &up)
     1.8 -{
     1.9 -	Vector3 vk = normalize(targ - pos);
    1.10 -	Vector3 vj = normalize(up);
    1.11 -	Vector3 vi = normalize(cross(vk, vj));
    1.12 -	vj = cross(vi, vk);
    1.13 -
    1.14 -	Matrix4x4 m(
    1.15 -			vi.x, vi.y, vi.z, 0,
    1.16 -			vj.x, vj.y, vj.z, 0,
    1.17 -			-vk.x, -vk.y, -vk.z, 0,
    1.18 -			0, 0, 0, 1);
    1.19 -	translate(-pos.x, -pos.y, -pos.z);
    1.20 -	*this = *this * m;
    1.21 -}
    1.22 +#include "vmathmat.h"
    1.23 +#include "vmath.h"
    1.24 +
    1.25 +void Matrix4x4::lookat(const Vector3 &pos, const Vector3 &targ, const Vector3 &up)
    1.26 +{
    1.27 +	Vector3 vk = normalize(targ - pos);
    1.28 +	Vector3 vj = normalize(up);
    1.29 +	Vector3 vi = normalize(cross(vk, vj));
    1.30 +	vj = cross(vi, vk);
    1.31 +
    1.32 +	Matrix4x4 m(
    1.33 +			vi.x, vi.y, vi.z, 0,
    1.34 +			vj.x, vj.y, vj.z, 0,
    1.35 +			-vk.x, -vk.y, -vk.z, 0,
    1.36 +			0, 0, 0, 1);
    1.37 +	translate(-pos.x, -pos.y, -pos.z);
    1.38 +	*this = *this * m;
    1.39 +}