CCIMXDesktop
 
Loading...
Searching...
No Matches
GroundLineProviders Struct Reference

A utility class to manage and render dynamic ground lines. More...

#include <GroundLineProviders.h>

Classes

struct  GroundLine
 Represents a single ground line with position, length, and animation phase. More...
 

Public Member Functions

 GroundLineProviders ()=delete
 Deleted default constructor to enforce parameterized construction.
 
 Q_DISABLE_COPY_MOVE (GroundLineProviders)
 Disables copy and move semantics.
 
 GroundLineProviders (int patternLength, int h)
 Constructs GroundLineProviders with line pattern length and scene height.
 
void initGroundLines (int count=200)
 Initializes ground lines.
 
void update_params (int scrollSpeed)
 Updates ground line parameters based on scrolling speed.
 
void drawLines (QPainter *painter, int w, int h)
 Draws the ground lines on the given painter.
 

Detailed Description

A utility class to manage and render dynamic ground lines.

Provides components for drawing ground lines.

Provides and manages animated ground lines for the scene background.

Constructor & Destructor Documentation

◆ GroundLineProviders()

GroundLineProviders::GroundLineProviders ( int  patternLength,
int  h 
)
explicit

Constructs GroundLineProviders with line pattern length and scene height.

Parameters
patternLengthThe length of the line pattern.
hThe height of the scene.

Member Function Documentation

◆ drawLines()

void GroundLineProviders::drawLines ( QPainter *  painter,
int  w,
int  h 
)

Draws the ground lines on the given painter.

Parameters
painterThe QPainter used for rendering.
wWidth of the drawing area.
hHeight of the drawing area.

◆ initGroundLines()

void GroundLineProviders::initGroundLines ( int  count = 200)

Initializes ground lines.

Parameters
countNumber of lines to initialize. Default is 200.

◆ update_params()

void GroundLineProviders::update_params ( int  scrollSpeed)

Updates ground line parameters based on scrolling speed.

Parameters
scrollSpeedThe horizontal scrolling speed.

The documentation for this struct was generated from the following files: