Skip to main content

LCC for Web Manual · v0.6.3 · Page 49 of 68

LCCObject::setTranslation

Sets the translation of the LCC model.

Version Requirement

SDK v0.3.1+

Engine Support

CesiumJS

API

LCCObject::setTranslation(translation: Cesium.Cartesian3): void

Parameters

ParameterTypeRequiredDefaultDescription
translationCesium.Cartesian3Yes-Before SDK v0.6.3: WGS84 Cartesian coordinates (sets the model origin position). SDK v0.6.3+: translation in ENU coordinate system.

Return Value

void

Usage Example

SDK v0.3.1 – v0.6.2 (WGS84 Cartesian Coordinates)

const cartesian3 = Cesium.Cartesian3.fromDegrees(118.0592, 25.5429, 52);
lccObject.setTranslation(cartesian3);

SDK v0.6.3+ (ENU Coordinate System)

Starting from v0.6.3, setTranslation performs translation in the ENU coordinate system. To set the model's origin position (WGS84 Cartesian coordinates), use setOriginPosition() instead.

const translation = new Cesium.Cartesian3(0, 0, 0);
lccObject.setTranslation(translation);

Notes

  • This method must be called after the success callback of LCCRender.load() has been triggered.
  • LCCObject::getOriginPosition()
  • LCCObject::setOriginPosition()
  • LCCObject::setRotation()
  • LCCObject::setScale()

XGRIDS documentation, reproduced as published and captured on October 27, 2026. Read this page on docs.xgrids.com

Stuck on a Step?

QRC supports every scanner and software seat it sells. Send us the page you are on and we will walk you through it.

Contact Us
Request a Quote