Skip to content
TREN
Atlıhan Harita

LCC for Web User Manual · API Reference

LCCObject::setTranslation

Chapter 06.41 / 07Manual version v0.6.4English

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.
  • Since v0.6.3, setTranslation operates in the ENU coordinate system. The legacy WGS84 Cartesian coordinate approach is no longer supported. To set the model's origin position, use setOriginPosition() instead.
  • LCCObject::getOriginPosition()
  • LCCObject::setOriginPosition()
  • LCCObject::setRotation()
  • LCCObject::setScale()

This chapter is from the official XGRIDS user manual. Official source (opens in a new tab) · Updated:

XGRIDS Türkiye

We're With You During Setup and in the Field

Atlıhan Harita provides training and technical support for device setup, firmware updates, software use, and field applications. Send us your question and our specialist will get back to you.

+90 216 546 0804