BulletTriangleMesh

from acron.bullet import BulletTriangleMesh
class BulletTriangleMesh

Bases:

Bases: TypedWritableReferenceCount

Inheritance diagram

digraph inheritance89fbf6111b { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "BulletTriangleMesh" [URL="acron.bullet.BulletTriangleMesh.html#acron.bullet.BulletTriangleMesh",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "BulletTriangleMesh" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }
__init__()
add_array()

Adds triangle information from an array of points and indices referring to these points. This is more efficient than adding triangles one at a time.

If remove_duplicate_vertices is true, it will make sure that it does not add duplicate vertices if they already exist in the triangle mesh, within the tolerance specified by set_welding_distance(). This comes at a significant performance cost, especially for large meshes.

add_geom()

Adds the geometry from the indicated Geom from the triangle mesh. This is a one-time copy operation, and future updates to the Geom will not be reflected.

If remove_duplicate_vertices is true, it will make sure that it does not add duplicate vertices if they already exist in the triangle mesh, within the tolerance specified by set_welding_distance(). This comes at a significant performance cost, especially for large meshes.

add_triangle()

Adds a triangle with the indicated coordinates.

If remove_duplicate_vertices is true, it will make sure that it does not add duplicate vertices if they already exist in the triangle mesh, within the tolerance specified by set_welding_distance(). This comes at a significant performance cost, especially for large meshes.

static get_class_type()
get_num_triangles()

Returns the number of triangles in this triangle mesh.

get_welding_distance()

Returns the value previously set with set_welding_distance(), or the value of 0 if none was set.

output()
preallocate()

Used to reserve memory in anticipation of the given amount of vertices and indices being added to the triangle mesh. This is useful if you are about to call add_triangle() many times, to prevent unnecessary reallocations.

set_welding_distance()

Sets the square of the distance at which vertices will be merged together when adding geometry with remove_duplicate_vertices set to true.

The default is 0, meaning vertices will only be merged if they have the exact same position.

property triangles → Sequence[LVecBase3i]

Returns the vertex indices making up the given triangle index.

property vertices → Sequence[LPoint3]

Returns the vertex at the given vertex index.

property welding_distance → float
Getter

Returns the value previously set with set_welding_distance(), or the value of 0 if none was set.

Setter

Sets the square of the distance at which vertices will be merged together when adding geometry with remove_duplicate_vertices set to true.

The default is 0, meaning vertices will only be merged if they have the exact same position.

write()