Skip to main content

DrawTextureMapScanLineBase

touchgfx/lcd/LCD.hpp

Base class for drawing scanline by the texture mapper.

Public Functions

virtual voiddrawTextureMapScanLineSubdivisions(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 voiddrawTextureMapNextSubdivision(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 boolis1Inside(int value, int limit) const
Check if value is inside [0..limit[.
FORCE_INLINE_FUNCTION boolis1x1Inside(int x, int y, int width, int height) const
Check if (x,y) is inside ([0..width[, [0..height[)
FORCE_INLINE_FUNCTION boolis2Inside(int value, int limit) const
Check if both value and value+1 are inside [0..limit[.
FORCE_INLINE_FUNCTION boolis2PartiallyInside(int value, int limit) const
Check if either value or value+1 is inside [0..limit[.
FORCE_INLINE_FUNCTION boolis2x2Inside(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 boolis2x2PartiallyInside(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_16half
1/2 in fixed16_16 format

Public Functions Documentation

drawTextureMapScanLineSubdivisions

virtual void drawTextureMapScanLineSubdivisions(intsubdivisions ,=0
const intwidthModLength ,=0
intpixelsToDraw ,=0
const intaffineLength ,=0
floatoneOverZRight ,=0
floatUOverZRight ,=0
floatVOverZRight ,=0
fixed16_16U ,=0
fixed16_16V ,=0
fixed16_16deltaU ,=0
fixed16_16deltaV ,=0
floatULeft ,=0
floatVLeft ,=0
floatURight ,=0
floatVRight ,=0
floatZRight ,=0
const DrawingSurface &dest ,=0
const intdestX ,=0
const intdestY ,=0
const TextureSurface &texture ,=0
uint8_talpha ,=0
const floatdOneOverZdXAff ,=0
const floatdUOverZdXAff ,=0
const floatdVOverZdXAff=0
)=0

Draw texture map scan line subdivisions.

Parameters:
subdivisionsThe number of subdivisions.
widthModLengthRemainder of length (after subdivisions).
pixelsToDrawThe pixels to draw.
affineLengthLength of one subdivision.
oneOverZRight1/Z right.
UOverZRightU/Z right.
VOverZRightV/Z right.
UU Coordinate in fixed16_16 notation.
VV Coordinate in fixed16_16 notation.
deltaUU delta to get to next pixel coordinate.
deltaVV delta to get to next pixel coordinate.
ULeftThe left U.
VLeftThe left V.
URightThe right U.
VRightThe right V.
ZRightThe right Z.
destDestination drawing surface.
destXDestination x coordinate.
destYDestination y coordinate.
textureThe texture.
alphaThe global alpha.
dOneOverZdXAff1/ZdX affine.
dUOverZdXAffU/ZdX affine.
dVOverZdXAffV/ZdX affine.

~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 floatdOneOverZdXAff ,
float &UOverZRight ,
const floatdUOverZdXAff ,
float &VOverZRight ,
const floatdVOverZdXAff ,
const intaffineLength ,
fixed16_16 &U ,
fixed16_16 &V ,
fixed16_16 &deltaU ,
fixed16_16 &deltaV
)

Draw texture map next subdivision.

Parameters:
ULeftU left.
VLeftV left.
ZRightZ right.
URightU right.
VRightV right.
oneOverZRight1/Z right.
dOneOverZdXAffd1/ZdX affine.
UOverZRightU/Z right.
dUOverZdXAffdU/ZdX affine.
VOverZRightV/Z right.
dVOverZdXAffdV/ZdX affine.
affineLengthLength of the affine.
UBitmap X in fixed16_16.
VBitmap Y in fixed16_16.
deltaUU delta.
deltaVV delta.

is1Inside

FORCE_INLINE_FUNCTION bool is1Inside(intvalue ,const
intlimitconst
)const

Check if value is inside [0..limit[.

Parameters:
valueValue to check.
limitUpper limit.
Returns:

true if value is inside given limit.

is1x1Inside

FORCE_INLINE_FUNCTION bool is1x1Inside(intx ,const
inty ,const
intwidth ,const
intheightconst
)const

Check if (x,y) is inside ([0..width[, [0..height[)

Parameters:
xX coordinate.
yY coordinate.
widthX limit.
heightY limit.
Returns:

true if (x,y) is inside given limits.

is2Inside

FORCE_INLINE_FUNCTION bool is2Inside(intvalue ,const
intlimitconst
)const

Check if both value and value+1 are inside [0..limit[.

Parameters:
valueValue to check.
limitUpper limit.
Returns:

true if value and value+1 are inside given limit.

is2PartiallyInside

FORCE_INLINE_FUNCTION bool is2PartiallyInside(intvalue ,const
intlimitconst
)const

Check if either value or value+1 is inside [0..limit[.

Parameters:
valueValue to check.
limitUpper limit.
Returns:

true if either value or value+1 is inside given limit.

is2x2Inside

FORCE_INLINE_FUNCTION bool is2x2Inside(intx ,const
inty ,const
intwidth ,const
intheightconst
)const

Check if both (x,y) and (x+1,y+1) are inside ([0..width[,[0..height[)

Parameters:
xX coordinate.
yY coordinate.
widthX limit.
heightY limit.
Returns:

true if (x,y) and (x+1,y+1) are inside given limits.

is2x2PartiallyInside

FORCE_INLINE_FUNCTION bool is2x2PartiallyInside(intx ,const
inty ,const
intwidth ,const
intheightconst
)const

Check if either (x,y) or (x+1,y+1) is inside ([0..width[,[0..height[)

Parameters:
xX coordinate.
yY coordinate.
widthX limit.
heightY limit.
Returns:

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