|
Uranium
Application Framework
|
Class to hold a list of verts and possibly how (and if) they are connected. More...
Public Member Functions | |
| def | __init__ (self, vertices=None, normals=None, indices=None, colors=None, uvs=None, file_name=None, center_position=None, zero_position=None, type=MeshType.faces, attributes=None) |
| "MeshData" | set (self, vertices=Reuse, normals=Reuse, indices=Reuse, colors=Reuse, uvs=Reuse, file_name=Reuse, center_position=Reuse, zero_position=Reuse, attributes=Reuse) |
| Create a new MeshData with specified changes. More... | |
| def | getHash (self) |
| Vector | getCenterPosition (self) |
| Vector | getZeroPosition (self) |
| def | getType (self) |
| int | getFaceCount (self) |
| numpy.ndarray | getVertices (self) |
| Get the array of vertices. | |
| int | getVertexCount (self) |
| Get the number of vertices. | |
| def | getVertex (self, index) |
| Get a vertex by index. | |
| bool | hasNormals (self) |
| Return whether this mesh has vertex normals. More... | |
| numpy.ndarray | getNormals (self) |
| Return the list of vertex normals. More... | |
| bool | hasIndices (self) |
| Return whether this mesh has indices. More... | |
| numpy.ndarray | getIndices (self) |
| Get the array of indices. More... | |
| bool | hasColors (self) |
| numpy.ndarray | getColors (self) |
| bool | hasUVCoordinates (self) |
| str | getFileName (self) |
| "MeshData" | getTransformed (self, Matrix transformation) |
| Transform the meshdata, center and zero position by given Matrix. More... | |
| Optional[AxisAlignedBox] | getExtents (self, Optional[Matrix] matrix=None) |
| Get the extents of this mesh. More... | |
| Optional[bytes] | getVerticesAsByteArray (self) |
| Get all vertices of this mesh as a bytearray. More... | |
| Optional[bytes] | getNormalsAsByteArray (self) |
| Get all normals of this mesh as a bytearray. More... | |
| Optional[bytes] | getIndicesAsByteArray (self) |
| Get all indices as a bytearray. More... | |
| Optional[bytes] | getColorsAsByteArray (self) |
| Optional[bytes] | getUVCoordinatesAsByteArray (self) |
| Optional[scipy.spatial.ConvexHull] | getConvexHull (self) |
| Gets the Convex Hull of this mesh. More... | |
| numpy.ndarray | getConvexHullVertices (self) |
| Gets the convex hull points. More... | |
| Optional[numpy.ndarray] | getConvexHullTransformedVertices (self, Matrix transformation) |
| Gets transformed convex hull points. More... | |
| bool | hasAttribute (self, str key) |
| def | getAttribute (self, str key) |
| the return value is a dict with at least keys opengl_name, opengl_type, value | |
| List[str] | attributeNames (self) |
| Return attribute names in alphabetical order The sorting assures that the order is always the same. More... | |
| str | toString (self) |
Class to hold a list of verts and possibly how (and if) they are connected.
This class stores three numpy arrays that contain the data for a mesh. Vertices are stored as a two-dimensional array of floats with the rows being individual vertices and the three columns being the X, Y and Z components of the vertices. Normals are stored in the same manner and kept in sync with the vertices. Indices are stored as a two-dimensional array of integers with the rows being the individual faces and the three columns being the indices that refer to the individual vertices.
attributes: a dict with {"value", "opengl_type", "opengl_name"} type in vector2f, vector3f, uniforms, ...
| List[str] UM.Mesh.MeshData.MeshData.attributeNames | ( | self | ) |
Return attribute names in alphabetical order The sorting assures that the order is always the same.
| Optional[scipy.spatial.ConvexHull] UM.Mesh.MeshData.MeshData.getConvexHull | ( | self | ) |
Gets the Convex Hull of this mesh.
| Optional[numpy.ndarray] UM.Mesh.MeshData.MeshData.getConvexHullTransformedVertices | ( | self, | |
| Matrix | transformation | ||
| ) |
Gets transformed convex hull points.
| numpy.ndarray UM.Mesh.MeshData.MeshData.getConvexHullVertices | ( | self | ) |
Gets the convex hull points.
| Optional[AxisAlignedBox] UM.Mesh.MeshData.MeshData.getExtents | ( | self, | |
| Optional[Matrix] | matrix = None |
||
| ) |
Get the extents of this mesh.
| matrix | The transformation matrix from model to world coordinates. |
| numpy.ndarray UM.Mesh.MeshData.MeshData.getIndices | ( | self | ) |
Get the array of indices.
| Optional[bytes] UM.Mesh.MeshData.MeshData.getIndicesAsByteArray | ( | self | ) |
Get all indices as a bytearray.
| numpy.ndarray UM.Mesh.MeshData.MeshData.getNormals | ( | self | ) |
Return the list of vertex normals.
| Optional[bytes] UM.Mesh.MeshData.MeshData.getNormalsAsByteArray | ( | self | ) |
Get all normals of this mesh as a bytearray.
| "MeshData" UM.Mesh.MeshData.MeshData.getTransformed | ( | self, | |
| Matrix | transformation | ||
| ) |
Transform the meshdata, center and zero position by given Matrix.
| transformation | 4x4 homogenous transformation matrix |
| Optional[bytes] UM.Mesh.MeshData.MeshData.getVerticesAsByteArray | ( | self | ) |
Get all vertices of this mesh as a bytearray.
| bool UM.Mesh.MeshData.MeshData.hasIndices | ( | self | ) |
Return whether this mesh has indices.
| bool UM.Mesh.MeshData.MeshData.hasNormals | ( | self | ) |
Return whether this mesh has vertex normals.
| "MeshData" UM.Mesh.MeshData.MeshData.set | ( | self, | |
vertices = Reuse, |
|||
normals = Reuse, |
|||
indices = Reuse, |
|||
colors = Reuse, |
|||
uvs = Reuse, |
|||
file_name = Reuse, |
|||
center_position = Reuse, |
|||
zero_position = Reuse, |
|||
attributes = Reuse |
|||
| ) |