OFF Files
File format
- Read and write OFF files
Supported features
- Read OFF ASCII files
- Vertex positions
API
PMesh.createmesh
— Methodmesh = createmesh(::OFF[; real_type=Float64, dimx=Val(3), dimu=Val(2)])
Create an empty mesh with all attributes that may be read from an OFF file: position, normal, and texture coordinates:
- vertex attributes
:x
,:n
,:u
,:c
- face attributes:
:n
The latter stores texture coordinates and normals that are defined for each vertex of a face.
PMeshIO.readmesh
— MethodDelegate to readoffmesh
PMeshIO.readoffmesh
— Functionmesh = readoffmesh(io, template::Mesh[; position=Val(:x))
Read mesh
of same type as template
from OFF data steam io
.
position
denotes the vertex position attribute inmesh
This method is called by readmesh
See also readmesh
PMeshIO.writemesh
— MethodDelegate to writeoffmesh
PMeshIO.writeoffmesh
— Functionwriteoffmesh(io, mesh[; position=Val(:x), format="%g"])
Write mesh
to io
in OFF format using attributes
position
Pass nothing
to ignore an optional attribute. Attributes the are disabled are also ignored, i.e., not written.
The optional format
argument specifies the output format of a floating point number as a String
using sprintf
-syntax.
This method is called by writemesh
.
See also writemesh
, readoffmesh