Create a new Python script called object.py and add the following code:
from Mesh3D import *
class object:
def__init_(self, obj_name) :
self. name $=o b j$ name
self.components $=[]$
def add_component(self, component) :
self.components . append (component)
def update(self) :
for $\mathrm{c}$ in self.components:
if isinstance (c, Mesh3D) :
c.draw ()
In this, we have created a generic object class that is capable of storing multiple components. Components are added with the add_component () method into a list which is then searched through to find components constructed with the Mesh3D class in update () .