Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SubdivisionModifier

The SubdivisionModifier subdivides triangle mesh geometries.

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

modify

  • modify(geometry: BufferGeometry): BufferGeometry
  • Subdivides the faces of the given [[THREE.BufferGeometry]].

    This method modifies (in-place) the vertices and the faces of the geometry. Please note that only the vertex position and their UV coordinates are subdivided. Normals, vertex colors and other attributes are left unmodified.

    Parameters

    • geometry: BufferGeometry

      The [[THREE.BufferGeometry]] to subdivide.

    Returns BufferGeometry

Protected Abstract shouldSplitTriangle

  • shouldSplitTriangle(a: Vector3, b: Vector3, c: Vector3): number | undefined
  • Returns if the given triangle should be subdivide.

    Implementations of this function should return the index of the edge of the triangle to split (0, 1, or 2) or undefined if the triangle doesn't need to be subdivided.

    Parameters

    • a: Vector3

      The position of the first vertex of the triangle.

    • b: Vector3

      The position of the second vertex of the triangle.

    • c: Vector3

      The position of the third vertex of the triangle.

    Returns number | undefined

Generated using TypeDoc