質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,9 +42,15 @@
|
|
42
42
|
|
43
43
|
```C++
|
44
44
|
|
45
|
+
|
46
|
+
|
47
|
+
//点群モデルの点群数
|
48
|
+
|
45
49
|
#define point_number 11646
|
46
50
|
|
47
51
|
|
52
|
+
|
53
|
+
//各点群のx.y.z座標の配列を用意
|
48
54
|
|
49
55
|
point_cloud_model_xsort = (int*)malloc(sizeof(int) * point_number);
|
50
56
|
|
@@ -58,15 +64,25 @@
|
|
58
64
|
|
59
65
|
|
60
66
|
|
67
|
+
//csvファイル読み込み
|
68
|
+
|
61
69
|
FILE* fp;
|
62
70
|
|
63
71
|
sprintf_s(data_file, "tyrannno_000_para_data_100split_z.csv");
|
64
72
|
|
65
73
|
fopen_s(&fp, "tyrannno_000_para_data_100split_z.csv", "rb");
|
66
74
|
|
75
|
+
|
76
|
+
|
77
|
+
//配列に移す
|
78
|
+
|
67
79
|
while (fscanf_s(fp, "%d,%d,%d", &point_cloud_model_xsort[0], &point_cloud_model_ysort[1], &point_cloud_model_xsort[2]) != EOF) {
|
68
80
|
|
81
|
+
|
82
|
+
|
83
|
+
//printfで値を確認
|
84
|
+
|
69
|
-
|
85
|
+
printf("%d,%d,%d\n", point_cloud_model_xsort[0], point_cloud_model_ysort[1], point_cloud_model_zsort[2]);
|
70
86
|
|
71
87
|
}
|
72
88
|
|