MCPcopy Create free account
hub / github.com/vispy/vispy / set_data

Method set_data

vispy/visuals/mesh.py:155–187  ·  view source on GitHub ↗

Set the mesh data Parameters ---------- vertices : array-like | None The vertices. faces : array-like | None The faces. vertex_colors : array-like | None Colors to use for each vertex. face_colors : array-like | Non

(self, vertices=None, faces=None, vertex_colors=None,
                 face_colors=None, color=None, vertex_values=None,
                 meshdata=None)

Source from the content-addressed store, hash-verified

153 self.shading_filter.shading = shading
154
155 def set_data(self, vertices=None, faces=None, vertex_colors=None,
156 face_colors=None, color=None, vertex_values=None,
157 meshdata=None):
158 """Set the mesh data
159
160 Parameters
161 ----------
162 vertices : array-like | None
163 The vertices.
164 faces : array-like | None
165 The faces.
166 vertex_colors : array-like | None
167 Colors to use for each vertex.
168 face_colors : array-like | None
169 Colors to use for each face.
170 color : instance of Color
171 The color to use.
172 vertex_values : array-like | None
173 Values for each vertex.
174 meshdata : instance of MeshData | None
175 The meshdata.
176 """
177 if meshdata is not None:
178 self._meshdata = meshdata
179 else:
180 self._meshdata = MeshData(vertices=vertices, faces=faces,
181 vertex_colors=vertex_colors,
182 face_colors=face_colors,
183 vertex_values=vertex_values)
184 self._bounds = self._meshdata.get_bounds()
185 if color is not None:
186 self._color = Color(color)
187 self.mesh_data_changed()
188
189 @property
190 def clim(self):

Callers 9

_updateMethod · 0.45
axis_colorMethod · 0.45
axis_widthMethod · 0.45
tick_colorMethod · 0.45
tick_widthMethod · 0.45
_update_subvisualsMethod · 0.45
_update_imageMethod · 0.45
__init__Method · 0.45
_update_dataMethod · 0.45

Calls 4

mesh_data_changedMethod · 0.95
MeshDataClass · 0.85
get_boundsMethod · 0.80
ColorClass · 0.50

Tested by

no test coverage detected