Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a vertex of a polygon. Use your own vertex class instead of this one to provide additional features like texture coordinates and vertex colors. Custom vertex classes need to provide a pos property and clone(), flip(), and interpolate() methods that behave analogous to the ones defined by BABYLON.CSG.Vertex. This class provides normal so convenience functions like BABYLON.CSG.sphere() can return a smooth vertex normal, but normal is not used anywhere else. Same goes for uv, it allows to keep the original vertex uv coordinates of the 2 meshes

Hierarchy

  • Vertex

Index

Constructors

  • Initializes the vertex

    Parameters

    • pos: Vector3

      The position of the vertex

    • normal: Vector3

      The normal of the vertex

    • Optional uv: Vector2

      The texture coordinate of the vertex

    • Optional vertColor: Color4

      The RGBA color of the vertex

    Returns Vertex

Properties

normal: Vector3

The normal of the vertex

pos: Vector3

The position of the vertex

uv?: Vector2

The texture coordinate of the vertex

vertColor?: Color4

The texture coordinate of the vertex

Methods

  • Make a clone, or deep copy, of the vertex

    Returns Vertex

    A new Vertex

  • flip(): void
  • Invert all orientation-specific data (e.g. vertex normal). Called when the orientation of a polygon is flipped.

    Returns void

  • Create a new vertex between this vertex and other by linearly interpolating all properties using a parameter of t. Subclasses should override this to interpolate additional properties.

    Parameters

    • other: Vertex

      the vertex to interpolate against

    • t: number

      The factor used to linearly interpolate between the vertices

    Returns Vertex

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme