Have vectorized point inherit from point

This commit is contained in:
Grant Sanderson 2020-02-14 15:30:04 -08:00
parent d061bafaa2
commit 9186fa5551

View file

@ -5,6 +5,7 @@ from colour import Color
from manimlib.constants import *
from manimlib.mobject.mobject import Mobject
from manimlib.mobject.mobject import Point
from manimlib.mobject.three_d_utils import get_3d_vmob_gradient_start_and_end_points
from manimlib.utils.bezier import bezier
from manimlib.utils.bezier import get_smooth_handle_points
@ -969,7 +970,7 @@ class VGroup(VMobject):
self.add(*vmobjects)
class VectorizedPoint(VMobject):
class VectorizedPoint(VMobject, Point):
CONFIG = {
"color": BLACK,
"fill_opacity": 0,
@ -982,18 +983,6 @@ class VectorizedPoint(VMobject):
VMobject.__init__(self, **kwargs)
self.set_points(np.array([location]))
def get_width(self):
return self.artificial_width
def get_height(self):
return self.artificial_height
def get_location(self):
return np.array(self.points[0])
def set_location(self, new_loc):
self.set_points(np.array(new_loc, ndmin=2))
class CurvesAsSubmobjects(VGroup):
def __init__(self, vmobject, **kwargs):