Triangulator3

from panda3d.core import Triangulator3
class Triangulator3

Bases: Triangulator

This is an extension of Triangulator to handle polygons with three- dimensional points. It assumes all of the points lie in a single plane, and internally projects the supplied points into 2-D for passing to the underlying Triangulator object.

Inheritance diagram

Inheritance diagram of Triangulator3

__init__(*args, **kwargs)
addVertex()

C++ Interface: add_vertex(const Triangulator3 self, const LPoint3d point) add_vertex(const Triangulator3 self, double x, double y, double z)

/**
  • Adds a new vertex to the vertex pool. Returns the vertex index number.

*/

/**
  • Adds a new vertex to the vertex pool. Returns the vertex index number.

*/

add_vertex()

C++ Interface: add_vertex(const Triangulator3 self, const LPoint3d point) add_vertex(const Triangulator3 self, double x, double y, double z)

/**
  • Adds a new vertex to the vertex pool. Returns the vertex index number.

*/

/**
  • Adds a new vertex to the vertex pool. Returns the vertex index number.

*/

clear()

C++ Interface: clear(const Triangulator3 self)

/**
  • Removes all vertices and polygon specifications from the Triangulator, and

  • prepares it to start over.

*/

getNumVertices()

C++ Interface: get_num_vertices(Triangulator3 self)

/**
  • Returns the number of vertices in the pool. Note that the Triangulator

  • might append new vertices, in addition to those added by the user, if any

  • of the polygon is self-intersecting, or if any of the holes intersect some

  • part of the polygon edges.

*/

getPlane()

C++ Interface: get_plane(Triangulator3 self)

/**
  • Returns the plane of the polygon. This is only available after calling

  • triangulate().

*/

getVertex()

C++ Interface: get_vertex(Triangulator3 self, int n)

/**
  • Returns the nth vertex.

*/

getVertices()
get_num_vertices()

C++ Interface: get_num_vertices(Triangulator3 self)

/**
  • Returns the number of vertices in the pool. Note that the Triangulator

  • might append new vertices, in addition to those added by the user, if any

  • of the polygon is self-intersecting, or if any of the holes intersect some

  • part of the polygon edges.

*/

get_plane()

C++ Interface: get_plane(Triangulator3 self)

/**
  • Returns the plane of the polygon. This is only available after calling

  • triangulate().

*/

get_vertex()

C++ Interface: get_vertex(Triangulator3 self, int n)

/**
  • Returns the nth vertex.

*/

get_vertices()
plane
triangulate()

C++ Interface: triangulate(const Triangulator3 self)

/**
  • Does the work of triangulating the specified polygon. After this call, you

  • may retrieve the new triangles one at a time by iterating through

  • get_triangle_v0/1/2().

*/

vertices