L3DT documentation
Large 3D terrain generator

This is an old revision of the document!


vector3f

Description

vector3f is structure used to describe a 3-dimensional vector in floating-point precision. This data type is more precise than vector3c but is less compact. Therefore, vector3f is used for several calculation settings (for greater accuracy), but is not used in vector map data (for space reasons).

Vectors may or may not be normalised.

Definition

In ExtAPI_defines.h:

typedef struct {
  float x;
  float y;
  float z;
} vector3f;

Member data

Member name Type Comments
x float The vector component in the x-axis.
y float The vector component in the y-axis.
z float The vector component in the z-axis.

Type identifiers

VarID VarID_vector3f
MapID N/A (vector3f is not a valid map type.)

Comments

Although the vector components are named x, y and z, these members may be used to describe any 3-dimensional vector. As an example, the light-mapping algorithm in L3DT uses a vector3f struct to describe light absorption, and the three members represent the absorption half-depths of red, green and blue light.

 
zeolite/types/vector3f.1294889353.txt.gz · Last modified: 2017/08/31 04:57 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki