Class PlyReader
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
Polygon File Format Reader.
[Obsolete("Suggest to use HelixToolkit.SharpDX.Assimp")]
public class PlyReader : ModelReader, IModelReader
- Inheritance
-
PlyReader
- Implements
- Inherited Members
Remarks
This reader only reads ascii ply formats. This was initially meant to read models exported by Blender 3D Software.
Constructors
PlyReader()
Initializes a new PlyReader.
public PlyReader()
Properties
Faces
public IList<int[]>? Faces { get; }
Property Value
FacesNumber
Gets or sets the number of faces.
public int FacesNumber { get; }
Property Value
Normals
Gets or sets the normal vectors of this ply model.
public IList<Vector3>? Normals { get; }
Property Value
ObjectInformation
Contains information about the Ply file received.
public Dictionary<string, double>? ObjectInformation { get; }
Property Value
TextureCoordinates
Gets or sets the texture coordinates of the ply model.
public IList<Vector2>? TextureCoordinates { get; }
Property Value
Remarks
S,T->X,Y
Vertices
Gets or sets the vertices of this ply model.
public IList<Vector3>? Vertices { get; }
Property Value
VerticesNumber
Gets or sets the number of vertices.
public int VerticesNumber { get; }
Property Value
Methods
CreateMesh()
Creates a mesh from the loaded file.
public MeshGeometry3D CreateMesh()
Returns
CreateMeshGeometry3D()
Creates a MeshGeometry3D object from the loaded file. Polygons are triangulated using triangle fans.
public MeshGeometry3D CreateMeshGeometry3D()
Returns
CreateModel3D()
Creates a List<T> from the loaded file.
public List<Object3D> 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)
public void Load(string filepath)
Parameters
filepathstring
Read(Stream, ModelInfo)
Reads the model from the specified stream.
public override List<Object3D>? Read(Stream s, ModelInfo info = default)
Parameters
Returns
Read(string)
Reads the model from the specified path.
public List<Object3D>? Read(string path)
Parameters
pathstringThe path.