Class PlyReader
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Polygon File Format Reader.
public sealed class PlyReader : ModelReader, IModelReader
- Inheritance
-
PlyReader
- Implements
- Inherited Members
Remarks
https://www.cc.gatech.edu/projects/large_models/ply.html http://graphics.stanford.edu/data/3Dscanrep/
Constructors
PlyReader(Dispatcher?)
Initializes a new PlyReader.
public PlyReader(Dispatcher? dispatcher = null)
Parameters
dispatcherDispatcher
Fields
SUPPORTEDVERSION
The supported version of the ply format.
public static readonly Version SUPPORTEDVERSION
Field Value
Properties
Body
Gets or sets the body of the loaded ply file.
public List<PlyReader.PlyElement> Body { get; }
Property Value
Header
Gets or sets the header of the loaded ply file.
public PlyReader.PlyHeader Header { get; }
Property Value
Methods
CreateMesh()
Creates a mesh from the loaded file.
public Mesh3D CreateMesh()
Returns
CreateMeshGeometry3D()
Creates a MeshGeometry3D object from the loaded file. Polygons are triangulated using triangle fans.
public MeshGeometry3D CreateMeshGeometry3D()
Returns
CreateModel3D()
Creates a Model3DGroup from the loaded file.
public Model3DGroup CreateModel3D()
Returns
Load(Stream)
Loads a ply file from the Stream.
public void Load(Stream s)
Parameters
sStreamThe stream containing the ply file.
Load(string)
Loads a plyfile from the specified filepath.
public void Load(string path)
Parameters
pathstringThe filepath.
LoadPlyFile(Stream)
Loads a ply file from the stream but doesn't consume it.
public Tuple<PlyReader.PlyHeader, List<PlyReader.PlyElement>> LoadPlyFile(Stream plyFileStream)
Parameters
plyFileStreamStream
Returns
Remarks
This could be useful when we have several streams of plyfiles to reconstruct into a single mesh, without updating the Header and Body properties of this reader.
Read(Stream)
Reads the model from the specified stream.
public override Model3DGroup Read(Stream s)
Parameters
sStreamThe stream.
Returns
Read(string)
Reads the model from the specified path.
public override Model3DGroup Read(string path)
Parameters
pathstringThe path.
Returns
- Model3DGroup
The model.