mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
SGroups should be considered to have resolution (0, 0)
This commit is contained in:
parent
429d63eebf
commit
62e5efe87b
1 changed files with 9 additions and 0 deletions
|
@ -115,6 +115,8 @@ class ParametricSurface(Mobject):
|
||||||
s_points, du_points, dv_points = self.get_surface_points_and_nudged_points()
|
s_points, du_points, dv_points = self.get_surface_points_and_nudged_points()
|
||||||
tri_indices = self.get_triangle_indices()
|
tri_indices = self.get_triangle_indices()
|
||||||
data = self.get_blank_shader_data_array(len(tri_indices))
|
data = self.get_blank_shader_data_array(len(tri_indices))
|
||||||
|
if len(tri_indices) == 0:
|
||||||
|
return data
|
||||||
data["point"] = s_points[tri_indices]
|
data["point"] = s_points[tri_indices]
|
||||||
data["du_point"] = du_points[tri_indices]
|
data["du_point"] = du_points[tri_indices]
|
||||||
data["dv_point"] = dv_points[tri_indices]
|
data["dv_point"] = dv_points[tri_indices]
|
||||||
|
@ -129,6 +131,10 @@ class ParametricSurface(Mobject):
|
||||||
|
|
||||||
|
|
||||||
class SGroup(ParametricSurface):
|
class SGroup(ParametricSurface):
|
||||||
|
CONFIG = {
|
||||||
|
"resolution": (0, 0),
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, *parametric_surfaces, **kwargs):
|
def __init__(self, *parametric_surfaces, **kwargs):
|
||||||
# TODO, separate out the surface type...again
|
# TODO, separate out the surface type...again
|
||||||
super().__init__(uv_func=None, **kwargs)
|
super().__init__(uv_func=None, **kwargs)
|
||||||
|
@ -137,6 +143,9 @@ class SGroup(ParametricSurface):
|
||||||
def init_points(self):
|
def init_points(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def get_triangle_indices(self):
|
||||||
|
return np.zeros(0)
|
||||||
|
|
||||||
|
|
||||||
class TexturedSurface(ParametricSurface):
|
class TexturedSurface(ParametricSurface):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue