mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Fixed get_boundary_point and get_points_defining_boundary
This commit is contained in:
parent
71d5851dd0
commit
4a226e1d22
1 changed files with 3 additions and 2 deletions
|
@ -703,7 +703,7 @@ class Mobject(Container):
|
|||
# Getters
|
||||
|
||||
def get_points_defining_boundary(self):
|
||||
return self.points
|
||||
return self.get_all_points()
|
||||
|
||||
def get_num_points(self):
|
||||
return len(self.points)
|
||||
|
@ -743,7 +743,8 @@ class Mobject(Container):
|
|||
|
||||
def get_boundary_point(self, direction):
|
||||
all_points = self.get_points_defining_boundary()
|
||||
return all_points[np.argmax(np.dot(all_points, direction))]
|
||||
index = np.argmax(np.dot(all_points, np.array(direction).T))
|
||||
return all_points[index]
|
||||
|
||||
def get_z_index_reference_point(self):
|
||||
# TODO, better place to define default z_index_group?
|
||||
|
|
Loading…
Add table
Reference in a new issue