unreal.MeshDescriptionBase
¶
- class unreal.MeshDescriptionBase(outer=None, name='None')¶
Bases:
unreal.Object
Mesh Description Base
C++ Source:
Module: MeshDescription
File: MeshDescriptionBase.h
- compute_polygon_triangulation(polygon_id) → None¶
Generates triangles and internal edges for the given polygon
- Parameters
polygon_id (PolygonID) –
- create_edge_with_id(edge_id, vertex_id0, vertex_id1) → None¶
Adds a new edge to the mesh with the given ID
- create_polygon(polygon_group_id) -> (PolygonID, vertex_instance_i_ds=Array(VertexInstanceID), new_edge_i_ds=Array(EdgeID))¶
Adds a new polygon to the mesh and returns its ID. This will also make any missing edges, and all constituent triangles.
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
vertex_instance_i_ds (Array(VertexInstanceID)):
new_edge_i_ds (Array(EdgeID)):
- Return type
tuple
- create_polygon_group() → PolygonGroupID¶
Adds a new polygon group to the mesh and returns its ID
- Returns
- Return type
- create_polygon_group_with_id(polygon_group_id) → None¶
Adds a new polygon group to the mesh with the given ID
- Parameters
polygon_group_id (PolygonGroupID) –
- create_polygon_with_id(polygon_id, polygon_group_id) -> (vertex_instance_i_ds=Array(VertexInstanceID), new_edge_i_ds=Array(EdgeID))¶
Adds a new polygon to the mesh with the given ID. This will also make any missing edges, and all constituent triangles.
- Parameters
polygon_id (PolygonID) –
polygon_group_id (PolygonGroupID) –
- Returns
vertex_instance_i_ds (Array(VertexInstanceID)):
new_edge_i_ds (Array(EdgeID)):
- Return type
tuple
- create_triangle(polygon_group_id, vertex_instance_i_ds) -> (TriangleID, new_edge_i_ds=Array(EdgeID))¶
Adds a new triangle to the mesh and returns its ID. This will also make an encapsulating polygon, and any missing edges.
- Parameters
polygon_group_id (PolygonGroupID) –
vertex_instance_i_ds (Array(VertexInstanceID)) –
- Returns
new_edge_i_ds (Array(EdgeID)):
- Return type
- create_triangle_with_id(triangle_id, polygon_group_id, vertex_instance_i_ds)¶
Adds a new triangle to the mesh with the given ID. This will also make an encapsulating polygon, and any missing edges.
- Parameters
triangle_id (TriangleID) –
polygon_group_id (PolygonGroupID) –
vertex_instance_i_ds (Array(VertexInstanceID)) –
- Returns
new_edge_i_ds (Array(EdgeID)):
- Return type
- create_vertex_instance(vertex_id) → VertexInstanceID¶
Adds a new vertex instance to the mesh and returns its ID
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
- create_vertex_instance_with_id(vertex_instance_id, vertex_id) → None¶
Adds a new vertex instance to the mesh with the given ID
- Parameters
vertex_instance_id (VertexInstanceID) –
vertex_id (VertexID) –
- create_vertex_with_id(vertex_id) → None¶
Adds a new vertex to the mesh with the given ID
- Parameters
vertex_id (VertexID) –
- delete_edge(edge_id)¶
Deletes an edge from a mesh
- delete_polygon(polygon_id) -> (orphaned_edges=Array(EdgeID), orphaned_vertex_instances=Array(VertexInstanceID), orphaned_polygon_groups=Array(PolygonGroupID))¶
Deletes a polygon from the mesh
- Parameters
polygon_id (PolygonID) –
- Returns
orphaned_edges (Array(EdgeID)):
orphaned_vertex_instances (Array(VertexInstanceID)):
orphaned_polygon_groups (Array(PolygonGroupID)):
- Return type
tuple
- delete_polygon_group(polygon_group_id) → None¶
Deletes a polygon group from the mesh
- Parameters
polygon_group_id (PolygonGroupID) –
- delete_triangle(triangle_id) -> (orphaned_edges=Array(EdgeID), orphaned_vertex_instances=Array(VertexInstanceID), orphaned_polygon_groups_ptr=Array(PolygonGroupID))¶
Deletes a triangle from the mesh
- Parameters
triangle_id (TriangleID) –
- Returns
orphaned_edges (Array(EdgeID)):
orphaned_vertex_instances (Array(VertexInstanceID)):
orphaned_polygon_groups_ptr (Array(PolygonGroupID)):
- Return type
tuple
- delete_vertex_instance(vertex_instance_id)¶
Deletes a vertex instance from a mesh
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
orphaned_vertices (Array(VertexID)):
- Return type
- get_edge_connected_polygons(edge_id)¶
Returns the polygons connected to this edge
- get_edge_connected_triangles(edge_id)¶
Returns reference to an array of triangle IDs connected to this edge
- Parameters
edge_id (EdgeID) –
- Returns
out_connected_triangle_i_ds (Array(TriangleID)):
- Return type
- get_edge_vertex(edge_id, vertex_number) → VertexID¶
Returns the vertex ID corresponding to one of the edge endpoints
- get_edge_vertices(edge_id)¶
Returns a pair of vertex IDs defining the edge
- get_num_edge_connected_polygons(edge_id) → int32¶
Returns the number of polygons connected to this edge
- Parameters
edge_id (EdgeID) –
- Returns
- Return type
int32
- get_num_edge_connected_triangles(edge_id) → int32¶
Returns the number of triangles connected to this edge
- Parameters
edge_id (EdgeID) –
- Returns
- Return type
int32
- get_num_polygon_group_polygons(polygon_group_id) → int32¶
Returns the number of polygons in this polygon group
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
- Return type
int32
- get_num_polygon_internal_edges(polygon_id) → int32¶
Return the number of internal edges in this polygon
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_num_polygon_triangles(polygon_id) → int32¶
Return the number of triangles which comprise this polygon
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_num_polygon_vertices(polygon_id) → int32¶
Returns the number of vertices this polygon has
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_num_vertex_connected_edges(vertex_id) → int32¶
Returns number of edges connected to this vertex
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
int32
- get_num_vertex_connected_polygons(vertex_id) → int32¶
Returns the number of polygons connected to this vertex
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
int32
- get_num_vertex_connected_triangles(vertex_id) → int32¶
Returns number of triangles connected to this vertex
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
int32
- get_num_vertex_instance_connected_polygons(vertex_instance_id) → int32¶
Returns the number of polygons connected to this vertex instance.
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
int32
- get_num_vertex_instance_connected_triangles(vertex_instance_id) → int32¶
Returns the number of triangles connected to this vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
int32
- get_num_vertex_vertex_instances(vertex_id) → int32¶
Returns number of vertex instances created from this vertex
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
int32
- get_polygon_adjacent_polygons(polygon_id)¶
Populates the passed array with adjacent polygons
- get_polygon_group_polygons(polygon_group_id)¶
Returns the polygons associated with the given polygon group
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
out_polygon_i_ds (Array(PolygonID)):
- Return type
- get_polygon_internal_edges(polygon_id)¶
- Populate the provided array with a list of edges which are internal to the polygon, i.e. those which separate
constituent triangles.
- get_polygon_perimeter_edges(polygon_id)¶
Returns the edges which form the polygon perimeter
- get_polygon_polygon_group(polygon_id) → PolygonGroupID¶
Return the polygon group associated with a polygon
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
- get_polygon_triangles(polygon_id)¶
Return reference to an array of triangle IDs which comprise this polygon
- Parameters
polygon_id (PolygonID) –
- Returns
out_triangle_i_ds (Array(TriangleID)):
- Return type
- get_polygon_vertex_instances(polygon_id)¶
Returns reference to an array of VertexInstance IDs forming the perimeter of this polygon
- Parameters
polygon_id (PolygonID) –
- Returns
out_vertex_instance_i_ds (Array(VertexInstanceID)):
- Return type
- get_polygon_vertices(polygon_id)¶
Returns the vertices which form the polygon perimeter
- get_triangle_adjacent_triangles(triangle_id)¶
Returns the adjacent triangles to this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
out_triangle_i_ds (Array(TriangleID)):
- Return type
- get_triangle_edges(triangle_id)¶
Returns the edges which define this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
out_edge_i_ds (Array(EdgeID)):
- Return type
- get_triangle_polygon(triangle_id) → PolygonID¶
Get the polygon which contains this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
- Return type
- get_triangle_polygon_group(triangle_id) → PolygonGroupID¶
Get the polygon group which contains this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
- Return type
- get_triangle_vertex_instance(triangle_id, index) → VertexInstanceID¶
Get the specified vertex instance by index
- Parameters
triangle_id (TriangleID) –
index (int32) –
- Returns
- Return type
- get_triangle_vertex_instances(triangle_id)¶
Get the vertex instances which define this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
out_vertex_instance_i_ds (Array(VertexInstanceID)):
- Return type
- get_triangle_vertices(triangle_id)¶
Returns the vertices which define this triangle
- Parameters
triangle_id (TriangleID) –
- Returns
out_vertex_i_ds (Array(VertexID)):
- Return type
- get_vertex_adjacent_vertices(vertex_id)¶
Returns the vertices adjacent to this vertex
- get_vertex_connected_edges(vertex_id)¶
Returns reference to an array of Edge IDs connected to this vertex
- get_vertex_connected_polygons(vertex_id)¶
Returns the polygons connected to this vertex
- get_vertex_connected_triangles(vertex_id)¶
Returns the triangles connected to this vertex
- Parameters
vertex_id (VertexID) –
- Returns
out_connected_triangle_i_ds (Array(TriangleID)):
- Return type
- get_vertex_instance_connected_polygons(vertex_instance_id)¶
Returns the polygons connected to this vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
out_connected_polygon_i_ds (Array(PolygonID)):
- Return type
- get_vertex_instance_connected_triangles(vertex_instance_id)¶
Returns reference to an array of Triangle IDs connected to this vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
out_connected_triangle_i_ds (Array(TriangleID)):
- Return type
- get_vertex_instance_for_polygon_vertex(polygon_id, vertex_id) → VertexInstanceID¶
Return the vertex instance which corresponds to the given vertex on the given polygon, or FVertexInstanceID::Invalid
- Parameters
- Returns
- Return type
- get_vertex_instance_for_triangle_vertex(triangle_id, vertex_id) → VertexInstanceID¶
Return the vertex instance which corresponds to the given vertex on the given triangle, or FVertexInstanceID::Invalid
- Parameters
triangle_id (TriangleID) –
vertex_id (VertexID) –
- Returns
- Return type
- get_vertex_instance_pair_edge(vertex_instance_id0, vertex_instance_id1) → EdgeID¶
Returns the edge ID defined by the two given vertex instance IDs, if there is one; otherwise FEdgeID::Invalid
- Parameters
vertex_instance_id0 (VertexInstanceID) –
vertex_instance_id1 (VertexInstanceID) –
- Returns
- Return type
- get_vertex_instance_vertex(vertex_instance_id) → VertexID¶
Returns the vertex ID associated with the given vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
- get_vertex_pair_edge(vertex_id0, vertex_id1) → EdgeID¶
Returns the edge ID defined by the two given vertex IDs, if there is one; otherwise FEdgeID::Invalid
- get_vertex_vertex_instances(vertex_id)¶
Returns reference to an array of VertexInstance IDs instanced from this vertex
- Parameters
vertex_id (VertexID) –
- Returns
out_vertex_instance_i_ds (Array(VertexInstanceID)):
- Return type
- is_edge_internal(edge_id) → bool¶
Determine whether a given edge is an internal edge between triangles of a polygon
- is_edge_internal_to_polygon(edge_id, polygon_id) → bool¶
Determine whether a given edge is an internal edge between triangles of a specific polygon
- is_polygon_group_valid(polygon_group_id) → bool¶
Returns whether the passed polygon group ID is valid
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
- Return type
- is_triangle_part_of_ngon(triangle_id) → bool¶
Determines if this triangle is part of an n-gon
- Parameters
triangle_id (TriangleID) –
- Returns
- Return type
- is_triangle_valid(triangle_id) → bool¶
Returns whether the passed triangle ID is valid
- Parameters
triangle_id (TriangleID) –
- Returns
- Return type
- is_vertex_instance_valid(vertex_instance_id) → bool¶
Returns whether the passed vertex instance ID is valid
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
- is_vertex_orphaned(vertex_id) → bool¶
Returns whether a given vertex is orphaned, i.e. it doesn’t form part of any polygon
- reserve_new_edges(number_of_new_edges) → None¶
Reserves space for this number of new edges
- Parameters
number_of_new_edges (int32) –
- reserve_new_polygon_groups(number_of_new_polygon_groups) → None¶
Reserves space for this number of new polygon groups
- Parameters
number_of_new_polygon_groups (int32) –
- reserve_new_polygons(number_of_new_polygons) → None¶
Reserves space for this number of new polygons
- Parameters
number_of_new_polygons (int32) –
- reserve_new_triangles(number_of_new_triangles) → None¶
Reserves space for this number of new triangles
- Parameters
number_of_new_triangles (int32) –
- reserve_new_vertex_instances(number_of_new_vertex_instances) → None¶
Reserves space for this number of new vertex instances
- Parameters
number_of_new_vertex_instances (int32) –
- reserve_new_vertices(number_of_new_vertices) → None¶
Reserves space for this number of new vertices
- Parameters
number_of_new_vertices (int32) –
- reverse_polygon_facing(polygon_id) → None¶
Reverse the winding order of the vertices of this polygon
- Parameters
polygon_id (PolygonID) –
- set_polygon_polygon_group(polygon_id, polygon_group_id) → None¶
Sets the polygon group associated with a polygon
- Parameters
polygon_id (PolygonID) –
polygon_group_id (PolygonGroupID) –
- set_polygon_vertex_instance(polygon_id, perimeter_index, vertex_instance_id) → None¶
Set the vertex instance at the given index around the polygon to the new value
- Parameters
polygon_id (PolygonID) –
perimeter_index (int32) –
vertex_instance_id (VertexInstanceID) –