Simply3DScan
PointWriter.WriterAsc Class Reference

Write Points to Asc file More...

Inheritance diagram for PointWriter.WriterAsc:
Collaboration diagram for PointWriter.WriterAsc:

Public Member Functions

void AddPoint (ColorPoint3D point)
 Adds the point. More...
 
void Write (string fileName)
 Writes to specified file name. More...
 

Detailed Description

Write Points to Asc file

Definition at line 13 of file WriterAsc.cs.

Member Function Documentation

void PointWriter.WriterAsc.AddPoint ( ColorPoint3D  point)

Adds the point.

Parameters
pointThe point.

Implements PointWriter.IPointWriter.

Definition at line 25 of file WriterAsc.cs.

26  {
27  this.points.Add(point);
28  }
void PointWriter.WriterAsc.Write ( string  fileName)

Writes to specified file name.

Parameters
fileNameName of the file.

Implements PointWriter.IPointWriter.

Definition at line 36 of file WriterAsc.cs.

37  {
38  System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
39  customCulture.NumberFormat.NumberDecimalSeparator = ".";
40  System.Threading.Thread.CurrentThread.CurrentCulture = customCulture;
41  StreamWriter streamWriter = new StreamWriter(fileName);
42  foreach (ColorPoint3D point in this.points)
43  {
44  //todo color?
45  streamWriter.WriteLine("{0} {1} {2}", (float)point.X, (float)point.Y, (float)point.Z);
46  }
47  streamWriter.Close();
48  }
double Z
Gets or sets the z.
Definition: ColorPoint3D.cs:30
double Y
Gets or sets the y.
Definition: ColorPoint3D.cs:23
double X
Gets or sets the x.
Definition: ColorPoint3D.cs:16

The documentation for this class was generated from the following file: