GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Nviz library – Clip planes manipulation. More...
#include <grass/nviz.h>
Go to the source code of this file.
Functions | |
int | Nviz_new_cplane (nv_data *data, int id) |
Creates a clip plane object. More... | |
int | Nviz_on_cplane (nv_data *data, int id) |
Turn on (make current) the given clip plane. More... | |
int | Nviz_off_cplane (nv_data *data, int id) |
Turn off (make inactive) the given clip plane. More... | |
int | Nviz_draw_cplane (nv_data *data, int bound1, int bound2) |
Draw the clip plane. More... | |
int | Nviz_num_cplanes (nv_data *data) |
Return the number of clip planes objects currently allocated. More... | |
int | Nviz_get_current_cplane (nv_data *data) |
Get the current active cutplane. More... | |
int | Nviz_set_cplane_rotation (nv_data *data, int id, float dx, float dy, float dz) |
Set the rotation for the current clip plane. More... | |
int | Nviz_get_cplane_rotation (nv_data *data, int id, float *dx, float *dy, float *dz) |
Get the rotation values for the current clip plane. More... | |
int | Nviz_set_cplane_translation (nv_data *data, int id, float dx, float dy, float dz) |
Set the translation for the current clip plane. More... | |
int | Nviz_get_cplane_translation (nv_data *data, int id, float *dx, float *dy, float *dz) |
Get the translation values for the current clip plane. More... | |
int | Nviz_set_fence_color (nv_data *data, int type) |
Set appropriate fence color. More... | |
int | Nviz_set_cplane_here (nv_data *data, int cplane, float sx, float sy) |
Nviz library – Clip planes manipulation.
Based on visualization/nviz/src/cutplanes_obj.c
(C) 2008, 2010 by the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file cplanes_obj.c.
Draw the clip plane.
bound1 | |
bound2 |
Definition at line 74 of file cplanes_obj.c.
Referenced by wxnviz.Nviz::Draw(), wxnviz.Nviz::SetCPlaneInteractively(), wxnviz.Nviz::SetCPlaneRotation(), and wxnviz.Nviz::SetCPlaneTranslation().
Get the rotation values for the current clip plane.
data | nviz data |
id | id of current clip plane |
dx,dy,dz | rotation parameters |
Definition at line 189 of file cplanes_obj.c.
References tools::id, X, and Y.
Referenced by wxnviz.Nviz::GetCPlaneRotation().
Get the translation values for the current clip plane.
data | nviz data |
id | id of current clip plane |
dx,dy,dz | translation parameters |
Definition at line 226 of file cplanes_obj.c.
References tools::id, X, and Y.
Referenced by wxnviz.Nviz::GetCPlaneTranslation(), and Nviz_set_cplane_here().
int Nviz_get_current_cplane | ( | nv_data * | data | ) |
Get the current active cutplane.
data | nviz data |
Definition at line 152 of file cplanes_obj.c.
Referenced by wxnviz.Nviz::GetCPlaneCurrent(), wxnviz.Nviz::GetCPlaneRotation(), wxnviz.Nviz::GetCPlaneTranslation(), wxnviz.Nviz::SetCPlaneInteractively(), wxnviz.Nviz::SetCPlaneRotation(), and wxnviz.Nviz::SetCPlaneTranslation().
Creates a clip plane object.
The number of clip planes is fixed (MAX_CPLANES) and we'll create them all ahead of time anyway we just let the user decide on the id for each.
Definition at line 27 of file cplanes_obj.c.
References tools::id, X, and Y.
Referenced by Nviz_init_data().
int Nviz_num_cplanes | ( | nv_data * | data | ) |
Return the number of clip planes objects currently allocated.
data | nviz data |
Definition at line 142 of file cplanes_obj.c.
Referenced by wxnviz.Nviz::GetCPlanesCount().
Turn off (make inactive) the given clip plane.
data | nviz data |
cplane | id |
Definition at line 60 of file cplanes_obj.c.
References GS_unset_cplane(), and tools::id.
Referenced by Nviz_init_data(), and wxnviz.Nviz::UnselectCPlane().
Turn on (make current) the given clip plane.
data | nviz data |
cplane | id |
Definition at line 45 of file cplanes_obj.c.
References GS_set_cplane(), and tools::id.
Referenced by wxnviz.Nviz::SelectCPlane().
Definition at line 246 of file cplanes_obj.c.
References FROM, GS_distance(), GS_get_region(), GS_get_selected_point_on_surface(), gs_get_surf(), GS_v3dir(), GS_v3mult(), gsd_get_los(), tools::id, n, Nviz_get_cplane_translation(), Nviz_set_cplane_translation(), dialogs::s, dialogs::w, X, y, and Y.
Referenced by wxnviz.Nviz::SetCPlaneInteractively().
Set the rotation for the current clip plane.
data | nviz data |
id | id of current clip plane |
dx,dy,dz | rotation parameters |
Definition at line 167 of file cplanes_obj.c.
References GS_set_cplane_rot(), tools::id, X, and Y.
Referenced by wxnviz.Nviz::SetCPlaneRotation().
Set the translation for the current clip plane.
data | nviz data |
id | id of current clip plane |
dx,dy,dz | values for setting translation |
Definition at line 207 of file cplanes_obj.c.
References GS_set_cplane_trans(), tools::id, X, and Y.
Referenced by Nviz_set_cplane_here(), and wxnviz.Nviz::SetCPlaneTranslation().
Set appropriate fence color.
type | type of fence (FC_ABOVE, FC_BELOW, FC_BLEND, FC_GREY, FC_OFF) |
Definition at line 239 of file cplanes_obj.c.
References GS_set_fencecolor().
Referenced by wxnviz.Nviz::SetFenceColor().