mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Delete refresh_unit_normal
This commit is contained in:
parent
40bf1fd6a9
commit
dd2fb6ae74
5 changed files with 1 additions and 22 deletions
|
@ -407,7 +407,6 @@ class TurnInsideOut(Transform):
|
||||||
def create_target(self) -> Mobject:
|
def create_target(self) -> Mobject:
|
||||||
result = self.mobject.copy().reverse_points()
|
result = self.mobject.copy().reverse_points()
|
||||||
if isinstance(result, VMobject):
|
if isinstance(result, VMobject):
|
||||||
result.refresh_unit_normal()
|
|
||||||
result.refresh_triangulation()
|
result.refresh_triangulation()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ class Brace(Tex):
|
||||||
self.shift(left - self.get_corner(UL) + buff * DOWN)
|
self.shift(left - self.get_corner(UL) + buff * DOWN)
|
||||||
for mob in mobject, self:
|
for mob in mobject, self:
|
||||||
mob.rotate(angle, about_point=ORIGIN)
|
mob.rotate(angle, about_point=ORIGIN)
|
||||||
self.refresh_unit_normal()
|
|
||||||
|
|
||||||
def set_initial_width(self, width: float):
|
def set_initial_width(self, width: float):
|
||||||
width_diff = width - self.get_width()
|
width_diff = width - self.get_width()
|
||||||
|
|
|
@ -398,9 +398,7 @@ class Bubble(SVGMobject):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def flip(self, axis=UP):
|
def flip(self, axis=UP):
|
||||||
Mobject.flip(self, axis=axis)
|
super().flip(axis=axis)
|
||||||
self.refresh_unit_normal()
|
|
||||||
self.refresh_triangulation()
|
|
||||||
if abs(axis[1]) > 0:
|
if abs(axis[1]) > 0:
|
||||||
self.direction = -np.array(self.direction)
|
self.direction = -np.array(self.direction)
|
||||||
return self
|
return self
|
||||||
|
|
|
@ -320,7 +320,6 @@ class VCube(VGroup3D):
|
||||||
)
|
)
|
||||||
face = Square(side_length=side_length, **style)
|
face = Square(side_length=side_length, **style)
|
||||||
super().__init__(*square_to_cube_faces(face), **style)
|
super().__init__(*square_to_cube_faces(face), **style)
|
||||||
self.refresh_unit_normal()
|
|
||||||
|
|
||||||
|
|
||||||
class VPrism(VCube):
|
class VPrism(VCube):
|
||||||
|
|
|
@ -790,9 +790,6 @@ class VMobject(Mobject):
|
||||||
)
|
)
|
||||||
return normal
|
return normal
|
||||||
|
|
||||||
def refresh_unit_normal(self): # TODO, Delete
|
|
||||||
return self
|
|
||||||
|
|
||||||
# Alignment
|
# Alignment
|
||||||
def align_points(self, vmobject: VMobject):
|
def align_points(self, vmobject: VMobject):
|
||||||
if self.get_num_points() == len(vmobject.get_points()):
|
if self.get_num_points() == len(vmobject.get_points()):
|
||||||
|
@ -1013,7 +1010,6 @@ class VMobject(Mobject):
|
||||||
old_points = self.get_points().copy()
|
old_points = self.get_points().copy()
|
||||||
func(self, *args, **kwargs)
|
func(self, *args, **kwargs)
|
||||||
if not np.all(self.get_points() == old_points):
|
if not np.all(self.get_points() == old_points):
|
||||||
self.refresh_unit_normal()
|
|
||||||
self.refresh_triangulation()
|
self.refresh_triangulation()
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
@ -1050,18 +1046,6 @@ class VMobject(Mobject):
|
||||||
self.make_approximately_smooth()
|
self.make_approximately_smooth()
|
||||||
return self
|
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
|
# For shaders
|
||||||
def init_shader_data(self):
|
def init_shader_data(self):
|
||||||
self.fill_data = np.zeros(0, dtype=self.fill_dtype)
|
self.fill_data = np.zeros(0, dtype=self.fill_dtype)
|
||||||
|
|
Loading…
Add table
Reference in a new issue