numerics 0.1.0
Loading...
Searching...
No Matches
num::viz::Frame Struct Reference

#include <viz.hpp>

Classes

struct  Cam3
 

Public Member Functions

template<class Fn >
void step (Fn fn)
 
bool reset_pressed () const
 
void dot (float x, float y, Color c, float r=3.0f)
 
void circle (float x, float y, float r, Color c)
 
void line (float x0, float y0, float x1, float y1, Color c, float thick=1.0f)
 
void rect (float x, float y, float w, float h, Color c)
 
void rect_outline (float x, float y, float w, float h, Color c, float thick=1.0f)
 
void text (const char *s, float x, float y, int sz, Color c)
 
void textf (float x, float y, int sz, Color c, const char *fmt,...)
 
template<class Fn >
void field (int N, Fn color_fn)
 
void slider (const char *label, double lo, double hi, double &val)
 
void begin3d (Cam3 cam)
 
void end3d ()
 
void sphere3d (float x, float y, float z, float r, Color c)
 
void sphere3d_wire (float x, float y, float z, float r, Color c)
 
void line3d (float x0, float y0, float z0, float x1, float y1, float z1, Color c)
 
void cube3d (float x, float y, float z, float sx, float sy, float sz, Color c)
 

Public Attributes

int width
 
int height
 
bool & paused
 
int & substeps
 
detail::State_s
 

Detailed Description

Definition at line 153 of file viz.hpp.

Member Function Documentation

◆ begin3d()

◆ circle()

void num::viz::Frame::circle ( float  x,
float  y,
float  r,
Color  c 
)
inline

Definition at line 175 of file viz.hpp.

References num::viz::to_rl().

◆ cube3d()

void num::viz::Frame::cube3d ( float  x,
float  y,
float  z,
float  sx,
float  sy,
float  sz,
Color  c 
)
inline

Definition at line 277 of file viz.hpp.

References num::viz::to_rl().

◆ dot()

void num::viz::Frame::dot ( float  x,
float  y,
Color  c,
float  r = 3.0f 
)
inline

Definition at line 172 of file viz.hpp.

References num::viz::to_rl().

◆ end3d()

void num::viz::Frame::end3d ( )
inline

Definition at line 266 of file viz.hpp.

◆ field()

template<class Fn >
void num::viz::Frame::field ( int  N,
Fn  color_fn 
)
inline

◆ line()

void num::viz::Frame::line ( float  x0,
float  y0,
float  x1,
float  y1,
Color  c,
float  thick = 1.0f 
)
inline

Definition at line 178 of file viz.hpp.

References num::viz::to_rl().

◆ line3d()

void num::viz::Frame::line3d ( float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1,
Color  c 
)
inline

Definition at line 274 of file viz.hpp.

References num::viz::to_rl().

◆ rect()

void num::viz::Frame::rect ( float  x,
float  y,
float  w,
float  h,
Color  c 
)
inline

Definition at line 181 of file viz.hpp.

References num::viz::to_rl().

◆ rect_outline()

void num::viz::Frame::rect_outline ( float  x,
float  y,
float  w,
float  h,
Color  c,
float  thick = 1.0f 
)
inline

Definition at line 184 of file viz.hpp.

References num::viz::to_rl().

◆ reset_pressed()

bool num::viz::Frame::reset_pressed ( ) const
inline

Definition at line 169 of file viz.hpp.

◆ slider()

void num::viz::Frame::slider ( const char *  label,
double  lo,
double  hi,
double &  val 
)
inline

Definition at line 220 of file viz.hpp.

References _s, and num::viz::detail::State::slider_count.

◆ sphere3d()

void num::viz::Frame::sphere3d ( float  x,
float  y,
float  z,
float  r,
Color  c 
)
inline

Definition at line 268 of file viz.hpp.

References num::viz::to_rl().

◆ sphere3d_wire()

void num::viz::Frame::sphere3d_wire ( float  x,
float  y,
float  z,
float  r,
Color  c 
)
inline

Definition at line 271 of file viz.hpp.

References num::viz::to_rl().

◆ step()

template<class Fn >
void num::viz::Frame::step ( Fn  fn)
inline

Definition at line 162 of file viz.hpp.

References paused, and substeps.

◆ text()

void num::viz::Frame::text ( const char *  s,
float  x,
float  y,
int  sz,
Color  c 
)
inline

Definition at line 187 of file viz.hpp.

References num::viz::to_rl().

◆ textf()

void num::viz::Frame::textf ( float  x,
float  y,
int  sz,
Color  c,
const char *  fmt,
  ... 
)
inline

Definition at line 192 of file viz.hpp.

References num::viz::to_rl().

Member Data Documentation

◆ _s

detail::State& num::viz::Frame::_s

Definition at line 157 of file viz.hpp.

Referenced by field(), and slider().

◆ height

int num::viz::Frame::height

Definition at line 154 of file viz.hpp.

◆ paused

bool& num::viz::Frame::paused

Definition at line 155 of file viz.hpp.

Referenced by step().

◆ substeps

int& num::viz::Frame::substeps

Definition at line 156 of file viz.hpp.

Referenced by step().

◆ width

int num::viz::Frame::width

Definition at line 154 of file viz.hpp.


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