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)
| 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): |
no test coverage detected