Skip to content
TREN
Atlıhan Harita

LCC for Unity User Manual · API Reference

Data Types: Enums and Structs

Chapter 16.3 / 17Manual version v2.3.0English

The enums and structs exposed by the LCC Unity SDK, used by the LCCManager and Renderer methods.

Enums

PlatformType

Target runtime platform. Used by SetPlatformType().

public enum PlatformType { PC, Mac, Android, iOS, Pico, Quest, AVP, PicoSwan, OpenXR, PCVR }

ActiveRenderMode

Global rendering architecture mode. Used by SwitchRenderPass().

public enum ActiveRenderMode { MultiRender, SingleRender }
ValueDescription
MultiRenderUses a shared GPU buffer and can render up to 255 Renderers simultaneously
SingleRenderThe SDK automatically selects the rendering path based on the data size

Applicable only to PC / Mac platforms; mobile / VR platforms automatically adopt an adaptive strategy, and calling SwitchRenderPass() is rejected.

SourceType

Data source type. Returned by Renderer.GetSourceType().

public enum SourceType { LCC, PLY, SPLAT, TYY, None, SOG, SPZ, KSPLAT }

DataType

Data format type. Returned by Renderer.GetDataType().

public enum DataType { L1, L2, L2Pro, K2, Drone, Drone_L2, PortalCam, None }

MipMode

Mip rendering mode. Used by SetMipMode().

public enum MipMode { Mip, Non_Mip }
ValueDescription
MipUses mipmap sampling (default)
Non_MipDisables mipmap, with finer rendering details but higher performance overhead

SnapType

Snap type. Used by HitResult.snapType and SnapPreviewState.snapType.

public enum SnapType { None, Edge, Corner }

SelectionMode

Node selection strategy. Used by SetSelectionMode().

public enum SelectionMode { Auto, Normal, Large }
ValueDescription
AutoDecided automatically based on the overall bounding box of the scene (default)
NormalSuitable for small and medium scenes
LargeSuitable for very large scenes (over 1000 meters)

RenderMode

Point cloud / 3DGS rendering mode. Used by SwitchRenderMode().

public enum RenderMode { PointCloud, LCCGS }
ValueDescription
PointCloudPoint cloud rendering
LCCGS3DGS rendering

SelectMode

Selection take/exclude mode. Used by selection data such as Data2D and Data3D.

public enum SelectMode { normal, invert, clip }

OperationMode

Multi-geometry boolean operation mode. Used by selection data such as Data3D and DataMix.

public enum OperationMode { normal = 0, erase = 1 }
ValueDescription
normalUnion
eraseSubtraction

EditType

Entry type in a mixed selection. Used by DataMix and ToneMix.

public enum EditType { Edit2D, Edit3D }

ShapeType

3D clip / highlight geometry type. Used by Data3D, DataMix and ToneMix.

public enum ShapeType { box, sphere }

Structs

HitResult

Raycast hit result. Returned by Raycast(), RaycastMesh() and RaycastWithSnap().

public struct HitResult {
    public bool isHit;             // Whether a hit occurred
    public float distance;         // Distance
    public Vector3 hitPos;         // Hit point in world coordinates
    public Vector3 normal;         // Hit normal
    public float hitAlpha;         // Alpha of the hit ellipsoid
    public float dist2Origin;      // Distance to the ray origin
    public float scale;            // Ellipsoid scale
    public SnapType snapType;      // Snap type (None / Edge / Corner)
    public Vector3 originalHitPos; // Original hit point before snapping
}

The hit point world coordinate field is named hitPos.

SnapPreviewState

Snap preview state. Returned by GetSnapPreviewState().

public struct SnapPreviewState {
    public bool hasTarget;          // Whether there is a snap target
    public SnapType snapType;       // None / Edge / Corner
    public Vector2 screenPos;       // Screen coordinates of the snap target
    public float distanceToMouse;   // Pixel distance to the mouse position
}

screenPos is in screen coordinates (pixels), not world coordinates. When world coordinates are needed, use RaycastWithSnap() to get HitResult.hitPos.

Data2D

2D texture projection selection. Used for 2D texture clipping / highlighting.

public struct Data2D {
    public Texture2D texture;  // R8 1024x1024 mask texture
    public Matrix4x4 mv;       // ModelView matrix
    public Matrix4x4 mvp;      // ModelViewProjection matrix
    public SelectMode mode;    // normal / invert
}

Data3D

3D geometry selection. Used for 3D geometry clipping / highlighting.

public struct Data3D {
    public ShapeType type;          // box / sphere
    public Matrix4x4 invMat;        // Inverse transform matrix of the geometry
    public OperationMode operation; // normal=union, erase=subtraction
    public SelectMode mode;         // normal / invert / clip
}

DataMix

2D + 3D mixed selection. Used for mixed-mode clipping / highlighting.

public struct DataMix {
    public EditType editType;       // Edit2D / Edit3D
    public ShapeType type;          // 3D geometry type
    public Matrix4x4 invMat;        // 3D inverse transform matrix
    public Texture2D texture;       // 2D mask texture
    public Matrix4x4 mv;            // 2D ModelView
    public Matrix4x4 mvp;           // 2D MVP
    public OperationMode operation;
    public SelectMode mode;
}

ToneMix

Tone selection, which adds tone parameters on top of DataMix. Used by SetTone().

public struct ToneMix {
    public EditType editType;       // Edit2D / Edit3D
    public ShapeType type;          // 3D geometry type
    public Matrix4x4 invMat;        // 3D inverse transform matrix
    public Texture2D texture;       // 2D mask texture
    public Matrix4x4 mv;            // 2D ModelView
    public Matrix4x4 mvp;           // 2D MVP
    public OperationMode operation;
    public SelectMode mode;
    public float brightness;        // Brightness (default 1.0)
    public float saturation;        // Saturation (default 1.0)
    public float contrast;          // Contrast (default 1.0)
    public int lutid;               // LUT filter index (0 = not used)
}

PointLightData

Custom point light / spot light data. Used by SetLights().

public struct PointLightData {
    public float3 position;    // World coordinates
    public int lightType;      // 0=point light, 1=spot light
    public float3 color;       // RGB color (no alpha component)
    public float intensity;    // Light intensity
    public float3 direction;   // Spot light direction (ignored for point light)
    public float range;        // Light range
    public float spotAngle;    // Spot light cone angle (degrees, ignored for point light)
    public float3 pad;         // Alignment padding, no assignment needed
}

The field type is Unity.Mathematics.float3, not Vector4; color has no alpha component. When lightType is 0 it is a point light (direction / spotAngle are ignored), and when it is 1 it is a spot light.

DecalOcclusionSettings

Decal occlusion culling quality parameters. Used by SetDecalOcclusionSettings().

public struct DecalOcclusionSettings {
    public float opacityCutoff;   // Minimum opacity in [0,1] for a splat to participate in the depth map, default 0 (all participate)
    public float depthBias;       // Relative depth tolerance ratio, default 0.05
    public int   footprintMaxPx;  // Maximum square footprint radius (px), 0~16, default 2
    public int   resolution;      // Depth map resolution (px, power of 2, 256~4096), default 1024

    public static DecalOcclusionSettings Default { get; } // cutoff=0, bias=0.05, footprint=2, resolution=1024
}
FieldDescription
opacityCutoffOnly splats with opacity ≥ this value participate in the depth map, which can filter out floating / fog-like splats. Default 0 (all participate).
depthBiasRelative depth tolerance ratio that absorbs the point cloud surface thickness proportionally to distance. Default 0.05. Too small causes self-occlusion noise; too large misses occlusions.
footprintMaxPxConservative maximum square footprint radius (in pixels), used to cover the neighborhood and avoid penetration leaks. 0 is a single texel, range 0~16, default 2. Too large causes outline expansion and over-occlusion.
resolutionDepth map resolution (pixels, power of 2, 256~4096). Lowering it fills sparse holes at the cost of slightly rougher occlusion boundaries. Default 1024.

SplatMeta

Metadata of the 3DGS data. Output by Renderer.GetMeta(), containing metadata such as the data source (source) and data format (dataType), and can be read without fully loading the data.

LCCMeshBlockInfo

Collision Mesh block metadata. Returned by Renderer.GetMeshBlockInfos().

public struct LCCMeshBlockInfo {
    public string id;           // Node id, corresponding to LCCMeshBlock.id
    public Bounds boundsWorld;  // World-space AABB, used to select ids
    public Bounds boundsLocal;  // Local-space AABB
    public int vertexCount;     // Vertex count
    public int faceCount;       // Face count
}
FieldTypeDescription
idstringNode id, corresponding to LCCMeshBlock.id
boundsWorldBoundsWorld-space AABB, used to select ids
boundsLocalBoundsLocal-space AABB
vertexCountintVertex count
faceCountintFace count

LCCMeshBlock

Collision Mesh block geometry data. Returned by Renderer.GetMeshes().

public struct LCCMeshBlock {
    public string id;           // Node id
    public Vector3[] vertices;  // Vertices, in local coordinates
    public int[] triangles;     // Triangle indices, three per group
    public Bounds boundsLocal;  // Bounding box in the same space as vertices
}
FieldTypeDescription
idstringNode id
verticesVector3[]Vertex array, in the object's local coordinate system
trianglesint[]Triangle indices, three per group
boundsLocalBoundsBounding box in the same space as vertices

vertices / boundsLocal are both in the object's local coordinate system; placing the GameObject that carries the Mesh under Renderer.Transform aligns them automatically. A single block can have more than 65535 vertices, so mesh.indexFormat = IndexFormat.UInt32 must be set before building the Mesh.

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