Skip to main content
Version: 4.16

Edge

An edge contains information about one edge, between two points, of a triangle, as well as information about how to interpolate values when moving in the vertical direction.

Public Functions#

Edge(const Gradients & gradients, const Point3D * vertices, int top, int bottom)
Initializes a new instance of the TextureMapTypes class.
FORCE_INLINE_FUNCTION intstep()
Perform a step along the edge.
FORCE_INLINE_FUNCTION intstep(int steps)
Performs a number of steps along the edge.

Public Attributes#

int32_tdenominator
The denominator.
int32_terrorTerm
The error term.
intheight
The height.
int32_tnumerator
The numerator.
floatoneOverZ
The one over z coordinate.
floatoneOverZStep
The one over z coordinate step.
floatoneOverZStepExtra
The one over z coordinate step extra.
floatUOverZ
The over z coordinate.
floatUOverZStep
The over z coordinate step.
floatUOverZStepExtra
The over z coordinate step extra.
floatVOverZ
The over z coordinate.
floatVOverZStep
The over z coordinate step.
floatVOverZStepExtra
The over z coordinate step extra.
int32_tX
The X coordinate.
int32_tXStep
Amount to increment x.
intY
The Y coordinate.

Public Functions Documentation#

Edge#

Edge(const Gradients &gradients ,
const Point3D *vertices ,
inttop ,
intbottom
)

Initializes a new instance of the TextureMapTypes class.

Construct the edge between two vertices and uses the gradients for calculating the interpolation values.

Parameters:
gradientsThe gradients for the triangle.
verticesThe vertices for the triangle.
topThe index in the vertices array of the top vertex of this edge.
bottomThe index in the vertices array of the bottom vertex of this edge.

step#

FORCE_INLINE_FUNCTION int step()

Perform a step along the edge.

Increase the Y and decrease the height.

Returns:

The remaining height.

step#

FORCE_INLINE_FUNCTION int step(intsteps)

Performs a number of steps along the edge.

Parameters:
stepsThe number of steps the perform.
Returns:

The remaining height.

Public Attributes Documentation#

denominator#

int32_t denominator

The denominator.

errorTerm#

int32_t errorTerm

The error term.

height#

int height

The height.

numerator#

int32_t numerator

The numerator.

oneOverZ#

float oneOverZ

The one over z coordinate.

oneOverZStep#

float oneOverZStep

The one over z coordinate step.

oneOverZStepExtra#

float oneOverZStepExtra

The one over z coordinate step extra.

UOverZ#

float UOverZ

The over z coordinate.

UOverZStep#

float UOverZStep

The over z coordinate step.

UOverZStepExtra#

float UOverZStepExtra

The over z coordinate step extra.

VOverZ#

float VOverZ

The over z coordinate.

VOverZStep#

float VOverZStep

The over z coordinate step.

VOverZStepExtra#

float VOverZStepExtra

The over z coordinate step extra.

X#

int32_t X

The X coordinate.

XStep#

int32_t XStep

Amount to increment x.

Y#

int Y

The Y coordinate.