@@ -50,7 +50,10 @@ namespace proc3d {
50
50
/* setup ops */
51
51
52
52
void proc3d_load_object (void * context, const char * name, const char * filename, const double x, const double y, const double z) {
53
- boost::array<double , 3 > arr = boost::array<double , 3 >({x,y,z});
53
+ boost::array<double , 3 > arr = boost::array<double , 3 >();
54
+ arr[0 ] = x;
55
+ arr[1 ] = y;
56
+ arr[2 ] = z;
54
57
getContext (context)->setupOps .push (LoadObject (name, filename, arr));
55
58
}
56
59
@@ -69,7 +72,10 @@ namespace proc3d {
69
72
void proc3d_create_box (void * context, const char * name,
70
73
const double x, const double y, const double z,
71
74
const double width, const double length, const double height) {
72
- boost::array<double , 3 > arr = boost::array<double , 3 >({x,y,z});
75
+ boost::array<double , 3 > arr = boost::array<double , 3 >();
76
+ arr[0 ] = x;
77
+ arr[1 ] = y;
78
+ arr[2 ] = z;
73
79
getContext (context)->setupOps .push (CreateBox (name, width, length, height, arr));
74
80
}
75
81
@@ -78,12 +84,19 @@ namespace proc3d {
78
84
}
79
85
80
86
void proc3d_create_cylinder (void * context, const char * name, const double x, const double y, const double z, const double height, const double radius) {
81
- boost::array<double , 3 > arr = boost::array<double , 3 >({x,y,z});
82
- getContext (context)->setupOps .push (CreateCylinder{name, radius, height, arr});
87
+ boost::array<double , 3 > arr = boost::array<double , 3 >();
88
+ arr[0 ] = x;
89
+ arr[1 ] = y;
90
+ arr[2 ] = z;
91
+ CreateCylinder cylinder = CreateCylinder (name, radius, height, arr);
92
+ getContext (context)->setupOps .push (cylinder);
83
93
}
84
94
85
95
void proc3d_create_cone (void * context, const char * name, const double x, const double y, const double z, const double height, const double radius) {
86
- boost::array<double , 3 > arr = boost::array<double , 3 >({x,y,z});
96
+ boost::array<double , 3 > arr = boost::array<double , 3 >();
97
+ arr[0 ] = x;
98
+ arr[1 ] = y;
99
+ arr[2 ] = z;
87
100
getContext (context)->setupOps .push (CreateCone (name, radius, height, arr));
88
101
}
89
102
0 commit comments