Skip to content
TREN
Atlıhan Harita

LCC for Web User Manual · API Reference

LCCObject::setRotation

Chapter 06.35 / 07Manual version v0.6.4English

Sets the rotation of the LCC model.

Rotation is applied in the LCC model's coordinate space.

Version Requirement

SDK v0.3.1+

Engine Support

CesiumJS

API

LCCObject::setRotation(rotation: Cesium.Matrix3 | { heading: number, pitch: number, roll: number } | Cesium.HeadingPitchRoll): void

Parameters

ParameterTypeRequiredDefaultDescription
rotationCesium.Matrix3 / { heading: number, pitch: number, roll: number } / Cesium.HeadingPitchRollYes-Before SDK v0.6.3, pass a Cesium.Matrix3 rotation matrix; from SDK v0.6.3+, ENU coordinate system based, pass an object with heading, pitch, roll or a Cesium.HeadingPitchRoll.

Return Value

void

Usage Example

SDK v0.3.1 – v0.6.2

const matrix3 = new Cesium.Matrix3();
lccObject.setRotation(matrix3);

SDK v0.6.3+ (ENU Coordinate System)

Starting from v0.6.3, rotation is based on the ENU coordinate system, with parameters changed to heading, pitch, and roll angles.

lccObject.setRotation({ heading: 1, pitch: 0, roll: 0 });

You can also use Cesium.HeadingPitchRoll:

const hpr = new Cesium.HeadingPitchRoll(1, 0, 0);
lccObject.setRotation(hpr);

Notes

  • This method must be called after the success callback of LCCRender.load() has been triggered.
  • Since v0.6.3, the parameter format has been updated to heading/pitch/roll. The legacy Cesium.Matrix3 approach is no longer supported — please update to the new format.
  • LCCObject::setScale()
  • LCCObject::setOriginPosition()

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