Skip to content

model

Import, export, and inspect stored spatial data.

2 functions / 6 types

Modules

Index

FunctionDescription
GetInfoLoad the model a handle names and return a summary of its file and geometry.
LoadPrepare an existing stored model for synchronous scene assignment.
TypeDescription
GetInfoLoad the model a handle names and return a summary of its file and geometry.
LeafGeometryKindThe shape of each individual element in a stored model.
LoadPrepare an existing stored model for synchronous scene assignment.
ModelFileKindThe file format a stored model uses.
ModelInfoHigh-level, representation-agnostic summary of a model.
ModelTypeKindWhat kind of thing a stored model holds.

GetInfo

RPC

GetInfo(request: model.GetInfo) -> model.ModelInfo

Load the model a handle names and return a summary of its file and geometry.

Service method: spatialengine.v1.model.Model.GetInfo.

Returns model.ModelInfo.

model : RemoteHandle

Handle of the model to interrogate.

Load

RPC

Load(request: model.Load) -> RemoteHandle

Prepare an existing stored model for synchronous scene assignment.

Service method: spatialengine.v1.model.Model.Load.

Returns RemoteHandle.

model : RemoteHandle

The stored model to prepare.

GetInfo

Message

Load the model a handle names and return a summary of its file and geometry.

model : RemoteHandle

Handle of the model to interrogate.

LeafGeometryKind

Enum

The shape of each individual element in a stored model.

LEAF_GEOMETRY_KIND_AABB = 0

Axis-aligned box leaves.

LEAF_GEOMETRY_KIND_BALL = 1

Ball leaves.

LEAF_GEOMETRY_KIND_POINT = 2

Point leaves.

Load

Message

Prepare an existing stored model for synchronous scene assignment.

model : RemoteHandle

The stored model to prepare.

ModelFileKind

Enum

The file format a stored model uses.

MODEL_FILE_KIND_LINEAR_BVH = 0

A linear-BVH file: block models, ball clouds, and point clouds.

MODEL_FILE_KIND_POP_TRI_MESH = 1

A POP-buffer triangle mesh file.

ModelInfo

Message

High-level, representation-agnostic summary of a model.

file_type : model.ModelFileKind

Underlying file type, as a ModelFileKind i32 kind.

model_type : model.ModelTypeKind

Model type, as a ModelTypeKind i32 kind.

aabb optional : math.Aabb

Axis-aligned bounding box of the whole model, in model coordinates.

partition_count : uint64

Number of partitions the model is split into.

attributes optional : list[model.ModelInfo.AttributesEntry]

Attributes on the model, keyed by attribute name.

leaf_geometry optional : model.LeafGeometryKind

Linear-BVH only: leaf geometry, as a LeafGeometryKind i32 kind.

element_count optional : uint64

Linear-BVH only: total number of leaf elements across all partitions.

vertex_count optional : uint64

POP-mesh only: total vertex count at full resolution.

face_count optional : uint64

POP-mesh only: total face (triangle) count at full resolution.

lod_levels optional : uint64

POP-mesh only: number of LOD levels stored in the first partition.

ModelTypeKind

Enum

What kind of thing a stored model holds.

MODEL_TYPE_KIND_BLOCK_MODEL = 0

A linear BVH with axis-aligned box leaves.

MODEL_TYPE_KIND_BALL_CLOUD = 1

A linear BVH with ball leaves.

MODEL_TYPE_KIND_POINT_CLOUD = 2

A linear BVH with point leaves.

MODEL_TYPE_KIND_POP_TRI_MESH = 3

A triangle mesh represented as POP buffers.

MODEL_TYPE_KIND_IMAGE = 4

An image with multiple levels of resolution.