This is the terrable Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:53:09 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
terrable
Terragen TER file format reader
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
zlib
1.0.0
fast-io
(system).
ieee-floats
(system).
static-vectors
(system).
trivial-garbage
(system).
documentation-utils
(system).
package.lisp
(file).
terrable.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
terrable/terrable.lisp
package.lisp
(file).
terrable
(system).
chunk-type
(reader method).
curvature-type
(reader method).
curve-mode
(reader method).
(setf curve-mode)
(writer method).
curve-radius
(reader method).
(setf curve-radius)
(writer method).
data
(reader method).
(setf data)
(writer method).
free-terrain
(method).
header
(reader method).
height
(reader method).
(setf height)
(writer method).
height-base
(reader method).
(setf height-base)
(writer method).
height-scale
(reader method).
(setf height-scale)
(writer method).
invalid-header
(condition).
print-object
(method).
read-terrain
(generic function).
scale
(reader method).
(setf scale)
(writer method).
stream-position
(reader method).
terrable-condition
(condition).
terrain
(class).
unknown-chunk-type
(condition).
unknown-curvature-type
(condition).
width
(reader method).
(setf width)
(writer method).
write-terrain
(generic function).
check-header
(function).
read-buffer
(function).
read-chunk
(function).
read-marker
(function).
write-buffer
(function).
write-marker
(function).
terrable/documentation.lisp
terrable.lisp
(file).
terrable
(system).
Packages are listed by definition order.
terrable
org.shirakumo.fraf.terrable
common-lisp
.
chunk-type
(generic reader).
curvature-type
(generic reader).
curve-mode
(generic reader).
(setf curve-mode)
(generic writer).
curve-radius
(generic reader).
(setf curve-radius)
(generic writer).
data
(generic reader).
(setf data)
(generic writer).
free-terrain
(generic function).
header
(generic reader).
height
(generic reader).
(setf height)
(generic writer).
height-base
(generic reader).
(setf height-base)
(generic writer).
height-scale
(generic reader).
(setf height-scale)
(generic writer).
invalid-header
(condition).
read-terrain
(generic function).
scale
(generic reader).
(setf scale)
(generic writer).
stream-position
(generic reader).
terrable-condition
(condition).
terrain
(class).
unknown-chunk-type
(condition).
unknown-curvature-type
(condition).
width
(generic reader).
(setf width)
(generic writer).
write-terrain
(generic function).
check-header
(function).
read-buffer
(function).
read-chunk
(function).
read-marker
(function).
write-buffer
(function).
write-marker
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Returns the unknown 4-letter string chunk-type that was encountered.
See UNKNOWN-CHUNK-TYPE
unknown-chunk-type
)) ¶Returns the unknown curvature type.
See UNKNOWN-CURVATURE-TYPE
unknown-curvature-type
)) ¶Returns the curvature mode of the terrain.
This value is a keyword for known curve modes, or an integer for
unknown ones. The following known modes exist:
:FLAT — The terrain is a flat map.
:DRAPED — The terrain is draped over a sphere with a radius of
(/ (* CURVE-RADIUS 1000) (third SCALE))
with its centre point being at
X: (/ WIDTH 2)
Y: (/ HEIGHT 2)
Z: (/ (* CURVE-RADIUS -1000) (third SCALE))
See TERRAIN
Returns the curve radius for spherical terrains.
This value is a float in the unit of kilometres. The default value
is 6370, an approximation of Earth’s radius. Note that this value is
only relevant if CURVE-MODE is :DRAPED.
See TERRAIN
Returns a static-vector of the pixel data that makes up the terrain.
This pixel-data is a sequence of 16 bit signed integers.
Note that these units are not directly in the scale of SCALE, but must
first be normalised by adding HEIGHT-BASE and then multiplying by
HEIGHT-SCALE.
Finally, note that this is a static-vector and is thus directly passable
to C by using STATIC-VECTORS:STATIC-VECTOR-POINTER.
See HEIGHT-BASE
See HEIGHT-SCALE
See STATIC-VECTORS:STATIC-VECTOR-POINTER
See TERRAIN
Instantly frees the data array in the terrain instance.
After calling this function on a TERRAIN instance, its data slot will contain NIL and all references to the former data array will be invalid.
See TERRAIN
Returns the offending header that did not match.
See INVALID-HEADER
invalid-header
)) ¶Returns the height (in pixels) of the terrain.
See TERRAIN
Returns the base height of the terrain.
This height should be added to all points in the data terrain.
See TERRAIN
Returns the height scaling factor of the terrain.
This factor should be multiplied with all points in the data terrain
after HEIGHT-BASE has been added to receive a height that is properly
scaled.
See TERRAIN
See HEIGHT-BASE
Parses the given thing as a Terragen terrain.
Returns the complete TERRAIN instance if successful. This function will
signal conditions of type TERRABLE-CONDITION should problems occur while
parsing the format.
The input can be either a FAST-IO:INPUT-BUFFER, a STREAM, a PATHNAME, a
STRING, or a VECTOR with (UNSIGNED-BYTE 8) element-type.
See TERRAIN
See TERRABLE-CONDITION
See INVALID-HEADER
See UNKNOWN-CHUNK-TYPE
See UNKNOWN-CURVATURE-TYPE
Returns the scaling factors to turn pixel coordinates into real-world units.
This is a list of three floats (X, Y, Z), each of which represent
the number of pixel units in that direction represent a metre.
The default is (30 30 30), meaning 30 pixels in any direction for a
metre.
See TERRAIN
Returns the fast-io buffer/stream’s position at which the problem occurred.
See TERRABLE-CONDITION
terrable-condition
)) ¶Returns the width (in pixels) of the terrain.
See TERRAIN
Writes the given terrain object to a Terragen TER format.
The input can either be a FAST-IO:OUTPUT-BUFFER, a STREAM, a PATHNAME,
the keyword :VECTOR, or the keyword :STATIC. In the latter two cases, a
vector with the written output is returned. In the case of a pathname,
an error is signalled if the file already exists.
See TERRAIN
Error signalled when the file header is invalid.
See HEADER
See TERRABLE-CONDITION
error
.
terrable-condition
.
Base condition for all problems related to Terragen files.
See STREAM-POSITION
condition
.
common-lisp
.
:position
This slot is read-only.
Warning signalled when an unknown chunk type is encountered.
Since an unknown chunk type cannot be read, it is very likely that the
rest of the file will be read as garbage as well and the read won’t
succeed.
See CHUNK-TYPE
See TERRABLE-CONDITION
terrable-condition
.
warning
.
:chunk-type
This slot is read-only.
Warning signalled when an unknown curvature type is encountered.
The curvature type is stored in its integer form in the TERRAIN instance’s
CURVE-MODE slot.
See CURVATURE-TYPE
See TERRABLE-CONDITION
terrable-condition
.
warning
.
:curvature-type
This slot is read-only.
Container for all data read from a Terragen terrain file.
If some data is not explicitly provided by the terrain file, the slots
will contain default values.
WARNING: When a TERRAIN instance is garbage-collected, its DATA vector is automatically deallocated with it. If you keep foreign references to the data, or reference it somewhere else, you will need to keep a reference to the TERRAIN instance around as well, copy the contents of the data vector elsewhere, or call TG:CANCEL-FINALIZATION on the TERRAIN instance to get rid of its automatic deallocation behaviour. If you would like to manually free the terrain instantly, use FREE-TERRAIN.
See WIDTH
See HEIGHT
See SCALE
See CURVE-RADIUS
See CURVE-MODE
See HEIGHT-BASE
See HEIGHT-SCALE
See DATA
See READ-TERRAIN
See FREE-TERRAIN
(list 30 30 30)
6370.0
:flat
0
1.0
Jump to: | (
C D F G H M P R S W |
---|
Jump to: | (
C D F G H M P R S W |
---|
Jump to: | C D H P S W |
---|
Jump to: | C D H P S W |
---|
Jump to: | C D F I P S T U |
---|
Jump to: | C D F I P S T U |
---|