pygfx.objects.Points

class pygfx.objects.Points(geometry: Geometry | None = None, material: Material | None = None, *, visible: bool = True, render_order: float = 0, render_mask: str | int = 'auto', name: str = '')

Bases: WorldObject

A point cloud.

An object consisting of points represented by vertices (3D positions).

The picking info of a Points object (the result of renderer.get_pick_info()) will for most materials include vertex_index (int) and point_coord (tuple of 2 float coordinates in logical pixels).

Parameters:
  • geometry (Geometry) – The data defining the shape of the object. Must contain at least a “positions” buffer. Depending on the usage of the material, can also include buffers “texcoords”, “colors”, “sizes”, “edge_colors”, “rotations”.

  • material (Material) – The data defining the appearance of the object.

  • visible (bool) – Whether the object is visible.

  • render_order (int) – The render order (when applicable for the renderer’s blend mode).

  • render_mask (str) – Determines the render passes that the object is rendered in. It’s recommended to let the renderer decide, using “auto”.

  • position (Vector) – The position of the object in the world. Default (0, 0, 0).

Examples

Fly controller

Fly controller

Image Click Events

Image Click Events

Image with Points Overlaid

Image with Points Overlaid

Map Screen to World

Map Screen to World

Point Picking

Point Picking

Point Markers with Multiple Colors

Point Markers with Multiple Colors

Simulating grass with point sprites

Simulating grass with point sprites

Camera linking 1

Camera linking 1

Camera linking 2

Camera linking 2

Subplots 2

Subplots 2

Text align

Text align

Text multiple labels

Text multiple labels

Rendering Points

Rendering Points

High resolution screenshot

High resolution screenshot

Load Open3D Pointcloud

Load Open3D Pointcloud

Interactive Segmentation with SAM2

Interactive Segmentation with SAM2

Image on Plane Geometry 1

Image on Plane Geometry 1

Image Material

Image Material

Points with different markers

Points with different markers

Points with different sizes

Points with different sizes

Points drawn with different size_space

Points drawn with different size_space

Validate send_data

Validate send_data

Text alignment

Text alignment