mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
Delete refresh_unit_normal
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user