Module anchor

Module anchor 

Source
Expand description

Anchor

Ranim has an anchor system based on generics, an anchor can be any type T, and types that implements Locate<T> can use Locate::locate to convert the anchor to a DVec3 point.

Ranim provides some built-in anchors and related Locate implementations:

  • DVec3: The point itself in 3d space.
  • Centroid: The avg point of all points. Note that sometime the center of Aabb is not the centroid. (0, 0, 0) is the center point.
  • AabbPoint: A point based on Aabb’s size, the number in each axis means the fraction of the size of the Aabb.

Structs§

AabbPoint
A point based on Aabb, the number in each axis means the fraction of the size of the Aabb. (0, 0, 0) is the center point.
Centroid
The centroid.

Traits§

Aabb
Axis-Aligned Bounding Box
Locate
Locate a point.