Some more work on models
This commit is contained in:
parent
91deb3fc20
commit
393730a2b2
1 changed files with 38 additions and 8 deletions
|
@ -23,22 +23,25 @@ class Capabilities(Enum):
|
||||||
@dataclass
|
@dataclass
|
||||||
class Fixture:
|
class Fixture:
|
||||||
"""Definition of a fixture that generates light, its capabilities and positioning."""
|
"""Definition of a fixture that generates light, its capabilities and positioning."""
|
||||||
|
|
||||||
id: str
|
id: str
|
||||||
"""Unique identifier for fixture."""
|
"""Unique identifier for fixture."""
|
||||||
|
|
||||||
|
name: str
|
||||||
|
"""Human readable name."""
|
||||||
|
|
||||||
capabilities: Capabilities
|
capabilities: Capabilities
|
||||||
"""Which dynamic capabilities does the fixture have."""
|
"""Which dynamic capabilities does the fixture have."""
|
||||||
|
|
||||||
position: SpaceVector
|
position: SpaceVector
|
||||||
"""Position of the fixture in the space in meters."""
|
"""Position of the fixture in the space in meters."""
|
||||||
|
|
||||||
target: SpaceVector
|
target: SpaceVector
|
||||||
"""Position of the light generated by the ficture in the space in meters."""
|
"""Position of the light generated by the ficture in the space in meters."""
|
||||||
|
|
||||||
spread: SpaceVector
|
spread: SpaceVector
|
||||||
"""Spread of the light in the space at the target in meters."""
|
"""Spread of the light in the space at the target in meters."""
|
||||||
|
|
||||||
exposure: float
|
exposure: float
|
||||||
"""In range [0,1], how exposed is the light source of the fixture. 0: no exposure. 1: full exposure."""
|
"""In range [0,1], how exposed is the light source of the fixture. 0: no exposure. 1: full exposure."""
|
||||||
|
|
||||||
|
@ -48,9 +51,36 @@ class Space:
|
||||||
|
|
||||||
id: str
|
id: str
|
||||||
"""Unique identifier for space."""
|
"""Unique identifier for space."""
|
||||||
|
|
||||||
|
name: str
|
||||||
|
"""Human readable name."""
|
||||||
|
|
||||||
fixtures: list[Fixture]
|
fixtures: list[Fixture]
|
||||||
"""All fixtures present in the space."""
|
"""All fixtures present in the space."""
|
||||||
|
|
||||||
center: SpaceVector
|
center: SpaceVector
|
||||||
"""A reference point in the space from which the audience perspective might be assumed."""
|
"""A reference point in the space from which the audience perspective might be assumed."""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Sequence:
|
||||||
|
"""A sequence of light events described over fixtures."""
|
||||||
|
|
||||||
|
id: str
|
||||||
|
"""A unique identifier for this sequence."""
|
||||||
|
|
||||||
|
name: str
|
||||||
|
"""Human readable name."""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Event:
|
||||||
|
"""A collection of sequences and spaces."""
|
||||||
|
|
||||||
|
spaces: list[Space]
|
||||||
|
"""A collection of spaces."""
|
||||||
|
|
||||||
|
sequences: list[Sequence]
|
||||||
|
"""A collection of sequences."""
|
||||||
|
|
Loading…
Reference in a new issue