A Vector3d represents a quantity such as a displacement or velocity in 3D, and
is defined by its X, Y and Z components. This module contains a variety of
vector-related functionality, such as
Note that unlike in many other geometry packages where vectors are used as a
general-purpose data type, opensolid/geometry has separate data types for
vectors, directions and points. In most code it is actually more common to use
Point3d and Direction3d than Vector3d, and much code can avoid working
directly with Vector3d values at all!
Although there are no predefined constants for the vectors with components
(1, 0, 0), (0, 1, 0) and (0, 0, 1), in most cases
you will actually want their Direction3d versions Direction3d.x,
Direction3d.y and Direction3d.z.
Note that for all transformations, only the orientation of the given axis or plane is relevant, since vectors are position-independent. Think of transforming a vector as placing its tail on the relevant axis or plane and then transforming its tip.
Like other transformations, coordinate transformations of vectors depend only on the orientations of the relevant frames/sketch planes, not their positions.