Class Vertex
Hierarchy
- Vertex
Index
Constructors
constructor
Properties
normalSearch playground for normal
The normal of the vertex
posSearch playground for pos
The position of the vertex
Optional uvSearch playground for uv
The texture coordinate of the vertex
Optional vert ColorSearch playground for vertColor
The texture coordinate of the vertex
Methods
cloneSearch playground for clone
Make a clone, or deep copy, of the vertex
Returns Vertex
A new Vertex
flipSearch playground for flip
Invert all orientation-specific data (e.g. vertex normal). Called when the orientation of a polygon is flipped.
Returns void
interpolateSearch playground for interpolate
Create a new vertex between this vertex and
other
by linearly interpolating all properties using a parameter oft
. 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
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 andclone()
,flip()
, andinterpolate()
methods that behave analogous to the ones defined byBABYLON.CSG.Vertex
. This class providesnormal
so convenience functions likeBABYLON.CSG.sphere()
can return a smooth vertex normal, butnormal
is not used anywhere else. Same goes for uv, it allows to keep the original vertex uv coordinates of the 2 meshes