mightymandel v16

GPU-based Mandelbrot set explorer

interact.c File Reference

(v16)

#include <math.h>
#include <string.h>
#include "logging.h"
#include "interact.h"
#include "utility.h"
+ Include dependency graph for interact.c:

Go to the source code of this file.

Functions

void interact_begin (int w, int h, const mpfr_t cx, const mpfr_t cy, const mpfr_t r, double weight, bool show_glitches)
void interact_end (void)
void interact_reset (void)
static void interact_coord (mpfr_t x, mpfr_t y, double px, double py)
static void interact_center (const mpfr_t x, const mpfr_t y)
static void interact_translate (double dx, double dy)
static void interact_zoom_about (const mpfr_t x, const mpfr_t y, double factor)
static void interact_zoom (double factor)
void interact_mouse (button button, double x, double y, bool shift, bool ctrl)
void interact_keyboard (key key, bool shift, bool ctrl)

Function Documentation

void interact_begin ( int  w,
int  h,
const mpfr_t  cx,
const mpfr_t  cy,
const mpfr_t  r,
double  weight,
bool  show_glitches 
)

Definition at line 12 of file interact.c.

References interact::centerx, interact::centery, interact::height, interact::radius, interact::show_glitches, interact::weight, and interact::width.

Referenced by main().

+ Here is the caller graph for this function:

static void interact_center ( const mpfr_t  x,
const mpfr_t  y 
)
static

Definition at line 42 of file interact.c.

References interact::centerx, interact::centery, interact::height, pxbits(), interact::radius, and interact::updated.

Referenced by interact_mouse(), and interact_translate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void interact_coord ( mpfr_t  x,
mpfr_t  y,
double  px,
double  py 
)
static

Definition at line 38 of file interact.c.

References interact::centerx, interact::centery, interact::height, pixel_coordinate(), interact::radius, and interact::width.

Referenced by interact_mouse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void interact_end ( void  )

Definition at line 26 of file interact.c.

References interact::centerx, interact::centery, and interact::radius.

Referenced by main().

+ Here is the caller graph for this function:

void interact_keyboard ( key  key,
bool  shift,
bool  ctrl 
)

Definition at line 97 of file interact.c.

References interact_translate(), interact_zoom(), k_down, k_left, k_quit, k_right, k_save_screenshot, k_show_glitches, k_up, k_weight_0, k_weight_1, k_weight_2, k_weight_3, k_weight_4, k_weight_5, k_weight_6, k_weight_7, k_weight_8, k_weight_9, k_zoom_in, k_zoom_out, log_message, LOG_NOTICE, interact::quit, interact::save_screenshot, interact::show_glitches, and interact::weight.

Referenced by key_press_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void interact_mouse ( button  button,
double  x,
double  y,
bool  shift,
bool  ctrl 
)

Definition at line 85 of file interact.c.

References b_down, b_left, b_middle, b_right, b_up, interact_center(), interact_coord(), and interact_zoom_about().

Referenced by button_handler(), and scroll_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void interact_reset ( void  )

Definition at line 32 of file interact.c.

References interact::quit, interact::save_screenshot, and interact::updated.

Referenced by poll_ui().

+ Here is the caller graph for this function:

static void interact_translate ( double  dx,
double  dy 
)
static

Definition at line 51 of file interact.c.

References interact::centerx, interact::centery, interact::height, interact_center(), pixel_coordinate(), interact::radius, and interact::width.

Referenced by interact_keyboard().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void interact_zoom ( double  factor)
static

Definition at line 81 of file interact.c.

References interact::centerx, interact::centery, and interact_zoom_about().

Referenced by interact_keyboard().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void interact_zoom_about ( const mpfr_t  x,
const mpfr_t  y,
double  factor 
)
static

Definition at line 63 of file interact.c.

References interact::centerx, interact::centery, interact::height, pxbits(), interact::radius, and interact::updated.

Referenced by interact_mouse(), and interact_zoom().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: