Skip to content

pixano.features.schemas.views.point_cloud

PointCloud(created_at=None, updated_at=None, **data)

Bases: View

Point Cloud view.

Attributes:

Name Type Description
url str

The point cloud URL.

Source code in pixano/features/schemas/base_schema.py
def __init__(self, /, created_at: datetime | None = None, updated_at: datetime | None = None, **data: Any):
    """Create a new model by parsing and validating input data from keyword arguments.

    Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
    validated to form a valid model.

    `self` is explicitly positional-only to allow `self` as a field name.

    Args:
        created_at: The creation date of the object.
        updated_at: The last modification date of the object.
        data: The data of the object validated by Pydantic.
    """
    created_at, updated_at = validate_and_init_create_at_and_update_at(created_at, updated_at)
    data.update({"created_at": created_at, "updated_at": updated_at})
    super().__init__(**data)

create_point_cloud(url, id='', item_ref=ItemRef.none(), parent_ref=ViewRef.none())

Create a PointCloud instance.

Parameters:

Name Type Description Default
url str

The point cloud URL.

required
id str

Point cloud ID.

''
item_ref ItemRef

Item reference.

none()
parent_ref ViewRef

Parent view reference.

none()

Returns:

Type Description
PointCloud

The created PointCloud instance.

Source code in pixano/features/schemas/views/point_cloud.py
def create_point_cloud(
    url: str, id: str = "", item_ref: ItemRef = ItemRef.none(), parent_ref: ViewRef = ViewRef.none()
) -> PointCloud:
    """Create a `PointCloud` instance.

    Args:
        url: The point cloud URL.
        id: Point cloud ID.
        item_ref: Item reference.
        parent_ref: Parent view reference.

    Returns:
        The created `PointCloud` instance.
    """
    return PointCloud(url=url, id=id, item_ref=item_ref, parent_ref=parent_ref)

is_point_cloud(cls, strict=False)

Check if the given class is a subclass of PointCloud.

Source code in pixano/features/schemas/views/point_cloud.py
def is_point_cloud(cls: type, strict: bool = False) -> bool:
    """Check if the given class is a subclass of `PointCloud`."""
    return issubclass_strict(cls, PointCloud, strict)