Class: CSGVertex

CSGVertex

Represents the 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() that behave analogous to the ones defined by PD.CSG.Vertex. This class provides normal so convenience functions like PD.CSG.sphere() can return a smooth vertex normal, but normal is not really used anywhere else.


new CSGVertex()

Creates a new vertex.

Methods


flip()

Invert all orientation-specific data (e.g. vertex normal).

Called when the orientation of a polygon is flipped.


interpolate()

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.