Skip to content

table

TableEntity #

Bases: AssetEntity

The table entity.

Attributes:

Name Type Description
asset_path Path

Path of the asset file

Source code in cogip/entities/table.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class TableEntity(AssetEntity):
    """
    The table entity.

    Attributes:
        asset_path: Path of the asset file
    """

    asset_path: Path = Path("assets/table2025.dae")

    def __init__(self, parent: Qt3DCore.QEntity | None = None):
        """
        Class constructor.

        Inherits [AssetEntity][cogip.entities.asset.AssetEntity].
        """
        super().__init__(self.asset_path, parent=parent)
        self._parent = parent

        # Create a layer used by sensors to activate detection on the table borders
        self.layer = Qt3DRender.QLayer(self)
        self.layer.setRecursive(True)
        self.layer.setEnabled(True)
        self.addComponent(self.layer)

        Sensor.add_obstacle(self)

__init__(parent=None) #

Class constructor.

Inherits AssetEntity.

Source code in cogip/entities/table.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
def __init__(self, parent: Qt3DCore.QEntity | None = None):
    """
    Class constructor.

    Inherits [AssetEntity][cogip.entities.asset.AssetEntity].
    """
    super().__init__(self.asset_path, parent=parent)
    self._parent = parent

    # Create a layer used by sensors to activate detection on the table borders
    self.layer = Qt3DRender.QLayer(self)
    self.layer.setRecursive(True)
    self.layer.setEnabled(True)
    self.addComponent(self.layer)

    Sensor.add_obstacle(self)