class DVgeometry

A toplevel object which provided services such as animation and display list creation.

Public Fields

[more]Tk_TimerToken timerID
[more]DVnamed_properties named_properties

Public Methods

[more] DVgeometry(int (*)(DVcreate_image_arguments &)=NULL)
Default constructor.
[more] ~DVgeometry()
default destuctor
[more]void reset()
initialize
[more]int read_file(char *input_string)
Read a file based on a filename and make a display list
[more]int load_file()
Load a file based on the default filename and make a display list
[more]int draw()
Draw the scene to the current OpenGL drawable.
[more]void drawing_area(Tk_Window val)
Set the drawing area widget for the scene
[more]else void drawing_area(Widget val)
Set the drawing area widget for the scene
[more]endif void zoom(float val)
Multiply the current zoom vale by the arguement
[more]void rotate(float *val)
rotate by the new quaternion
[more]void translate(float x, float y)
translate
[more]void get_zoom(float *out)
[more]void get_rotate(float *out)
[more]void get_translate(float *out)
[more]void set_zoom(float *in)
[more]void set_rotate(float *in)
[more]void set_translate(float *in)
[more]float get_zoom()
Return the current zoom value
[more]void useTimer()
Turn on the timer.
[more]void noTimer()
Turn off the timer
[more]int ifTimer()
Ask is the timer is turned on
[more]void set_background_color(const DVcolor&)
[more]void set_background_color(const LCVMstring&)
[more]void set_background_color(const DVrich_property_item<DVcolor>&)
[more]void set_background_color(const DVexplicit_property_item<DVcolor>&)
[more]void set_background_color(const DVnamed_property_item<DVcolor>&)
[more]int get_animation_optimize_flag() const
Return the value of the animation_optimize_flag.
[more]DVgeometry& set_animation_optimize_flag(const int)
Set the value of the animation_optimize_flag
[more]int get_first_frame_number() const
Gets the first frame number.
[more]int get_last_frame_number() const
Gets the last frame number.
[more]void set_first_frame_number(int)
Sets the first frame number.
[more]void set_last_frame_number(int)
Sets the last frame number.
[more]DVgeometry& set_animation_frames(const int, const int, const int)
Set the animation first frame, last frame and step sizes.
[more]int get_animation_first_frame_number()
get the animation first frame
[more]int get_animation_last_frame_number()
get the animation last frame
[more]int get_animation_step_frame_number()
get the animation step size
[more]DVgeometry& set_current_frame_number(const int)
set the current frame
[more]int get_current_frame_number()
get the current frame number
[more]DVgeometry& set_frames_per_second(const float)
get and set the frame rate
[more]float get_frames_per_second() const
[more]int compute_animation_size()
determine the size of the animation
[more]int valid_draw_frame(const int frame_num) const
given a frame number, it returns the frame number closest to it that we are allowed to display
[more]int create_display_lists()
generate display lists
[more]void animate_run_forward()
run the animation forward starting from the beginning
[more]void animate_run_backward()
run the animation backward starting from the end
[more]void animate_play_forward()
run the animation forward starting from the current frame
[more]void animate_play_backward()
run the animation backward starting from the current frame
[more]friend void continuous_animate_next(ClientData)
continuously animate frames going forward
[more]friend void continuous_animate_next(XtPointer, XtIntervalId *)
continuously animate frames going forward
[more]friend void continuous_animate_previous(ClientData)
continuously animate frames going backward
[more]friend void continuous_animate_previous(XtPointer, XtIntervalId *)
continuously animate frames going backward
[more]int animate_next()
display the next frame--return zero if there is no next frame
[more]int animate_previous()
display the previous frame--return zero if there is no previous frame
[more]void animation_to_start()
display the first frame of the animation set
[more]void animation_to_end()
display the last frame of the animation set
[more]void animation_to_frame(const int frame_num)
display the frame given by frame_num.
[more]void animate_stop()
[more]void show_front()
Set the view matrix to show the "front" of the scene.
[more]void show_back()
Set the view matrix to show the "back" of the scene.
[more]void show_top()
Set the view matrix to show the "top" of the scene.
[more]void show_bottom()
Set the view matrix to show the "bottom" of the scene.
[more]void show_left()
Set the view matrix to show the "left" of the scene.
[more]void show_right()
Set the view matrix to show the "right" of the scene.
[more]DVexport_state_type set_export_state(const LCVMstring&)
[more]DVexport_state_type get_export_state(LCVMstring&)
[more]DVexport_state_type get_export_state()
[more]DVrecord_state_type export_start_record(const LCVMstring&, const LCVMstring&)
[more]DVrecord_state_type export_start_record(const DVexport_state_type, const LCVMstring&)
[more]DVrecord_state_type export_pause_record()
[more]DVrecord_state_type export_continue_record()
[more]DVrecord_state_type export_stop_record()
[more]DVrecord_state_type get_record_state()
[more]int animation_draw()
[more]int export_draw()
[more]int export_dataviewer(LCVMstring&)
Export the scene in the DataViewer file format.
[more]int export_povary(LCVMstring&)
Export the scene as a Povray file (NOT SUPPORTED).
[more]int export_inventor(LCVMstring&)
Export the scene as an Inventor file (NOT SUPPORTED).
[more]int export_postscript(LCVMstring&)
Export the scene as postscript (NOT SUPPORTED).
[more]int export_ppm(LCVMstring&)
Export the scene as a ppm bitmap file.
[more]void set_geometry_pointer()
Set the global dv_current_scene_pointer.
[more]void set_geometry_pointer(DVgeometry*) const
Set the global dv_current_scene_pointer.
[more]void get_name_stack(int x, int y, LCVMstring &name_stack)
Return the name_stack of the vertex designated by the give x and y coordinates in the viewport.
[more]void set_perspective(float fov, float ratio, float front_clip, float back_clip)
Set the perspective matrix
[more]void get_perspective(float &fov, float &ratio, float &front_clip, float &back_clip)
Set the perspective matrix
[more]void set_user_function(int (*func)(DVcreate_image_arguments &))
Set the function which the DVgeometry will use to create the scene graph.
[more]void new_top_level_container(DVcontainer&)
Set the top level container to the given container and generate display lists.
[more]DVcontainer& get_top_level_container()
return a reference to the top level container
[more]void reset_named_properties()
reset the named properties so that there are no pre-existing names
[more]void set_default_input_string(LCVMstring&)
Set the default_filename.
[more]void get_default_input_string(LCVMstring&) const
Get the default_filename.
[more]void set_default_output_string(LCVMstring&)
Set the default output string.
[more]void get_default_output_string(LCVMstring&) const
Get the default output string.
[more]void set_export_filename(LCVMstring&)
Set the export_filename.
[more]void get_export_filename(LCVMstring&) const
Get the export_filename.
[more]void set_pick_size(double val)
Set the size of pick region.
[more]double get_pick_size()
Get the size of pick region.
[more]void set_persp_angle(double val)
Set the size of perspective angle.
[more]double get_persp_angle()
Get the size of perspective angle


Documentation

A toplevel object which provided services such as animation and display list creation. It is the main entry point for DataViewer if you want to use it in retained mode.
oTk_TimerToken timerID

oDVnamed_properties named_properties

o DVgeometry(int (*)(DVcreate_image_arguments &)=NULL)
Default constructor. It takes as an arguement a function which will create the scene graph which we wish to plot. Note that if a DVgeometry object is created with the function pointer NULL then load_file and read_file and load_file don't actually do anything.

o ~DVgeometry()
default destuctor

ovoid reset()
initialize

oint read_file(char *input_string)
Read a file based on a filename and make a display list

oint load_file()
Load a file based on the default filename and make a display list

oint draw()
Draw the scene to the current OpenGL drawable. Bascially it calles the display list(s) which contains the compiled version of scene graph. It does not do a swapbuffer on double buffered displays you you need to wrap it in some OpenGL code if you have a double buffered display.

ovoid drawing_area(Tk_Window val)
Set the drawing area widget for the scene

oelse void drawing_area(Widget val)
Set the drawing area widget for the scene

oendif void zoom(float val)
Multiply the current zoom vale by the arguement

ovoid rotate(float *val)
rotate by the new quaternion

ovoid translate(float x, float y)
translate

ovoid get_zoom(float *out)

ovoid get_rotate(float *out)

ovoid get_translate(float *out)

ovoid set_zoom(float *in)

ovoid set_rotate(float *in)

ovoid set_translate(float *in)

ofloat get_zoom()
Return the current zoom value

ovoid useTimer()
Turn on the timer. When the timer is on DVgeometry will print out frames per-second for the current scene

ovoid noTimer()
Turn off the timer

oint ifTimer()
Ask is the timer is turned on

ovoid set_background_color(const DVcolor&)

ovoid set_background_color(const LCVMstring&)

ovoid set_background_color(const DVrich_property_item<DVcolor>&)

ovoid set_background_color(const DVexplicit_property_item<DVcolor>&)

ovoid set_background_color(const DVnamed_property_item<DVcolor>&)

oint get_animation_optimize_flag() const
Return the value of the animation_optimize_flag. When this flag is true, the DV geometry object will optimized the animation by precomputing a display list for each frame of the animation. This can lead to a LARGE amount of memory usage.

oDVgeometry& set_animation_optimize_flag(const int)
Set the value of the animation_optimize_flag

oint get_first_frame_number() const
Gets the first frame number. This number is NOT used internally by DVgeometry, it is only provided as information to whatever external program is using the DVgeometry. It should be considered as a hint from the user defined scene graph creation function. Its main use to to allow scene graph creation function to communicate which subset of the animation to draw.

oint get_last_frame_number() const
Gets the last frame number. This number is NOT used internally by DVgeometry, it is only provided as information to whatever external program is using the DVgeometry. It should be considered as a hint from the user defined scene graph creation function. Its main use to to allow scene graph creation function to communicate which subset of the animation to draw.

ovoid set_first_frame_number(int)
Sets the first frame number. This number is NOT used internally by DVgeometry, it is only provided as information to whatever external program is using the DVgeometry. It should be considered as a hint from the user defined scene graph creation function. Its main use to to allow scene graph creation function to communicate which subset of the animation to draw.

ovoid set_last_frame_number(int)
Sets the last frame number. This number is NOT used internally by DVgeometry, it is only provided as information to whatever external program is using the DVgeometry. It should be considered as a hint from the user defined scene graph creation function. Its main use to to allow scene graph creation function to communicate which subset of the animation to draw.

oDVgeometry& set_animation_frames(const int, const int, const int)
Set the animation first frame, last frame and step sizes. These are the numbers used internally by DVgeometry to compute the bounds of the animation. If animation_optimize_flag is true, this information is used to pre-compute display lists.

oint get_animation_first_frame_number()
get the animation first frame

oint get_animation_last_frame_number()
get the animation last frame

oint get_animation_step_frame_number()
get the animation step size

oDVgeometry& set_current_frame_number(const int)
set the current frame

oint get_current_frame_number()
get the current frame number

oDVgeometry& set_frames_per_second(const float)
get and set the frame rate

ofloat get_frames_per_second() const

oint compute_animation_size()
determine the size of the animation

oint valid_draw_frame(const int frame_num) const
given a frame number, it returns the frame number closest to it that we are allowed to display

oint create_display_lists()
generate display lists

ovoid animate_run_forward()
run the animation forward starting from the beginning

ovoid animate_run_backward()
run the animation backward starting from the end

ovoid animate_play_forward()
run the animation forward starting from the current frame

ovoid animate_play_backward()
run the animation backward starting from the current frame

ofriend void continuous_animate_next(ClientData)
continuously animate frames going forward

ofriend void continuous_animate_next(XtPointer, XtIntervalId *)
continuously animate frames going forward

ofriend void continuous_animate_previous(ClientData)
continuously animate frames going backward

ofriend void continuous_animate_previous(XtPointer, XtIntervalId *)
continuously animate frames going backward

oint animate_next()
display the next frame--return zero if there is no next frame

oint animate_previous()
display the previous frame--return zero if there is no previous frame

ovoid animation_to_start()
display the first frame of the animation set

ovoid animation_to_end()
display the last frame of the animation set

ovoid animation_to_frame(const int frame_num)
display the frame given by frame_num.

ovoid animate_stop()

ovoid show_front()
Set the view matrix to show the "front" of the scene.

ovoid show_back()
Set the view matrix to show the "back" of the scene.

ovoid show_top()
Set the view matrix to show the "top" of the scene.

ovoid show_bottom()
Set the view matrix to show the "bottom" of the scene.

ovoid show_left()
Set the view matrix to show the "left" of the scene.

ovoid show_right()
Set the view matrix to show the "right" of the scene.

oDVexport_state_type set_export_state(const LCVMstring&)

oDVexport_state_type get_export_state(LCVMstring&)

oDVexport_state_type get_export_state()

oDVrecord_state_type export_start_record(const LCVMstring&, const LCVMstring&)

oDVrecord_state_type export_start_record(const DVexport_state_type, const LCVMstring&)

oDVrecord_state_type export_pause_record()

oDVrecord_state_type export_continue_record()

oDVrecord_state_type export_stop_record()

oDVrecord_state_type get_record_state()

oint animation_draw()

oint export_draw()

oint export_dataviewer(LCVMstring&)
Export the scene in the DataViewer file format.

oint export_povary(LCVMstring&)
Export the scene as a Povray file (NOT SUPPORTED).

oint export_inventor(LCVMstring&)
Export the scene as an Inventor file (NOT SUPPORTED).

oint export_postscript(LCVMstring&)
Export the scene as postscript (NOT SUPPORTED).

oint export_ppm(LCVMstring&)
Export the scene as a ppm bitmap file.

ovoid set_geometry_pointer()
Set the global dv_current_scene_pointer. This is a hack for the Python interface. If there are several DVgeometry objects it points at the last one used.

ovoid set_geometry_pointer(DVgeometry*) const
Set the global dv_current_scene_pointer. This is a hack for the Python interface. If there are several DVgeometry objects it points at the last one used.

ovoid get_name_stack(int x, int y, LCVMstring &name_stack)
Return the name_stack of the vertex designated by the give x and y coordinates in the viewport. In general, each DVcontainer (or other grouping node) will push a new name onto the stack and increment it for each of its children. Also, some compsite nodes (such as DVlines) will push their own names onto the stack. Unfortunately, there is no one place to look for behavior of each class in this regard.

ovoid set_perspective(float fov, float ratio, float front_clip, float back_clip)
Set the perspective matrix

ovoid get_perspective(float &fov, float &ratio, float &front_clip, float &back_clip)
Set the perspective matrix

ovoid set_user_function(int (*func)(DVcreate_image_arguments &))
Set the function which the DVgeometry will use to create the scene graph.

ovoid new_top_level_container(DVcontainer&)
Set the top level container to the given container and generate display lists. NOTE: This routine makes a copy of the given container to create a DVcontainer. So, any special properties of the given container (such as a DVselection_container) will be lost!

oDVcontainer& get_top_level_container()
return a reference to the top level container

ovoid reset_named_properties()
reset the named properties so that there are no pre-existing names

ovoid set_default_input_string(LCVMstring&)
Set the default_filename. This is a string which is sent to the function which creates the scene graph.

ovoid get_default_input_string(LCVMstring&) const
Get the default_filename. This is a string which is sent to the function which creates the scene graph.

ovoid set_default_output_string(LCVMstring&)
Set the default output string. This is a string returned by the function which creats the scene graph. Note: I am not really sure why there is a set routine for this.

ovoid get_default_output_string(LCVMstring&) const
Get the default output string. This is a string returned by the function which creats the scene graph

ovoid set_export_filename(LCVMstring&)
Set the export_filename. This is the filename which is used by the various export commands.

ovoid get_export_filename(LCVMstring&) const
Get the export_filename. This is the filename which is used by the various export commands.

ovoid set_pick_size(double val)
Set the size of pick region. This is the size of the region in which vertices will be returned by the get_name_stack function. If it is small the user must be very careful about entering coordinates which lay exactly above the vertex (for example with the mouse). If it is large then the coordinates can be farther the actual location of a vertex, but multiple vertices may be selected.

odouble get_pick_size()
Get the size of pick region.

ovoid set_persp_angle(double val)
Set the size of perspective angle. This is a subset of the set_perspective command.

odouble get_persp_angle()
Get the size of perspective angle


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.