Skip to content

model

Import, export, and inspect stored spatial data.

2 functions / 4 types

Modules

Index

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

get_info

def get_info(
    *,
    model: types.RemoteHandle,
    _transaction_id: str | None = None
) -> types.model.ModelInfo

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

Returns ModelInfo.

model : RemoteHandle

Handle of the model to interrogate.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

load

def load(
    *,
    model: types.RemoteHandle,
    _transaction_id: str | None = None
) -> types.RemoteHandle

Prepare an existing stored model for synchronous scene assignment.

Returns RemoteHandle.

model : RemoteHandle

The stored model to prepare.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

LeafGeometryKind

Enum

class LeafGeometryKind(IntEnum)

The shape of each individual element in a stored model.

Values: AABB = 0 Axis-aligned box leaves. BALL = 1 Ball leaves. POINT = 2 Point leaves.

AABB = 0

Axis-aligned box leaves.

BALL = 1

Ball leaves.

POINT = 2

Point leaves.

ModelFileKind

Enum

class ModelFileKind(IntEnum)

The file format a stored model uses.

Values: LINEAR_BVH = 0 A linear-BVH file: block models, ball clouds, and point clouds. POP_TRI_MESH = 1 A POP-buffer triangle mesh file.

LINEAR_BVH = 0

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

POP_TRI_MESH = 1

A POP-buffer triangle mesh file.

ModelInfo

ModelInfo(
    *,
    file_type: types.model.ModelFileKind,
    model_type: types.model.ModelTypeKind,
    aabb: types.math.Aabb | None = None,
    partition_count: int,
    attributes: dict[str, types.model.csv.HeaderConfig] = <factory>,
    leaf_geometry: types.model.LeafGeometryKind | None = None,
    element_count: int | None = None,
    vertex_count: int | None = None,
    face_count: int | None = None,
    lod_levels: int | None = None
)

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

file_type : ModelFileKind

Underlying file type, as a ModelFileKind i32 kind.

model_type : ModelTypeKind

Model type, as a ModelTypeKind i32 kind.

aabb optional : Aabb | None

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

partition_count : int

Number of partitions the model is split into.

attributes : dict[str, HeaderConfig]

Attributes on the model, keyed by attribute name.

leaf_geometry optional : LeafGeometryKind | None

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

element_count optional : int | None

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

vertex_count optional : int | None

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

face_count optional : int | None

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

lod_levels optional : int | None

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

ModelTypeKind

Enum

class ModelTypeKind(IntEnum)

What kind of thing a stored model holds.

Values: BLOCK_MODEL = 0 A linear BVH with axis-aligned box leaves. BALL_CLOUD = 1 A linear BVH with ball leaves. POINT_CLOUD = 2 A linear BVH with point leaves. POP_TRI_MESH = 3 A triangle mesh represented as POP buffers. IMAGE = 4 An image with multiple levels of resolution.

BLOCK_MODEL = 0

A linear BVH with axis-aligned box leaves.

BALL_CLOUD = 1

A linear BVH with ball leaves.

POINT_CLOUD = 2

A linear BVH with point leaves.

POP_TRI_MESH = 3

A triangle mesh represented as POP buffers.

IMAGE = 4

An image with multiple levels of resolution.