erebus

diff liberebus/src/scene.cc @ 46:c4d48a21bc4a

in the middle of the vmath->gph-math port
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 24 Feb 2016 00:26:50 +0200
parents ed18af9da8f7
children
line diff
     1.1 --- a/liberebus/src/scene.cc	Tue Dec 29 12:19:53 2015 +0200
     1.2 +++ b/liberebus/src/scene.cc	Wed Feb 24 00:26:50 2016 +0200
     1.3 @@ -313,7 +313,7 @@
     1.4  				fprintf(stderr, "-position must be followed by 3 numbers\n");
     1.5  				goto err;
     1.6  			}
     1.7 -			node->set_position(Vector3(vec[0], vec[1], vec[2]));
     1.8 +			node->set_position(Vec3(vec[0], vec[1], vec[2]));
     1.9  			i += 3;
    1.10  
    1.11  		} else if(strcmp(argv[i], "-rotation") == 0) {
    1.12 @@ -322,16 +322,16 @@
    1.13  				fprintf(stderr, "-rotation must be followed by axis vector and angle\n");
    1.14  				goto err;
    1.15  			}
    1.16 -			node->set_rotation(Quaternion(Vector3(vec[0], vec[1], vec[2]), vec[3]));
    1.17 +			node->set_rotation(Quat(Vec3(vec[0], vec[1], vec[2]), vec[3]));
    1.18  			i += 4;
    1.19  
    1.20  		} else if(strcmp(argv[i], "-scaling") == 0) {
    1.21  			int nelem = parse_vec(argv + i + 1, vec);
    1.22 -			Vector3 s;
    1.23 +			Vec3 s;
    1.24  			if(nelem == 1) {
    1.25  				s.x = s.y = s.z = vec[0];
    1.26  			} else if(nelem == 3) {
    1.27 -				s = Vector3(vec[0], vec[1], vec[2]);
    1.28 +				s = Vec3(vec[0], vec[1], vec[2]);
    1.29  			} else {
    1.30  				fprintf(stderr, "-scaling must be followed by 1 or 3 numbers\n");
    1.31  				goto err;
    1.32 @@ -361,9 +361,9 @@
    1.33  			int nelem = parse_vec(argv + i + 1, vec);
    1.34  			Color emissive;
    1.35  			if(nelem == 1) {
    1.36 -				emissive = Vector3(1, 1, 1);
    1.37 +				emissive = Vec3(1, 1, 1);
    1.38  			} else if(nelem == 3) {
    1.39 -				emissive = Vector3(vec[0], vec[1], vec[2]);
    1.40 +				emissive = Vec3(vec[0], vec[1], vec[2]);
    1.41  			} else {
    1.42  				fprintf(stderr, "-emissive must be followed by an intensity or a color\n");
    1.43  				goto err;
    1.44 @@ -402,7 +402,7 @@
    1.45  				fprintf(stderr, "-position must be followed by 3 numbers\n");
    1.46  				goto err;
    1.47  			}
    1.48 -			cam->set_position(Vector3(vec[0], vec[1], vec[2]));
    1.49 +			cam->set_position(Vec3(vec[0], vec[1], vec[2]));
    1.50  			i += 3;
    1.51  
    1.52  		} else if(strcmp(argv[i], "-target") == 0) {
    1.53 @@ -411,7 +411,7 @@
    1.54  				fprintf(stderr, "-target must be followed by 3 numbers\n");
    1.55  				goto err;
    1.56  			}
    1.57 -			cam->set_target(Vector3(vec[0], vec[1], vec[2]));
    1.58 +			cam->set_target(Vec3(vec[0], vec[1], vec[2]));
    1.59  			i += 3;
    1.60  
    1.61  		} else if(strcmp(argv[i], "-fov") == 0) {