Namespace rtc

xeokit RTC Coordinate Utilities


Mathematical functions for working with Relative-To-Center (RTC) Cartesian coordinates


These utilities provide a set of mathematical functions to work with the Relative-to-Center (RTC) coordinate system. RTC is particularly useful for handling large-scale 3D data and transforming coordinates relative to a defined origin (RTC center). These utilities are primarily used internally within the Viewer.

To install the necessary package, run the following command:

npm install @xeokit/sdk
import { worldToRTCPos } from "@xeokit/sdk/rtc";

const worldPos = [100000000000.0, 1000000000.0, 1000000000000.0];
const rtcCenter = [0, 0, 0];
const rtcPos = [0, 0, 0];

rtc.worldToRTCPos(worldPos, rtcCenter, rtcPos);
// The rtcPos now contains the RTC offset from rtcCenter

Variables

RTC_CELL_SIZE

Functions

createRTCModelMat
createRTCViewMat
getPlaneRTCPos
rtcToWorldPos
worldToRTCCenter
worldToRTCPos
worldToRTCPositions