Struct JointFrame
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
A joint frame: where a joint attaches to a body, and how it is oriented there.
public readonly record struct JointFrame : IEquatable<JointFrame>Implements
Inherited Members
Remarks
Frames are measured from the body origin rather than from the centre of mass, for two reasons: you rarely know where the centre of mass will end up, and attaching or removing a shape moves it, which would silently move every joint on the body.
Which axis matters depends on the joint. A revolute joint turns about the frame's z axis; a prismatic joint slides along its x axis. Use Box3D.Joint.FramesFromWorldAnchor(Box3D.Body,Box3D.Body,System.Numerics.Vector3,System.Numerics.Vector3) to build a matched pair from a world-space anchor and axis instead of working them out by hand.
Constructors
- JointFrame(Vector3, Quaternion)
-
Initializes a new instance of the Box3D.JointFrame struct.
- JointFrame(Vector3)
-
Initializes a new instance with no rotation.