This commit is contained in:
cjw
2026-02-12 23:22:11 +08:00
parent 7b09eb3d89
commit 89660bba4e
5988 changed files with 2517516 additions and 0 deletions
@@ -0,0 +1,58 @@
"""
base.py
-------------
The base class for `Visual` objects
"""
import abc
from ..util import ABC
class Visuals(ABC):
"""
Parent of Visual classes.
"""
@property
@abc.abstractmethod
def kind(self):
pass
@abc.abstractmethod
def update_vertices(self, mask):
pass
@abc.abstractmethod
def update_faces(self, mask):
pass
@abc.abstractmethod
def concatenate(self, other):
pass
@abc.abstractmethod
def __hash__(self):
pass
@abc.abstractmethod
def copy(self):
pass
def __add__(self, other):
"""
Concatenate two ColorVisuals objects into a single object.
Parameters
-----------
other : Visuals
Other visual to concatenate
Returns
-----------
result : Visuals
Object containing information from current
object and other in the order (self, other)
"""
return self.concatenate(other)