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 int | step() |
| Perform a step along the edge. | |
| FORCE_INLINE_FUNCTION int | step(int steps) |
| Performs a number of steps along the edge. | |
Public Attributes
| int32_t | denominator |
| The denominator. | |
| int32_t | errorTerm |
| The error term. | |
| int | height |
| The height. | |
| int32_t | numerator |
| The numerator. | |
| float | oneOverZ |
| The one over z coordinate. | |
| float | oneOverZStep |
| The one over z coordinate step. | |
| float | oneOverZStepExtra |
| The one over z coordinate step extra. | |
| float | UOverZ |
| The over z coordinate. | |
| float | UOverZStep |
| The over z coordinate step. | |
| float | UOverZStepExtra |
| The over z coordinate step extra. | |
| float | VOverZ |
| The over z coordinate. | |
| float | VOverZStep |
| The over z coordinate step. | |
| float | VOverZStepExtra |
| The over z coordinate step extra. | |
| int32_t | X |
| The X coordinate. | |
| int32_t | XStep |
| Amount to increment x. | |
| int | Y |
| The Y coordinate. | |
Public Functions Documentation
Edge
Initializes a new instance of the TextureMapTypes class.
Construct the edge between two vertices and uses the gradients for calculating the interpolation values.
| gradients | The gradients for the triangle. |
| vertices | The vertices for the triangle. |
| top | The index in the vertices array of the top vertex of this edge. |
| bottom | The 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.
The remaining height.
step
| FORCE_INLINE_FUNCTION int step | ( | int | steps | ) | |
Performs a number of steps along the edge.
| steps | The number of steps the perform. |
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.