A Java implementation of Roblox-inspired CFrame transformations for working with 3D positions and orientations. Designed for applications such as robotics, coordinate transformations, and 3D simulations.
Vector3CFrametoWorldSpace()toObjectSpace()CFrame base = new CFrame(
0, 0, 0,
0, Math.toRadians(90), 0
);
CFrame firstJoint =
base.toWorldSpace(new CFrame(0, 0, -2));
CFrame secondJoint =
firstJoint.toWorldSpace(new CFrame(0, 0, -3));
CFrame tool =
secondJoint.toWorldSpace(new CFrame(0, 0, -1));
This example calculates the positions of successive robot-arm joints using relative transformations.
First joint: -2.0, 0.0, 0.0
Second joint: -5.0, 0.0, 0.0
Tool: -6.0, 0.0, 0.0
This project is complete