Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created May 27, 2018 12:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save flushpot1125/5aa5c451857e9024b3cabdef13297fbb to your computer and use it in GitHub Desktop.
/* ●がある箇所は、ファイル 書き込みに最低限必要な箇所*/
/*●*/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