Skip to content
TREN
Atlıhan Harita

LCC for Web User Manual · API Reference

LCCObject::setClipBox

Chapter 06.23 / 07Manual version v0.6.4English

Performs box clipping on a single LCC model.

Can be used to clip irregular edges of the LCC model, or to control the display/hide of local scene areas, such as height clipping.

Version Requirement

SDK v0.5.2+

Engine Support

Three.js / CesiumJS

API

LCCObject::setClipBox(param?: ClipBoxParam): void

Parameters

ParameterTypeRequiredDefaultDescription
param.position{ x: number, y: number, z: number } / [number, number, number]No-Translate the clip box.
param.rotation{ x: number, y: number, z: number } / [number, number, number]No-Rotate the clip box, in radians.
param.scale{ x: number, y: number, z: number } / [number, number, number]No-Scale the clip box.
param.clipSide1 / -1No-Clip direction. 1: clip outside the box; -1: clip inside the box.

Return Value

void

Usage Example

Set Box Clipping

lccObject.setClipBox({
    scale: { x: 1, y: 1, z: 1 }, // or [1, 1, 1]
    position: { x: 0, y: 0, z: 0 }, // or [0, 0, 0]
    rotation: {
        x: Math.PI / 3,
        y: 0,
        z: 0
    }, // or [Math.PI / 3, 0, 0]
    clipSide: 1 // or -1
});

Clear Box Clipping

Set param to undefined to clear the current clipping.

lccObject.setClipBox(undefined);

Notes

  • This method can be called synchronously immediately after LCCRender.load().
  • LCCObject::setClipPlane()

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