Delete refresh_unit_normal

This commit is contained in:
Grant Sanderson
2022-12-23 10:23:57 -07:00
parent 40bf1fd6a9
commit dd2fb6ae74
5 changed files with 1 additions and 22 deletions

View File

@ -407,7 +407,6 @@ class TurnInsideOut(Transform):
def create_target(self) -> Mobject:
result = self.mobject.copy().reverse_points()
if isinstance(result, VMobject):
result.refresh_unit_normal()
result.refresh_triangulation()
return result

View File

@ -51,7 +51,6 @@ class Brace(Tex):
self.shift(left - self.get_corner(UL) + buff * DOWN)
for mob in mobject, self:
mob.rotate(angle, about_point=ORIGIN)
self.refresh_unit_normal()
def set_initial_width(self, width: float):
width_diff = width - self.get_width()

View File

@ -398,9 +398,7 @@ class Bubble(SVGMobject):
return self
def flip(self, axis=UP):
Mobject.flip(self, axis=axis)
self.refresh_unit_normal()
self.refresh_triangulation()
super().flip(axis=axis)
if abs(axis[1]) > 0:
self.direction = -np.array(self.direction)
return self

View File

@ -320,7 +320,6 @@ class VCube(VGroup3D):
)
face = Square(side_length=side_length, **style)
super().__init__(*square_to_cube_faces(face), **style)
self.refresh_unit_normal()
class VPrism(VCube):

View File

@ -790,9 +790,6 @@ class VMobject(Mobject):
)
return normal
def refresh_unit_normal(self): # TODO, Delete
return self
# Alignment
def align_points(self, vmobject: VMobject):
if self.get_num_points() == len(vmobject.get_points()):
@ -1013,7 +1010,6 @@ class VMobject(Mobject):
old_points = self.get_points().copy()
func(self, *args, **kwargs)
if not np.all(self.get_points() == old_points):
self.refresh_unit_normal()
self.refresh_triangulation()
return wrapper
@ -1050,18 +1046,6 @@ class VMobject(Mobject):
self.make_approximately_smooth()
return self
def refresh_bounding_box(
self,
recurse_down: bool = False,
recurse_up: bool = True
):
super().refresh_bounding_box(recurse_down, recurse_up)
# Anything which calls for refreshing the bounding box
# shoudl also trigger a recomputation of the unit normal
for mob in self.get_family(recurse_down):
mob.refresh_unit_normal()
return self
# For shaders
def init_shader_data(self):
self.fill_data = np.zeros(0, dtype=self.fill_dtype)