Data Types: Enums and Structs
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 }
| Value | Description |
|---|---|
MultiRender | Uses a shared GPU buffer and can render up to 255 Renderers simultaneously |
SingleRender | The 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, K1, K2, Drone, Drone_L2, PortalCam, None }
MipMode
Mip rendering mode. Used by SetMipMode().
public enum MipMode { Mip, Non_Mip }
| Value | Description |
|---|---|
Mip | Uses mipmap sampling (default) |
Non_Mip | Disables 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 }
| Value | Description |
|---|---|
Auto | Decided automatically based on the overall bounding box of the scene (default) |
Normal | Suitable for small and medium scenes |
Large | Suitable for very large scenes (over 1000 meters) |
RenderMode
Point cloud / 3DGS rendering mode. Used by SwitchRenderMode().
public enum RenderMode { PointCloud, LCCGS }
| Value | Description |
|---|---|
PointCloud | Point cloud rendering |
LCCGS | 3DGS 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 }
| Value | Description |
|---|---|
normal | Union |
erase | Subtraction |
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
}
screenPosis in screen coordinates (pixels), not world coordinates. When world coordinates are needed, use RaycastWithSnap() to getHitResult.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, notVector4;colorhas no alpha component. WhenlightTypeis0it is a point light (direction/spotAngleare ignored), and when it is1it 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
}
| Field | Description |
|---|---|
opacityCutoff | Only splats with opacity ≥ this value participate in the depth map, which can filter out floating / fog-like splats. Default 0 (all participate). |
depthBias | Relative 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. |
footprintMaxPx | Conservative 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. |
resolution | Depth 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
}
| Field | Type | Description |
|---|---|---|
id | string | Node id, corresponding to LCCMeshBlock.id |
boundsWorld | Bounds | World-space AABB, used to select ids |
boundsLocal | Bounds | Local-space AABB |
vertexCount | int | Vertex count |
faceCount | int | Face 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
}
| Field | Type | Description |
|---|---|---|
id | string | Node id |
vertices | Vector3[] | Vertex array, in the object's local coordinate system |
triangles | int[] | Triangle indices, three per group |
boundsLocal | Bounds | Bounding box in the same space as vertices |
vertices/boundsLocalare both in the object's local coordinate system; placing the GameObject that carries the Mesh underRenderer.Transformaligns them automatically. A single block can have more than 65535 vertices, somesh.indexFormat = IndexFormat.UInt32must be set before building the Mesh.