DrawTextureMapScanLineBase
touchgfx/lcd/LCD.hpp
Base class for drawing scanline by the texture mapper.
Public Functions
virtual void | drawTextureMapScanLineSubdivisions(int subdivisions, const int widthModLength, int pixelsToDraw, const int affineLength, float oneOverZRight, float UOverZRight, float VOverZRight, fixed16_16 U, fixed16_16 V, fixed16_16 deltaU, fixed16_16 deltaV, float ULeft, float VLeft, float URight, float VRight, float ZRight, const DrawingSurface & dest, const int destX, const int destY, const TextureSurface & texture, uint8_t alpha, const float dOneOverZdXAff, const float dUOverZdXAff, const float dVOverZdXAff) =0 |
Draw texture map scan line subdivisions. | |
virtual | ~DrawTextureMapScanLineBase() |
Finalizes an instance of the DrawTextureMapScanLineBase class. | |
Protected Functions
FORCE_INLINE_FUNCTION void | drawTextureMapNextSubdivision(float & ULeft, float & VLeft, float & ZRight, float & URight, float & VRight, float & oneOverZRight, const float dOneOverZdXAff, float & UOverZRight, const float dUOverZdXAff, float & VOverZRight, const float dVOverZdXAff, const int affineLength, fixed16_16 & U, fixed16_16 & V, fixed16_16 & deltaU, fixed16_16 & deltaV) |
Draw texture map next subdivision. | |
FORCE_INLINE_FUNCTION bool | is1Inside(int value, int limit) const |
Check if value is inside [0..limit[. | |
FORCE_INLINE_FUNCTION bool | is1x1Inside(int x, int y, int width, int height) const |
Check if (x,y) is inside ([0..width[, [0..height[) | |
FORCE_INLINE_FUNCTION bool | is2Inside(int value, int limit) const |
Check if both value and value+1 are inside [0..limit[. | |
FORCE_INLINE_FUNCTION bool | is2PartiallyInside(int value, int limit) const |
Check if either value or value+1 is inside [0..limit[. | |
FORCE_INLINE_FUNCTION bool | is2x2Inside(int x, int y, int width, int height) const |
Check if both (x,y) and (x+1,y+1) are inside ([0..width[,[0..height[) | |
FORCE_INLINE_FUNCTION bool | is2x2PartiallyInside(int x, int y, int width, int height) const |
Check if either (x,y) or (x+1,y+1) is inside ([0..width[,[0..height[) | |
Protected Attributes
const fixed16_16 | half |
1/2 in fixed16_16 format | |
Public Functions Documentation
drawTextureMapScanLineSubdivisions
virtual void drawTextureMapScanLineSubdivisions | ( | int | subdivisions , | =0 | |
const int | widthModLength , | =0 | |||
int | pixelsToDraw , | =0 | |||
const int | affineLength , | =0 | |||
float | oneOverZRight , | =0 | |||
float | UOverZRight , | =0 | |||
float | VOverZRight , | =0 | |||
fixed16_16 | U , | =0 | |||
fixed16_16 | V , | =0 | |||
fixed16_16 | deltaU , | =0 | |||
fixed16_16 | deltaV , | =0 | |||
float | ULeft , | =0 | |||
float | VLeft , | =0 | |||
float | URight , | =0 | |||
float | VRight , | =0 | |||
float | ZRight , | =0 | |||
const DrawingSurface & | dest , | =0 | |||
const int | destX , | =0 | |||
const int | destY , | =0 | |||
const TextureSurface & | texture , | =0 | |||
uint8_t | alpha , | =0 | |||
const float | dOneOverZdXAff , | =0 | |||
const float | dUOverZdXAff , | =0 | |||
const float | dVOverZdXAff | =0 | |||
) | =0 |
Draw texture map scan line subdivisions.
subdivisions | The number of subdivisions. |
widthModLength | Remainder of length (after subdivisions). |
pixelsToDraw | The pixels to draw. |
affineLength | Length of one subdivision. |
oneOverZRight | 1/Z right. |
UOverZRight | U/Z right. |
VOverZRight | V/Z right. |
U | U Coordinate in fixed16_16 notation. |
V | V Coordinate in fixed16_16 notation. |
deltaU | U delta to get to next pixel coordinate. |
deltaV | V delta to get to next pixel coordinate. |
ULeft | The left U. |
VLeft | The left V. |
URight | The right U. |
VRight | The right V. |
ZRight | The right Z. |
dest | Destination drawing surface. |
destX | Destination x coordinate. |
destY | Destination y coordinate. |
texture | The texture. |
alpha | The global alpha. |
dOneOverZdXAff | 1/ZdX affine. |
dUOverZdXAff | U/ZdX affine. |
dVOverZdXAff | V/ZdX affine. |
~DrawTextureMapScanLineBase
virtual ~DrawTextureMapScanLineBase | ( | ) |
Finalizes an instance of the DrawTextureMapScanLineBase class.
Protected Functions Documentation
drawTextureMapNextSubdivision
FORCE_INLINE_FUNCTION void drawTextureMapNextSubdivision | ( | float & | ULeft , | ||
float & | VLeft , | ||||
float & | ZRight , | ||||
float & | URight , | ||||
float & | VRight , | ||||
float & | oneOverZRight , | ||||
const float | dOneOverZdXAff , | ||||
float & | UOverZRight , | ||||
const float | dUOverZdXAff , | ||||
float & | VOverZRight , | ||||
const float | dVOverZdXAff , | ||||
const int | affineLength , | ||||
fixed16_16 & | U , | ||||
fixed16_16 & | V , | ||||
fixed16_16 & | deltaU , | ||||
fixed16_16 & | deltaV | ||||
) |
Draw texture map next subdivision.
ULeft | U left. |
VLeft | V left. |
ZRight | Z right. |
URight | U right. |
VRight | V right. |
oneOverZRight | 1/Z right. |
dOneOverZdXAff | d1/ZdX affine. |
UOverZRight | U/Z right. |
dUOverZdXAff | dU/ZdX affine. |
VOverZRight | V/Z right. |
dVOverZdXAff | dV/ZdX affine. |
affineLength | Length of the affine. |
U | Bitmap X in fixed16_16. |
V | Bitmap Y in fixed16_16. |
deltaU | U delta. |
deltaV | V delta. |
is1Inside
FORCE_INLINE_FUNCTION bool is1Inside | ( | int | value , | const | |
int | limit | const | |||
) | const |
Check if value is inside [0..limit[.
value | Value to check. |
limit | Upper limit. |
true if value is inside given limit.
is1x1Inside
FORCE_INLINE_FUNCTION bool is1x1Inside | ( | int | x , | const | |
int | y , | const | |||
int | width , | const | |||
int | height | const | |||
) | const |
Check if (x,y) is inside ([0..width[, [0..height[)
x | X coordinate. |
y | Y coordinate. |
width | X limit. |
height | Y limit. |
true if (x,y) is inside given limits.
is2Inside
FORCE_INLINE_FUNCTION bool is2Inside | ( | int | value , | const | |
int | limit | const | |||
) | const |
Check if both value and value+1 are inside [0..limit[.
value | Value to check. |
limit | Upper limit. |
true if value and value+1 are inside given limit.
is2PartiallyInside
FORCE_INLINE_FUNCTION bool is2PartiallyInside | ( | int | value , | const | |
int | limit | const | |||
) | const |
Check if either value or value+1 is inside [0..limit[.
value | Value to check. |
limit | Upper limit. |
true if either value or value+1 is inside given limit.
is2x2Inside
FORCE_INLINE_FUNCTION bool is2x2Inside | ( | int | x , | const | |
int | y , | const | |||
int | width , | const | |||
int | height | const | |||
) | const |
Check if both (x,y) and (x+1,y+1) are inside ([0..width[,[0..height[)
x | X coordinate. |
y | Y coordinate. |
width | X limit. |
height | Y limit. |
true if (x,y) and (x+1,y+1) are inside given limits.
is2x2PartiallyInside
FORCE_INLINE_FUNCTION bool is2x2PartiallyInside | ( | int | x , | const | |
int | y , | const | |||
int | width , | const | |||
int | height | const | |||
) | const |
Check if either (x,y) or (x+1,y+1) is inside ([0..width[,[0..height[)
x | X coordinate. |
y | Y coordinate. |
width | X limit. |
height | Y limit. |
true if either (x,y) or (x+1,y+1) is inside given limits.
Protected Attributes Documentation
half
const fixed16_16 half = 0x8000
1/2 in fixed16_16 format