Skip to content

Commit b09dec2

Browse files
committed
resold the bug for the plan not moving the origin
1 parent 2ba1f77 commit b09dec2

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

scenes/basic_shapes.rt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ A 0.2 255,255,255
22

33
C 0.0,5,-20 0,0,1 70
44

5-
L -40.0,50.0,0.0 0.6 10,0,255
5+
L -40.0,50.0,0.0 0.6 255,255,255
6+
67

78
sp 0.0,0.0,0 5 10,0,255
89

9-
pl 0.0,0.0,0 0.0,1.0,0.0 0,0,225
10+
pl 0.0,-10.0,0 0.0,-1.0,0.0 0,255,225
1011

11-
cy 10.0,0.0,20.6 1,1,0 5.2 7.42 10,0,255

src/minRT.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# define TRUE 0
1717
# define FALSE 1
1818

19-
# define WALL_X 200
20-
# define WALL_Y 200
19+
# define WALL_X 500
20+
# define WALL_Y 500
2121
# define WALL_Z 1.0
2222
# define WALL_SIZE 1.0
2323
# define CUBE 64

src/parser/parser_elements.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ void parse_plane(char *line, t_minirt *data, int fd)
9696
parse_reflect(&line, &val[9], fd);
9797
has_pattern = parse_pattern(&line, &colors[0], &colors[1]);
9898
plane = create_plane_parser(
99-
create_point(val[0], val[1], val[2]),
99+
create_point(0, 0, 0),
100100
normalize(create_vector(val[3], val[4], val[5])));
101101
obj_plane = create_object(&plane,
102102
OBJ_PLANE, get_plane_mat(val, colors[0], colors[1], has_pattern),
103103
NULL);
104104

105105
ray_set_transform_obj(obj_plane, mat_multip(mat_gener_scal(1, 1, 1),
106-
mat_gener_trans(0, 0, 0)));
106+
mat_gener_trans(val[0], val[1], val[2])));
107107
ft_add_node(obj_plane, &data->word);
108108
}
109109

src/parser/parser_elements_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ t_mater get_sphere_mat(double *val, char **line)
2525
else
2626
return (obj_material_init(
2727
c_new(val[4] / 255.0, val[5] / 255.0, val[6] / 255.0),
28-
c_new(-1, -1, -1), obj_init_values_material(0.1, 0.6, 0.3, 100),
28+
c_new(-1, -1, -1), obj_init_values_material(0.9, 0.6, 0.3, 100),
2929
val[7]));
3030
}
3131

0 commit comments

Comments
 (0)