semantic_world.geometry#

Attributes#

Classes#

Color

Dataclass for storing rgba_color as an RGBA value.

Scale

Dataclass for storing the scale of geometric objects.

Shape

Base class for all shapes in the world.

Mesh

A mesh shape.

Primitive

A primitive shape.

Sphere

A sphere shape.

Cylinder

A cylinder shape.

Box

A box shape. Pivot point is at the center of the box.

Module Contents#

semantic_world.geometry.id_generator#
class semantic_world.geometry.Color#

Dataclass for storing rgba_color as an RGBA value. The values are stored as floats between 0 and 1. The default rgba_color is white.

R: float = 1#

Red value of the color.

G: float = 1#

Green value of the color.

B: float = 1#

Blue value of the color.

A: float = 1#

Opacity of the color.

class semantic_world.geometry.Scale#

Dataclass for storing the scale of geometric objects.

x: float = 1.0#

The scale in the x direction.

y: float = 1.0#

The scale in the y direction.

z: float = 1.0#

The scale in the z direction.

class semantic_world.geometry.Shape#

Bases: abc.ABC

Base class for all shapes in the world.

origin: semantic_world.spatial_types.TransformationMatrix#
class semantic_world.geometry.Mesh#

Bases: Shape

A mesh shape.

filename: str = ''#

Filename of the mesh.

scale: Scale#

Scale of the mesh.

property mesh: trimesh.Trimesh#

The mesh object.

class semantic_world.geometry.Primitive#

Bases: Shape

A primitive shape.

color: Color#
class semantic_world.geometry.Sphere#

Bases: Primitive

A sphere shape.

radius: float = 0.5#

Radius of the sphere.

class semantic_world.geometry.Cylinder#

Bases: Primitive

A cylinder shape.

width: float = 0.5#
height: float = 0.5#
class semantic_world.geometry.Box#

Bases: Primitive

A box shape. Pivot point is at the center of the box.

scale: Scale#