Skip to content

Commit

Permalink
Merge pull request #2 from sariug/Cross-Section
Browse files Browse the repository at this point in the history
gui vector float is added for origin and normal
  • Loading branch information
sariug committed Mar 5, 2020
2 parents c2ba799 + 7201b19 commit c950f93
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,19 @@ bool gui_bbox(float box[4][4])
return ret;
}

bool gui_vector_float(const char *id, float vector[3], float step,
float minv, float maxv, const char *format)
{
bool ret = false;

gui_group_begin(id);
ret |= gui_input_float("x", &vector[0], step, minv, maxv, format);
ret |= gui_input_float("y", &vector[1], step, minv, maxv, format);
ret |= gui_input_float("z", &vector[2], step, minv, maxv, format);
gui_group_end();
return ret;
}

bool gui_angle(const char *id, float *v, int vmin, int vmax)
{
int a;
Expand Down
3 changes: 3 additions & 0 deletions src/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ bool gui_input_float(const char *label, float *v, float step,
float minv, float maxv, const char *format);
bool gui_angle(const char *id, float *v, int vmin, int vmax);
bool gui_bbox(float box[4][4]);
bool gui_vector_float(const char *id, float vector[3], float step,
float minv, float maxv, const char *format);

bool gui_quat(const char *label, float q[4]);
bool gui_action_button(const char *id, const char *label, float size,
const char *sig, ...);
Expand Down

0 comments on commit c950f93

Please sign in to comment.