pooltool.objects.table.specs#

Overview#

Classes#

TableModelDescr

A table model specifier

TableType

An Enum describing the table type

TableSpecs

Base class for protocol classes.

PocketTableSpecs

Parameter specifications for a pocket table.

BilliardTableSpecs

Parameter specifications for a billiards (pocketless) table.

SnookerTableSpecs

Parameter specifications for a snooker table.

Classes#

class pooltool.objects.table.specs.TableModelDescr(name: str)[source]#

A table model specifier

name#

The name of the table model.

Type:

str

property path: str#

The path of the model

The path is searched for in pooltool/models/table/{name}/{name}[_pbr].glb. If physical based rendering (PBR) is requested, a model suffixed with _pbr will be looked for.

Raises:

ConfigError -- If model path cannot be found from name.

Returns:

A filename specified with Panda3D filename syntax (see https://docs.panda3d.org/1.10/python/programming/advanced-loading/filename-syntax).

Return type:

str

class pooltool.objects.table.specs.TableType(value)[source]#

An Enum describing the table type

Bases: pooltool.utils.strenum.StrEnum

class pooltool.objects.table.specs.TableSpecs(*args, **kwargs)[source]#

Bases: Protocol

class pooltool.objects.table.specs.PocketTableSpecs(l: float = 1.9812, w: float = 0.9906, cushion_width: float = 0.0508, cushion_height: float = 0.036576, corner_pocket_width: float = 0.118, corner_pocket_angle: float = 5.3, corner_pocket_depth: float = 0.0398, corner_pocket_radius: float = 0.062, corner_jaw_radius: float = 0.02095, side_pocket_width: float = 0.137, side_pocket_angle: float = 7.14, side_pocket_depth: float = 0.00437, side_pocket_radius: float = 0.0645, side_jaw_radius: float = 0.00795, height: float = 0.708, lights_height: float = 1.99, model_descr: TableModelDescr = TableModelDescr.null)[source]#

Parameter specifications for a pocket table.

See also

class pooltool.objects.table.specs.BilliardTableSpecs(l: float = 3.05, w: float = 1.525, cushion_width: float = 0.0508, cushion_height: float = 0.036576, height: float = 0.708, lights_height: float = 1.99, model_descr: TableModelDescr = TableModelDescr.null)[source]#

Parameter specifications for a billiards (pocketless) table.

See also

class pooltool.objects.table.specs.SnookerTableSpecs(l: float = 3.5445, w: float = 1.7465, cushion_width: float = 0.039369999999999995, cushion_height: float = 0.028, corner_pocket_width: float = 0.083, corner_pocket_angle: float = 0, corner_pocket_depth: float = 0.036, corner_pocket_radius: float = 0.1016, corner_jaw_radius: float = 0.1016, side_pocket_width: float = 0.087, side_pocket_angle: float = 0, side_pocket_depth: float = 0.02413, side_pocket_radius: float = 0.042671999999999995, side_jaw_radius: float = 0.0635, height: float = 0.708, lights_height: float = 1.99, model_descr: TableModelDescr = TableModelDescr.null)[source]#

Parameter specifications for a snooker table.

See also

Note

Currently, this class is an identical clone of PocketTableSpecs, but with different defaults. That’s not very useful, but it’s likely that some time in the future, snooker tables may have some parameters distinct from standard pool tables (e.g. directional cloth), causing these classes to diverge.