MythTV  master
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
BumpScope Class Reference

#include <bumpscope.h>

Inheritance diagram for BumpScope:
Inheritance graph
[legend]
Collaboration diagram for BumpScope:
Collaboration graph
[legend]

Public Member Functions

 BumpScope ()
 
 ~BumpScope () override
 
void resize (const QSize &size) override
 
bool process (VisualNode *node) override
 
bool draw (QPainter *p, const QColor &back) override
 
void handleKeyPress ([[maybe_unused]] const QString &action) override
 
- Public Member Functions inherited from VisualBase
 VisualBase (bool screensaverenable=false)
 
virtual ~VisualBase (void)
 
virtual bool processUndisplayed (VisualNode *)
 
virtual int getDesiredFPS (void)
 
virtual unsigned long getDesiredSamples (void)
 

Private Member Functions

void generate_cmap (unsigned int color)
 
void generate_phongdat (void)
 
void translate (int x, int y, int *xo, int *yo, int *xd, int *yd, int *angle) const
 
void draw_vert_line (unsigned char *buffer, int x, int y1, int y2) const
 
void render_light (int lx, int ly)
 

Static Private Member Functions

static void blur_8 (unsigned char *ptr, int w, int h, ptrdiff_t bpl)
 
static void rgb_to_hsv (unsigned int color, double *h, double *s, double *v)
 
static void hsv_to_rgb (double h, double s, double v, unsigned int *color)
 

Private Attributes

QImage * m_image {nullptr}
 
QSize m_size {0,0}
 
unsigned int m_color {0x2050FF}
 
unsigned int m_x {0}
 
unsigned int m_y {0}
 
unsigned int m_width {800}
 
unsigned int m_height {600}
 
unsigned int m_phongRad {800}
 
bool m_colorCycle {true}
 
bool m_movingLight {true}
 
ptrdiff_t m_bpl {0}
 
std::vector< std::vector< unsigned char > > m_phongDat
 
unsigned char * m_rgbBuf {nullptr}
 
std::array< double, 256 > m_intense1 {}
 
std::array< double, 256 > m_intense2 {}
 
int m_iangle {0}
 
int m_ixo {0}
 
int m_iyo {0}
 
int m_ixd {0}
 
int m_iyd {0}
 
int m_ilx {0}
 
int m_ily {0}
 
int m_wasMoving {0}
 
int m_wasColor {0}
 
double m_ih {0.0}
 
double m_is {0.0}
 
double m_iv {0.0}
 
double m_isd {0.0}
 
int m_ihd {0}
 
unsigned int m_icolor {0}
 

Additional Inherited Members

- Static Public Member Functions inherited from VisualBase
static void drawWarning (QPainter *p, const QColor &back, QSize size, const QString &warning, int fontsize=28)
 
- Protected Attributes inherited from VisualBase
int m_fps {20}
 
bool m_xscreensaverenable {true}
 

Detailed Description

Definition at line 8 of file bumpscope.h.

Constructor & Destructor Documentation

◆ BumpScope()

BumpScope::BumpScope ( )

Definition at line 24 of file bumpscope.cpp.

◆ ~BumpScope()

BumpScope::~BumpScope ( )
override

Definition at line 37 of file bumpscope.cpp.

Member Function Documentation

◆ resize()

void BumpScope::resize ( const QSize &  size)
overridevirtual

Implements VisualBase.

Definition at line 46 of file bumpscope.cpp.

◆ process()

bool BumpScope::process ( VisualNode node)
overridevirtual

Implements VisualBase.

Definition at line 347 of file bumpscope.cpp.

◆ draw()

bool BumpScope::draw ( QPainter *  p,
const QColor &  back 
)
overridevirtual

Implements VisualBase.

Definition at line 383 of file bumpscope.cpp.

◆ handleKeyPress()

void BumpScope::handleKeyPress ( [[maybe_unused] ] const QString &  action)
inlineoverridevirtual

Reimplemented from VisualBase.

Definition at line 17 of file bumpscope.h.

◆ blur_8()

void BumpScope::blur_8 ( unsigned char *  ptr,
int  w,
int  h,
ptrdiff_t  bpl 
)
staticprivate

Definition at line 79 of file bumpscope.cpp.

Referenced by process().

◆ generate_cmap()

void BumpScope::generate_cmap ( unsigned int  color)
private

Definition at line 93 of file bumpscope.cpp.

Referenced by draw(), and resize().

◆ generate_phongdat()

void BumpScope::generate_phongdat ( void  )
private

Definition at line 123 of file bumpscope.cpp.

Referenced by resize().

◆ translate()

void BumpScope::translate ( int  x,
int  y,
int *  xo,
int *  yo,
int *  xd,
int *  yd,
int *  angle 
) const
private

Definition at line 167 of file bumpscope.cpp.

Referenced by draw().

◆ draw_vert_line()

void BumpScope::draw_vert_line ( unsigned char *  buffer,
int  x,
int  y1,
int  y2 
) const
inlineprivate

Definition at line 217 of file bumpscope.cpp.

Referenced by process().

◆ render_light()

void BumpScope::render_light ( int  lx,
int  ly 
)
private

Definition at line 242 of file bumpscope.cpp.

Referenced by draw().

◆ rgb_to_hsv()

void BumpScope::rgb_to_hsv ( unsigned int  color,
double *  h,
double *  s,
double *  v 
)
staticprivate

Definition at line 275 of file bumpscope.cpp.

Referenced by draw().

◆ hsv_to_rgb()

void BumpScope::hsv_to_rgb ( double  h,
double  s,
double  v,
unsigned int *  color 
)
staticprivate

Definition at line 309 of file bumpscope.cpp.

Referenced by draw().

Member Data Documentation

◆ m_image

QImage* BumpScope::m_image {nullptr}
private

Definition at line 34 of file bumpscope.h.

Referenced by draw(), generate_cmap(), process(), render_light(), resize(), and ~BumpScope().

◆ m_size

QSize BumpScope::m_size {0,0}
private

Definition at line 36 of file bumpscope.h.

Referenced by resize().

◆ m_color

unsigned int BumpScope::m_color {0x2050FF}
private

Definition at line 38 of file bumpscope.h.

Referenced by draw(), and resize().

◆ m_x

unsigned int BumpScope::m_x {0}
private

Definition at line 39 of file bumpscope.h.

Referenced by draw(), and resize().

◆ m_y

unsigned int BumpScope::m_y {0}
private

Definition at line 40 of file bumpscope.h.

Referenced by draw(), and resize().

◆ m_width

unsigned int BumpScope::m_width {800}
private

Definition at line 41 of file bumpscope.h.

Referenced by draw(), process(), render_light(), resize(), and translate().

◆ m_height

unsigned int BumpScope::m_height {600}
private

Definition at line 42 of file bumpscope.h.

Referenced by draw(), process(), render_light(), resize(), and translate().

◆ m_phongRad

unsigned int BumpScope::m_phongRad {800}
private

Definition at line 43 of file bumpscope.h.

Referenced by generate_phongdat(), render_light(), and resize().

◆ m_colorCycle

bool BumpScope::m_colorCycle {true}
private

Definition at line 45 of file bumpscope.h.

Referenced by draw().

◆ m_movingLight

bool BumpScope::m_movingLight {true}
private

Definition at line 46 of file bumpscope.h.

Referenced by draw().

◆ m_bpl

ptrdiff_t BumpScope::m_bpl {0}
private

Definition at line 49 of file bumpscope.h.

Referenced by draw_vert_line(), process(), render_light(), and resize().

◆ m_phongDat

std::vector<std::vector<unsigned char> > BumpScope::m_phongDat
private

Definition at line 51 of file bumpscope.h.

Referenced by generate_phongdat(), render_light(), resize(), and ~BumpScope().

◆ m_rgbBuf

unsigned char* BumpScope::m_rgbBuf {nullptr}
private

Definition at line 52 of file bumpscope.h.

Referenced by process(), render_light(), resize(), and ~BumpScope().

◆ m_intense1

std::array<double,256> BumpScope::m_intense1 {}
private

Definition at line 53 of file bumpscope.h.

Referenced by BumpScope(), and generate_cmap().

◆ m_intense2

std::array<double,256> BumpScope::m_intense2 {}
private

Definition at line 54 of file bumpscope.h.

Referenced by BumpScope(), and generate_cmap().

◆ m_iangle

int BumpScope::m_iangle {0}
private

Definition at line 56 of file bumpscope.h.

Referenced by draw().

◆ m_ixo

int BumpScope::m_ixo {0}
private

Definition at line 57 of file bumpscope.h.

Referenced by draw().

◆ m_iyo

int BumpScope::m_iyo {0}
private

Definition at line 58 of file bumpscope.h.

Referenced by draw().

◆ m_ixd

int BumpScope::m_ixd {0}
private

Definition at line 59 of file bumpscope.h.

Referenced by draw().

◆ m_iyd

int BumpScope::m_iyd {0}
private

Definition at line 60 of file bumpscope.h.

Referenced by draw().

◆ m_ilx

int BumpScope::m_ilx {0}
private

Definition at line 61 of file bumpscope.h.

Referenced by draw().

◆ m_ily

int BumpScope::m_ily {0}
private

Definition at line 62 of file bumpscope.h.

Referenced by draw().

◆ m_wasMoving

int BumpScope::m_wasMoving {0}
private

Definition at line 63 of file bumpscope.h.

Referenced by draw().

◆ m_wasColor

int BumpScope::m_wasColor {0}
private

Definition at line 64 of file bumpscope.h.

Referenced by draw().

◆ m_ih

double BumpScope::m_ih {0.0}
private

Definition at line 65 of file bumpscope.h.

Referenced by draw().

◆ m_is

double BumpScope::m_is {0.0}
private

Definition at line 66 of file bumpscope.h.

Referenced by draw().

◆ m_iv

double BumpScope::m_iv {0.0}
private

Definition at line 67 of file bumpscope.h.

Referenced by draw().

◆ m_isd

double BumpScope::m_isd {0.0}
private

Definition at line 68 of file bumpscope.h.

Referenced by draw().

◆ m_ihd

int BumpScope::m_ihd {0}
private

Definition at line 69 of file bumpscope.h.

Referenced by draw().

◆ m_icolor

unsigned int BumpScope::m_icolor {0}
private

Definition at line 70 of file bumpscope.h.

Referenced by draw().


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