erebus

diff liberebus/src/erebus.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/erebus.cc	Tue Dec 29 12:19:53 2015 +0200
     1.2 +++ b/liberebus/src/erebus.cc	Wed Feb 24 00:26:50 2016 +0200
     1.3 @@ -119,13 +119,13 @@
     1.4  	case Option::Type::INT:
     1.5  		{
     1.6  			int ival = ctx->options[opt].ival;
     1.7 -			ctx->options[opt].vval = Vector4(ival, ival, ival, ival);
     1.8 +			ctx->options[opt].vval = Vec4(ival, ival, ival, ival);
     1.9  		}
    1.10  		break;
    1.11  	case Option::Type::FLOAT:
    1.12  		{
    1.13  			float fval = ctx->options[opt].fval;
    1.14 -			ctx->options[opt].vval = Vector4(fval, fval, fval, fval);
    1.15 +			ctx->options[opt].vval = Vec4(fval, fval, fval, fval);
    1.16  		}
    1.17  	default:
    1.18  		break;
    1.19 @@ -343,7 +343,7 @@
    1.20  		case '0':
    1.21  			if(ctx->dbg_nodesel != -1) {
    1.22  				SceneNode *node = ctx->scn->get_node(ctx->dbg_nodesel);
    1.23 -				Vector3 s = node->get_scaling();
    1.24 +				Vec3 s = node->get_scaling();
    1.25  				switch(key) {
    1.26  				case '=':
    1.27  					node->set_scaling(s * 1.1);
    1.28 @@ -352,7 +352,7 @@
    1.29  					node->set_scaling(s * 0.9);
    1.30  					break;
    1.31  				case '0':
    1.32 -					node->set_scaling(Vector3(1, 1, 1));
    1.33 +					node->set_scaling(Vec3(1, 1, 1));
    1.34  					break;
    1.35  				}
    1.36  			}
    1.37 @@ -388,7 +388,7 @@
    1.38  	if(dx || dy) {
    1.39  		TargetCamera *cam = (TargetCamera*)ctx->scn->get_active_camera();
    1.40  		if(cam && ctx->bnstate[0]) {
    1.41 -			Vector3 cpos = cam->get_position();
    1.42 +			Vec3 cpos = cam->get_position();
    1.43  			float mag = cpos.length();
    1.44  
    1.45  			float theta = atan2(cpos.z / mag, cpos.x / mag) - DEG_TO_RAD(dx * 0.5);