|
Uranium
Application Framework
|
Class to hold a list of verts and possibly how (and if) they are connected. More...
Public Member Functions | |
| def | __init__ |
| def | __del__ (self) |
| Triggered when this file is deleted. More... | |
| def | set |
| Create a new MeshData with specified changes. More... | |
| def | getHash (self) |
| def | getCenterPosition (self) |
| def | getZeroPosition (self) |
| def | getType (self) |
| def | getFaceCount (self) |
| def | getVertices (self) |
| Get the array of vertices. | |
| def | getVertexCount (self) |
| Get the number of vertices. | |
| def | getVertex (self, index) |
| Get a vertex by index. | |
| def | hasNormals (self) |
| Return whether this mesh has vertex normals. More... | |
| def | getNormals (self) |
| Return the list of vertex normals. More... | |
| def | hasIndices (self) |
| Return whether this mesh has indices. More... | |
| def | getIndices (self) |
| Get the array of indices. More... | |
| def | hasColors (self) |
| def | getColors (self) |
| def | hasUVCoordinates (self) |
| def | getFileName (self) |
| def | getTransformed |
| Transform the meshdata, center and zero position by given Matrix. More... | |
| def | getExtents |
| Get the extents of this mesh. More... | |
| def | getVerticesAsByteArray (self) |
| Get all vertices of this mesh as a bytearray. More... | |
| def | getNormalsAsByteArray (self) |
| Get all normals of this mesh as a bytearray. More... | |
| def | getIndicesAsByteArray (self) |
| Get all indices as a bytearray. More... | |
| def | getColorsAsByteArray (self) |
| def | getUVCoordinatesAsByteArray (self) |
| def | getConvexHull (self) |
| Gets the Convex Hull of this mesh. More... | |
| def | getConvexHullVertices (self) |
| Gets the convex hull points. More... | |
| def | getConvexHullTransformedVertices |
| Gets transformed convex hull points. More... | |
| def | getFacePlane |
| Gets the plane the supplied face lies in. More... | |
| def | getFaceNodes |
| Gets the node vectors of the supplied face. More... | |
| def | hasAttribute |
| def | getAttribute |
| the return value is a dict with at least keys opengl_name, opengl_type, value | |
| def | attributeNames (self) |
| Return attribute names in alphabetical order The sorting assures that the order is always the same. More... | |
| def | invertNormals (self) |
| def | 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, ...
| def UM.Mesh.MeshData.MeshData.__del__ | ( | self | ) |
Triggered when this file is deleted.
The file will then no longer be watched for changes.
| def UM.Mesh.MeshData.MeshData.attributeNames | ( | self, | |
| List, | |||
| str | |||
| ) |
Return attribute names in alphabetical order The sorting assures that the order is always the same.
| def UM.Mesh.MeshData.MeshData.getConvexHull | ( | self, | |
| Optional, | |||
| scipy, | |||
| spatial, | |||
| ConvexHull | |||
| ) |
Gets the Convex Hull of this mesh.
| def UM.Mesh.MeshData.MeshData.getConvexHullTransformedVertices | ( | self, | |
| transformation | |||
| ) |
Gets transformed convex hull points.
| def UM.Mesh.MeshData.MeshData.getConvexHullVertices | ( | self, | |
| Optional, | |||
| numpy, | |||
| ndarray | |||
| ) |
Gets the convex hull points.
| def UM.Mesh.MeshData.MeshData.getExtents | ( | self, | |
| matrix | |||
| ) |
Get the extents of this mesh.
| matrix | The transformation matrix from model to world coordinates. |
| def UM.Mesh.MeshData.MeshData.getFaceNodes | ( | self, | |
| face_id | |||
| ) |
Gets the node vectors of the supplied face.
| face_id | int The index of the face (not the flattened indices). |
| def UM.Mesh.MeshData.MeshData.getFacePlane | ( | self, | |
| face_id | |||
| ) |
Gets the plane the supplied face lies in.
The resultant plane is specified by a point and a normal.
| face_id | int The index of the face (not the flattened indices). |
| def UM.Mesh.MeshData.MeshData.getIndices | ( | self, | |
| numpy, | |||
| ndarray | |||
| ) |
Get the array of indices.
| def UM.Mesh.MeshData.MeshData.getIndicesAsByteArray | ( | self, | |
| Optional, | |||
| bytes | |||
| ) |
Get all indices as a bytearray.
| def UM.Mesh.MeshData.MeshData.getNormals | ( | self, | |
| numpy, | |||
| ndarray | |||
| ) |
Return the list of vertex normals.
| def UM.Mesh.MeshData.MeshData.getNormalsAsByteArray | ( | self, | |
| Optional, | |||
| bytes | |||
| ) |
Get all normals of this mesh as a bytearray.
| def UM.Mesh.MeshData.MeshData.getTransformed | ( | self, | |
| transformation | |||
| ) |
Transform the meshdata, center and zero position by given Matrix.
| transformation | 4x4 homogenous transformation matrix |
| def UM.Mesh.MeshData.MeshData.getVerticesAsByteArray | ( | self, | |
| Optional, | |||
| bytes | |||
| ) |
Get all vertices of this mesh as a bytearray.
| def UM.Mesh.MeshData.MeshData.hasIndices | ( | self, | |
| bool | |||
| ) |
Return whether this mesh has indices.
| def UM.Mesh.MeshData.MeshData.hasNormals | ( | self, | |
| bool | |||
| ) |
Return whether this mesh has vertex normals.
| def 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, |
|||
| MeshData | |||
| ) |