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 183 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 207 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 335 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 204 of file viz.hpp.

References num::viz::to_rl().

◆ end3d()

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

Definition at line 315 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 210 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 325 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 218 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 221 of file viz.hpp.

References num::viz::to_rl().

◆ reset_pressed()

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

Definition at line 199 of file viz.hpp.

◆ slider()

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

Definition at line 264 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 319 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 322 of file viz.hpp.

References num::viz::to_rl().

◆ step()

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

Definition at line 192 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 229 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 234 of file viz.hpp.

References num::viz::to_rl().

Member Data Documentation

◆ _s

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

Definition at line 187 of file viz.hpp.

Referenced by field(), and slider().

◆ height

int num::viz::Frame::height

Definition at line 184 of file viz.hpp.

◆ paused

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

Definition at line 185 of file viz.hpp.

Referenced by step().

◆ substeps

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

Definition at line 186 of file viz.hpp.

Referenced by step().

◆ width

int num::viz::Frame::width

Definition at line 184 of file viz.hpp.


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