Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/* ●がある箇所は、ファイル 書き込みに最低限必要な箇所*/
/**/string filepath = pointcloudDataPath + "/"+DateTime.Now.ToString("yyyyMMddHHmmss")+".csv";//ToStringの引数に入れた形で日付が整形される
/**/StreamWriter sw= new StreamWriter(filepath, true);//trueを入れると、append(追記)になる
int maxPointIndex = indices.Length;
int endLoopCount =0;
for(int i=0; i<maxPointIndex;i++){
if( (indices[i] ==0) && (m_Points[i].x == 0) && (m_Points[i].y == 0) && (m_Points[i].z == 0) ){
endLoopCount++;
if(endLoopCount == 3){
break;
}
}
string tmp = indices[i].ToString()+","+m_Points[i].x.ToString()+","+m_Points[i].y.ToString()+","+m_Points[i].z.ToString();
/**/sw.WriteLine(tmp);
}
/**/sw.Flush();
/**/sw.Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment