Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-ply Reference Manual, version 0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:39:56 2020 GMT+0.
• Introduction | What cl-ply is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Cl-ply is a library to handle PLY format which is also known as the Stanford Triangle Format.
Here shows hot to read PLY file with cl-ply.
The following is an example PLY file:
ply
format ascii 1.0
comment this is test ply data.
element vertex 2
property float x
property float y
property float z
element face 2
property list uchar int vertex_indices
end_header
0.0 1.0 2.0
3.0 4.0 5.0
4 0 1 2 3
4 4 5 6 7
It contains two elements, vertex
that has three float properties and face
that has a list property of integer.
You can read the PLY file as following:
;; open a PLY file, closed automatically when control leaves
(cl-ply:with-ply-for-reading (plyfile #P"/path/to/file.ply")
;; read and print vertex elements
(loop repeat (cl-ply:ply-element-size plyfile "vertex")
do (format t "element vertex ~S~%"
(cl-ply:ply-read-element plyfile "vertex")))
;; read and print face elements
(loop repeat (cl-ply:ply-element-size plyfile "face")
do (format t "element face ~S~%"
(cl-ply:ply-read-element plyfile "face"))))
Cl-ply can be installed via Quicklisp.
(ql:quickload :cl-ply)
WITH-PLY-FOR-READING (var filespec) form* => results
Opens a file stream named by filespec
and creates a plyfile object, reading PLY headers from the file. The plyfile object is bound to var
. with-ply
evaluates form
as an implicit progn with var
and returns the result values. When control leaves the forms, either normally and abnormally, the file stream is automatically closed.
OPEN-PLY-FOR-READING filespec => plyfile
Opens a file stream named by filespec
, creates a plyfile object and returns it. The plyfile object should be closed after its use.
PLY-CLOSE plyfile => result
Closes the plyfile object plyfile
. The return value is that of standard's close
function.
PLY-ELEMENT-NAMES plyfile => element-names
Returns all names of elements in plyfile
.
PLY-ELEMENT-SIZE plyfile element-name => size
Returns the number of elements named by element-name
in plyfile
.
PLY-READ-ELEMENT plyfile element-name => result
Reads an element of element-name
from plyfile
and returns as a list of its properties.
PLY-COMMENTS plyfile => comments
Returns a list of comments in plyfile
.
PLY-OBJ-INFO plyfile => obj_info
Returns object information in plyfile
.
Q. Does cl-ply support writing PLY format?
A. No. Currenly, only reading PLY format is supported.
Q. Does cl-ply support reading / writing PLY format in binary type?
A. No. Currently, only ASCII type is supported.
Copyright (c) 2013 Masayuki Takagi (kamonama@gmail.com)
Licensed under the LLGPL License.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-ply system |
Masayuki Takagi
LLGPL
Cl-ply is a library to handle PLY format which is also known as the Stanford Triangle Format.
# Cl-Ply
[](https://travis-ci.org/takagi/cl-ply)
[](https://coveralls.io/r/takagi/cl-ply)
Cl-ply is a library to handle PLY format which is also known as the Stanford Triangle Format.
## Example
Here shows hot to read PLY file with cl-ply.
The following is an example PLY file:
ply
format ascii 1.0
comment this is test ply data.
element vertex 2
property float x
property float y
property float z
element face 2
property list uchar int vertex_indices
end_header
0.0 1.0 2.0
3.0 4.0 5.0
4 0 1 2 3
4 4 5 6 7
It contains two elements, ‘vertex‘ that has three float properties and ‘face‘ that has a list property of integer.
You can read the PLY file as following:
;; open a PLY file, closed automatically when control leaves
(cl-ply:with-ply-for-reading (plyfile #P"/path/to/file.ply")
;; read and print vertex elements
(loop repeat (cl-ply:ply-element-size plyfile "vertex")
do (format t "element vertex ~S~%"
(cl-ply:ply-read-element plyfile "vertex")))
;; read and print face elements
(loop repeat (cl-ply:ply-element-size plyfile "face")
do (format t "element face ~S~%"
(cl-ply:ply-read-element plyfile "face"))))
## Installation
Cl-ply can be installed via Quicklisp.
(ql:quickload :cl-ply)
## API
### [Macro] with-ply-for-reading
WITH-PLY-FOR-READING (var filespec) form* => results
Opens a file stream named by ‘filespec‘ and creates a plyfile object, reading PLY headers from the file. The plyfile object is bound to ‘var‘. ‘with-ply‘ evaluates ‘form‘ as an implicit progn with ‘var‘ and returns the result values. When control leaves the forms, either normally and abnormally, the file stream is automatically closed.
### [Function] ply-open-for-reading
OPEN-PLY-FOR-READING filespec => plyfile
Opens a file stream named by ‘filespec‘, creates a plyfile object and returns it. The plyfile object should be closed after its use.
### [Function] ply-close
PLY-CLOSE plyfile => result
Closes the plyfile object ‘plyfile‘. The return value is that of standard’s ‘close‘ function.
### [Function] ply-element-names
PLY-ELEMENT-NAMES plyfile => element-names
Returns all names of elements in ‘plyfile‘.
### [Function] ply-element-size
PLY-ELEMENT-SIZE plyfile element-name => size
Returns the number of elements named by ‘element-name‘ in ‘plyfile‘.
### [Function] ply-read-element
PLY-READ-ELEMENT plyfile element-name => result
Reads an element of ‘element-name‘ from ‘plyfile‘ and returns as a list of its properties.
### [Function] ply-comments
PLY-COMMENTS plyfile => comments
Returns a list of comments in ‘plyfile‘.
### [Function] ply-obj-info
PLY-OBJ-INFO plyfile => obj_info
Returns object information in ‘plyfile‘.
## FAQ
**Q. Does cl-ply support writing PLY format?**
A. No. Currenly, only reading PLY format is supported.
**Q. Does cl-ply support reading / writing PLY format in binary type?**
A. No. Currently, only ASCII type is supported.
## Reference
* [PLY - Polygon File Format](http://paulbourke.net/dataformats/ply/)
## Author
* Masayuki Takagi (kamonama@gmail.com)
## Copyright
Copyright (c) 2013 Masayuki Takagi (kamonama@gmail.com)
## License
Licensed under the LLGPL License.
0.1
cl-ply.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The cl-ply/src module |
cl-ply (system)
src/
cl-ply.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-ply.asd file | ||
• The cl-ply/src/cl-ply.lisp file |
Next: The cl-ply/src/cl-ply․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-ply.asd
cl-ply (system)
Previous: The cl-ply․asd file, Up: Lisp files [Contents][Index]
src (module)
src/cl-ply.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-ply-asd package | ||
• The cl-ply package |
Next: The cl-ply package, Previous: Packages, Up: Packages [Contents][Index]
cl-ply.asd
Previous: The cl-ply-asd package, Up: Packages [Contents][Index]
cl-ply.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
cl-ply.lisp (file)
Previous: Exported macros, Up: Exported definitions [Contents][Index]
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal structures | ||
• Internal types |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
cl-ply.lisp (file)
cl-ply.lisp (file)
Next: Internal structures, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
cl-ply.lisp (file)
Next: Internal types, Previous: Internal functions, Up: Internal definitions [Contents][Index]
cl-ply.lisp (file)
structure-object (structure)
:text
comment-text (function)
(setf comment-text) (function)
cl-ply.lisp (file)
structure-object (structure)
:name
element-name (function)
(setf element-name) (function)
:size
element-size (function)
(setf element-size) (function)
element-properties (function)
(setf element-properties) (function)
cl-ply.lisp (file)
structure-object (structure)
:count-type
list-property-count-type (function)
(setf list-property-count-type) (function)
:element-type
list-property-element-type (function)
(setf list-property-element-type) (function)
:name
list-property-name (function)
(setf list-property-name) (function)
cl-ply.lisp (file)
structure-object (structure)
:text
obj-info-text (function)
(setf obj-info-text) (function)
cl-ply.lisp (file)
structure-object (structure)
plyfile-stream (function)
(setf plyfile-stream) (function)
plyfile-file-type (function)
(setf plyfile-file-type) (function)
plyfile-version (function)
(setf plyfile-version) (function)
plyfile-elements (function)
(setf plyfile-elements) (function)
plyfile-comments (function)
(setf plyfile-comments) (function)
plyfile-obj-info (function)
(setf plyfile-obj-info) (function)
cl-ply.lisp (file)
structure-object (structure)
:type
scalar-property-type (function)
(setf scalar-property-type) (function)
:name
scalar-property-name (function)
(setf scalar-property-name) (function)
Previous: Internal structures, Up: Internal definitions [Contents][Index]
cl-ply.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L M |
---|
Jump to: | C F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
C E F H L M O P R S W |
---|
Jump to: | %
(
C E F H L M O P R S W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | +
C E F N O P S T V |
---|
Jump to: | +
C E F N O P S T V |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C E L O P S T |
---|
Jump to: | C E L O P S T |
---|