Skip to content

Intermact API Reference / @intermact/core / CoordinateTransform3D

Class: CoordinateTransform3D ​

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:22

Scene coordinate transforms for a 3D scene (design.md §7.2, §10). Mirror of CoordinateTransform2D: maps between absolute world coordinates and normalized domain UVW, plus cylindrical/spherical conversions for the matching coordinate systems. In 3D the math space is the world space, so the camera (not this transform) handles projection.

Constructors ​

Constructor ​

new CoordinateTransform3D(domain?, system?): CoordinateTransform3D

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:26

Parameters ​

domain? ​

Domain3D = UNIT_DOMAIN_3D

system? ​

CoordinateSystem3D = "cartesian"

Returns ​

CoordinateTransform3D

Properties ​

domain ​

readonly domain: Domain3D

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:24

World-coordinate domain (defaults to the unit cube).


system ​

readonly system: CoordinateSystem3D = "cartesian"

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:28

Methods ​

absToRel() ​

absToRel(value): Vec3

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:34

Map absolute world coordinates to normalized domain UVW in [0,1]³.

Parameters ​

value ​

AbsXYZ

Returns ​

Vec3


fromCylindrical() ​

fromCylindrical(r, theta, z): AbsXYZ

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:63

Absolute point from cylindrical coordinates.

Parameters ​

r ​

number

theta ​

number

z ​

number

Returns ​

AbsXYZ


fromSpherical() ​

fromSpherical(r, theta, phi): AbsXYZ

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:81

Absolute point from spherical coordinates.

Parameters ​

r ​

number

theta ​

number

phi ​

number

Returns ​

AbsXYZ


relToAbs() ​

relToAbs(value): AbsXYZ

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:44

Map normalized domain UVW back to absolute world coordinates.

Parameters ​

value ​

Vec3

Returns ​

AbsXYZ


toCylindrical() ​

toCylindrical(value): object

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:54

Cylindrical radius/angle (radians)/height of an absolute point (z is the axis).

Parameters ​

value ​

AbsXYZ

Returns ​

object

r ​

readonly r: number

theta ​

readonly theta: number

z ​

readonly z: number


toSpherical() ​

toSpherical(value): object

Defined in: packages/core/src/layout/coordinate-transform-3d.ts:71

Spherical radius / azimuth theta (around z) / polar phi (from +z) of an absolute point, all in radians.

Parameters ​

value ​

AbsXYZ

Returns ​

object

phi ​

readonly phi: number

r ​

readonly r: number

theta ​

readonly theta: number

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)