summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'dimension')
-rw-r--r--dimension/parse.c8
-rw-r--r--dimension/realize.c26
2 files changed, 17 insertions, 17 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 9b174db..4d27be6 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -1164,7 +1164,7 @@ dmnsn_eval_binary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
);
axis = dmnsn_vector_mul(atan(1.0)/45.0, axis);
- r = dmnsn_matrix_vector_mul(dmnsn_rotation_matrix(axis), r);
+ r = dmnsn_transform_vector(dmnsn_rotation_matrix(axis), r);
ret = dmnsn_copy_astnode(astnode);
dmnsn_make_ast_vector(&ret, r.x, r.y, r.z, 0.0, 0.0);
@@ -1271,15 +1271,15 @@ dmnsn_eval_binary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
axis = dmnsn_vector_mul(atan(1.0)/45.0, axis);
- r = dmnsn_matrix_vector_mul(
+ r = dmnsn_transform_vector(
dmnsn_rotation_matrix(dmnsn_new_vector(axis.x, 0.0, 0.0)),
r
);
- r = dmnsn_matrix_vector_mul(
+ r = dmnsn_transform_vector(
dmnsn_rotation_matrix(dmnsn_new_vector(0.0, axis.y, 0.0)),
r
);
- r = dmnsn_matrix_vector_mul(
+ r = dmnsn_transform_vector(
dmnsn_rotation_matrix(dmnsn_new_vector(0.0, 0.0, axis.z)),
r
);
diff --git a/dimension/realize.c b/dimension/realize.c
index a40095a..d0b8fa2 100644
--- a/dimension/realize.c
+++ b/dimension/realize.c
@@ -272,8 +272,8 @@ dmnsn_realize_camera(dmnsn_astnode astnode)
dmnsn_vector_normalize(direction)
)
);
- up = dmnsn_matrix_vector_mul(sky1, up);
- right = dmnsn_matrix_vector_mul(sky1, right);
+ up = dmnsn_transform_vector(sky1, up);
+ right = dmnsn_transform_vector(sky1, right);
dmnsn_matrix sky2 = dmnsn_rotation_matrix(
dmnsn_vector_mul(
@@ -281,8 +281,8 @@ dmnsn_realize_camera(dmnsn_astnode astnode)
dmnsn_vector_normalize(right)
)
);
- up = dmnsn_matrix_vector_mul(sky2, up);
- direction = dmnsn_matrix_vector_mul(sky2, direction);
+ up = dmnsn_transform_vector(sky2, up);
+ direction = dmnsn_transform_vector(sky2, direction);
/* Line up the camera with the look_at */
@@ -293,8 +293,8 @@ dmnsn_realize_camera(dmnsn_astnode astnode)
dmnsn_vector_normalize(up)
)
);
- right = dmnsn_matrix_vector_mul(look_at1, right);
- direction = dmnsn_matrix_vector_mul(look_at1, direction);
+ right = dmnsn_transform_vector(look_at1, right);
+ direction = dmnsn_transform_vector(look_at1, direction);
dmnsn_matrix look_at2 = dmnsn_rotation_matrix(
dmnsn_vector_mul(
@@ -302,8 +302,8 @@ dmnsn_realize_camera(dmnsn_astnode astnode)
dmnsn_vector_normalize(right)
)
);
- up = dmnsn_matrix_vector_mul(look_at2, up);
- direction = dmnsn_matrix_vector_mul(look_at2, direction);
+ up = dmnsn_transform_vector(look_at2, up);
+ direction = dmnsn_transform_vector(look_at2, direction);
break;
}
@@ -349,8 +349,8 @@ dmnsn_realize_camera(dmnsn_astnode astnode)
)
);
- dmnsn_vector x = dmnsn_matrix_vector_mul(align, dmnsn_x);
- dmnsn_vector y = dmnsn_matrix_vector_mul(align, dmnsn_y);
+ dmnsn_vector x = dmnsn_transform_vector(align, dmnsn_x);
+ dmnsn_vector y = dmnsn_transform_vector(align, dmnsn_y);
align = dmnsn_matrix_mul(
dmnsn_rotation_matrix(
@@ -736,19 +736,19 @@ dmnsn_realize_light_source_modifiers(dmnsn_astnode astnode, dmnsn_light *light)
switch (modifier.type) {
case DMNSN_AST_ROTATION:
- light->x0 = dmnsn_matrix_vector_mul(
+ light->x0 = dmnsn_transform_vector(
dmnsn_realize_rotation(modifier),
light->x0
);
break;
case DMNSN_AST_SCALE:
- light->x0 = dmnsn_matrix_vector_mul(
+ light->x0 = dmnsn_transform_vector(
dmnsn_realize_scale(modifier),
light->x0
);
break;
case DMNSN_AST_TRANSLATION:
- light->x0 = dmnsn_matrix_vector_mul(
+ light->x0 = dmnsn_transform_vector(
dmnsn_realize_translation(modifier),
light->x0
);