distance3d.colliders.MeshGraph

class distance3d.colliders.MeshGraph(mesh2origin, vertices, triangles, artist=None)[source]

Mesh collider that uses triangles for hill climbing.

Parameters:
mesh2originarray, shape (4, 4)

Pose of the mesh.

verticesarray, shape (n_vertices, 3)

Vertices of the mesh.

trianglesarray, shape (n_triangles, 3)

Indices of vertices that form triangles of the mesh.

artistpytransform3d.visualizer.Artist, optional (default: None)

Corresponding artist for visualizer.

Methods

aabb()

Get axis-aligned bounding box.

center()

Returns the (approximate) center of the collider.

collider2origin()

Get the transformation matrix of the collider

first_vertex()

Get vertex with index 0 from collider to initialize GJK algorithm.

make_artist([c])

Make artist that represents this collider.

support_function(search_direction)

Support function for collider.

update_pose(mesh2origin)

Update pose of collider.

__init__(mesh2origin, vertices, triangles, artist=None)[source]

Methods

__init__(mesh2origin, vertices, triangles[, ...])

aabb()

Get axis-aligned bounding box.

center()

Returns the (approximate) center of the collider.

collider2origin()

Get the transformation matrix of the collider

first_vertex()

Get vertex with index 0 from collider to initialize GJK algorithm.

make_artist([c])

Make artist that represents this collider.

support_function(search_direction)

Support function for collider.

update_pose(mesh2origin)

Update pose of collider.