Coverage for trimesh/visual/base.py: 75%
24 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-24 04:40 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-24 04:40 +0000
1"""
2base.py
3-------------
5The base class for `Visual` objects
6"""
8import abc
10from ..util import ABC
13class Visuals(ABC):
14 """
15 Parent of Visual classes.
16 """
18 @property
19 @abc.abstractmethod
20 def kind(self):
21 pass
23 @abc.abstractmethod
24 def update_vertices(self, mask):
25 pass
27 @abc.abstractmethod
28 def update_faces(self, mask):
29 pass
31 @abc.abstractmethod
32 def concatenate(self, other):
33 pass
35 @abc.abstractmethod
36 def __hash__(self):
37 pass
39 @abc.abstractmethod
40 def copy(self):
41 pass
43 def __add__(self, other):
44 """
45 Concatenate two ColorVisuals objects into a single object.
47 Parameters
48 -----------
49 other : Visuals
50 Other visual to concatenate
52 Returns
53 -----------
54 result : Visuals
55 Object containing information from current
56 object and other in the order (self, other)
57 """
58 return self.concatenate(other)