openframes_module Module

Modern Fortran interface module to the OpenFrames C interface.

All functions have a prefix indicating what they operate on:

  • ofwin: Acts on the currently active WindowProxy
  • offm: Acts on the specified FrameManager.
  • offrame: Acts on the currently active Reference Frame.
  • of(type of ReferenceFrame): Acts on the currently active ReferenceFrame, assuming that it is of the subtype given by the function name.
  • oftraj: Acts on the currently active Trajectory.
  • oftrajartist: Acts on the currently active TrajectoryArtist.
  • of(type of TrajectoryArtist): Acts on the currently active TrajectoryArtist, assuming that it is of the subtype given by the function name.
  • ofview: Acts on the currently active View.

In addition, some functions produce integer results. These values can be obtained by calling of_getreturnedvalue.

Author

  • Jacob Williams, 9/9/2018 : based on the original OpenFrames module by Ravishankar Mathur. These modifications are released under the same license (Apache 2.0).

Uses


Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: of_zero = 0
integer(kind=c_int), public, parameter :: of_time = 1
integer(kind=c_int), public, parameter :: of_posopt = 2
integer(kind=c_int), public, parameter :: of_attitude = 3
integer(kind=c_int), public, parameter :: of_x = 0

x position or quaternion 1 element

integer(kind=c_int), public, parameter :: of_y = 1

y position or quaternion 2 element

integer(kind=c_int), public, parameter :: of_z = 2

z position or quaternion 3 element

integer(kind=c_int), public, parameter :: of_w = 3

quaternion 4 element (angle)

integer(kind=c_int), public, parameter :: ofma_start = 1

draw start marker

integer(kind=c_int), public, parameter :: ofma_intermediate = 2

draw intermediate markers

integer(kind=c_int), public, parameter :: ofma_end = 4

draw end marker

integer(kind=c_int), public, parameter :: ofma_time = 1
integer(kind=c_int), public, parameter :: ofma_distance = 2

distance increments

integer(kind=c_int), public, parameter :: ofma_data = 3

data point increments

integer(kind=c_int), public, parameter :: offollow_loop = 0
integer(kind=c_int), public, parameter :: offollow_limit = 1
integer(kind=c_int), public, parameter :: offollow_position = 1
integer(kind=c_int), public, parameter :: offollow_attitude = 2
integer(kind=c_int), public, parameter :: of_noaxes = 0

don't use any axes

integer(kind=c_int), public, parameter :: of_xaxis = 1

use x axis

integer(kind=c_int), public, parameter :: of_yaxis = 2

use y axis

integer(kind=c_int), public, parameter :: of_zaxis = 4

use z axis

integer(kind=c_int), public, parameter :: ofview_absolute = 0

global reference frame

integer(kind=c_int), public, parameter :: ofview_relative = 1

body-fixed frame

integer(kind=c_int), public, parameter :: ofview_direct = 0

direct rotation

integer(kind=c_int), public, parameter :: ofview_azel = 1

azimuth-elevation rotation


Subroutines

public subroutine of_initialize()

sets up all internal openframes fortran/c interface variables must be called before other openframes calls

Arguments

None

public subroutine of_cleanup()

cleans up all internal openframes fortran/c interface variables must be called when done using openframes afterwards, the only way to continue using openframes is to first make another call to of_initialize

Read more…

Arguments

None

public subroutine of_getreturnedvalue(val)

Get the return value returned by the most recent API function call.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: val

variable to store the return value from the previous API function call.

public subroutine of_adddatafilepath(newpath)

Add a search path when OSG tries to load data files.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: newpath

full path to be searched when loading a file.

public subroutine ofwin_activate(id)

Set the active WindowProxy

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: id

ID of the window to activate.

public subroutine ofwin_getid(id)

Get ID of the active WindowProxy

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: id

ID of the active window.

public subroutine ofwin_createproxy(x, y, width, height, nrow, ncol, embedded, id, usevr)

Create a new WindowProxy that will manage drawing onto a window. This new WindowProxy will also become the current active one.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: x

X-coordinate (in pixels) of the screen of the upper-right corner of the window.

integer(kind=int32), intent(in) :: y

Y-coordinate (in pixels) of the screen of the upper-right corner of the window.

integer(kind=int32), intent(in) :: width

Width of the window (in pixels).

integer(kind=int32), intent(in) :: height

Height of the window (in pixels).

integer(kind=int32), intent(in) :: nrow

Number of rows in the window grid.

integer(kind=int32), intent(in) :: ncol

Number of columns in the window grid.

logical, intent(in) :: embedded

True if the user wants to provide their own OpenGL window.

integer(kind=int32), intent(in) :: id

ID of this window.

logical, intent(in) :: usevr

Whether to enable rendering in VR (if OpenFrames is built with OpenVR support)

public subroutine ofwin_setwindowname(winname)

Set the window name (title). Only applies to non-embedded windows.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: winname

The new window name.

public subroutine ofwin_setgridsize(nrow, ncol)

Set the number rows and columns in the grid.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nrow

Number of rows in the window grid.

integer(kind=int32), intent(in) :: ncol

Number of columns in the window grid.

public subroutine ofwin_setkeypresscallback(fcn)

Set a callback function to be called on keypress.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(keypresscallback) :: fcn

Callback function to be called on keypress.

public subroutine ofwin_setmousemotioncallback(fcn)

Set a callback function to be called on mouse motion.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(mousemotioncallback) :: fcn

Callback function to be called on mouse motion.

public subroutine ofwin_setbuttonpresscallback(fcn)

Set a callback function to be called on button press.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(buttonpresscallback) :: fcn

Callback function to be called on button press.

public subroutine ofwin_setbuttonreleasecallback(fcn)

Set a callback function to be called on button release.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(buttonreleasecallback) :: fcn

Callback function to be called on button release.

public subroutine ofwin_start()

Start animation.

Read more…

Arguments

None

public subroutine ofwin_stop()

Force animation to stop and wait for the thread to stop.

Read more…

Arguments

None

public subroutine ofwin_signalstop()

Signal animation to stop and return immediately.

Read more…

Arguments

None

public subroutine ofwin_waitforstop()

Wait for user to exit animation.

Read more…

Arguments

None

public subroutine ofwin_pauseanimation(pause)

Pause/unpause the animation.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: pause

True to pause the animation, False to unpause the animation.

public subroutine ofwin_isrunning(state)

Check if the animation is running.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: state

This variable is set to 1 if the animation is running, 0 otherwise.

public subroutine ofwin_setscene(row, col)

Set the scene at the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

public subroutine ofwin_settime(time)

Set the simulation time.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: time

New simulation time.

public subroutine ofwin_gettime(time)

Get the simulation time.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: time

Current simulation time.

public subroutine ofwin_pausetime(pause)

Set whether to pause time.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: pause

Set to 1 to pause the simulation time, 0 to unpause.

public subroutine ofwin_istimepaused(ispaused)

Check if time is paused.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: ispaused

Set to 1 if simulation time is paused, 0 if unpaused.

public subroutine ofwin_settimescale(tscale)

Set the simulation time scale.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: tscale

New simulation time scale.

public subroutine ofwin_gettimescale(tscale)

Get the simulation time scale.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: tscale

Current simulation time scale.

public subroutine ofwin_setlightambient(row, col, r, g, b)

Set the lighting parameters for the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: r

Red component of specified light.

real(kind=real32), intent(in) :: g

Green component of specified light.

real(kind=real32), intent(in) :: b

Blue component of specified light.

public subroutine ofwin_setlightdiffuse(row, col, r, g, b)

Set the lighting parameters for the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: r

Red component of specified light.

real(kind=real32), intent(in) :: g

Green component of specified light.

real(kind=real32), intent(in) :: b

Blue component of specified light.

public subroutine ofwin_setlightspecular(row, col, r, g, b)

Set the lighting parameters for the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: r

Red component of specified light.

real(kind=real32), intent(in) :: g

Green component of specified light.

real(kind=real32), intent(in) :: b

Blue component of specified light.

public subroutine ofwin_setlightposition(row, col, x, y, z, w)

Set the light position for the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: x

X position in eye space.

real(kind=real32), intent(in) :: y

Y position in eye space.

real(kind=real32), intent(in) :: z

Z position in eye space.

real(kind=real32), intent(in) :: w

If 0 then directional (antiparallel to x,y,z direction). If 1 then positional (radiates from x,y,z direction).

public subroutine ofwin_setstereo(row, col, enable, eyeseparation, width, height, distance)

Set the 3D stereo mode for the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

logical, intent(in) :: enable

True to enable 3D stereo mode.

real(kind=real32), intent(in) :: eyeseparation

Set eye separation for 3D stereo.

real(kind=real32), intent(in) :: width

Width of the screen.

real(kind=real32), intent(in) :: height

Height of the screen.

real(kind=real32), intent(in) :: distance

Distance of the screen.

public subroutine ofwin_setbackgroundcolor(row, col, r, g, b)

Set the background color of the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

public subroutine ofwin_setbackgroundtexture(row, col, fname)

Set the background texture of the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

character(len=*), intent(in) :: fname

File containing the background texture.

public subroutine ofwin_setbackgroundstardata(row, col, minmag, maxmag, fname)

Set the background star field of the specified grid position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: minmag

Minimum star magnitude to show.

real(kind=real32), intent(in) :: maxmag

Maximum star magnitude to show.

character(len=*), intent(in) :: fname

File containing the background star field catalog data.

public subroutine ofwin_enablehudtext(row, col, enable)

Enable/disable the HUD text for the specified grid position. Create placeholder HUD text if it does not yet exist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

logical, intent(in) :: enable

Whether to enable or disable the HUD text.

public subroutine ofwin_sethudtextfont(row, col, fname)

Set HUD font. Create placeholder HUD text if it does not yet exist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

character(len=*), intent(in) :: fname

Name of font to use, e.g. "arial.ttf".

public subroutine ofwin_sethudtextparameters(row, col, r, g, b, charsize)

Set HUD color and size. Create placeholder HUD text if it does not yet exist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: r

Red color component.

real(kind=real32), intent(in) :: g

Green color component.

real(kind=real32), intent(in) :: b

Blue color component.

real(kind=real32), intent(in) :: charsize

Character size in pixels.

public subroutine ofwin_sethudtextposition(row, col, x, y, alignment)

Set HUD text position and alignment. Create placeholder HUD text if it does not yet exist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

real(kind=real32), intent(in) :: x

Text origin x position, in range [0,1] from left to right.

real(kind=real32), intent(in) :: y

Text origin y position, in range [0,1] from bottom to top.

integer(kind=int32), intent(in) :: alignment

Alignment location of text origin, see osgText::AlignmentType enum.

public subroutine ofwin_sethudtext(row, col, text)

Set HUD text. Create placeholder HUD text if it does not yet exist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row in the grid to set.

integer(kind=int32), intent(in) :: col

Column in the grid to set.

character(len=*), intent(in) :: text

The new HUD text.

public subroutine ofwin_setdesiredframerate(fps)

Set the desired framerate of the window (frames/second).

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: fps

Desired framerate value in frames per second.

public subroutine ofwin_addview(row, col)

Add a view to the window.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row to add the view to.

integer(kind=int32), intent(in) :: col

Column to add the view to.

public subroutine ofwin_removeview(row, col)

Remove a view from the window.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row to remove the view from.

integer(kind=int32), intent(in) :: col

Column to remove the view from.

public subroutine ofwin_removeallviews(row, col)

Remove all the view(s) from the window.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row to remove the view(s) from.

integer(kind=int32), intent(in) :: col

Column to remove the view(s) from.

public subroutine ofwin_selectview(row, col)

Set the view currently displayed in the window.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: row

Row to set the active view in.

integer(kind=int32), intent(in) :: col

Column to set the active view in.

public subroutine ofwin_setswapbuffersfunction(fcn)

Set a callback function for swapping the front/back buffers.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(swapbuffersfunction) :: fcn

Callback function to be called.

public subroutine ofwin_setmakecurrentfunction(fcn)

Set a callback function for making the OpenGL context current (so it can be drawn on).

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(makecurrentfunction) :: fcn

Callback function to be called.

public subroutine ofwin_setupdatecontextfunction(fcn)

Set a callback function for updating the OpenGL context after qualifying events.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(updatecontextfunction) :: fcn

Callback function to be called.

public subroutine ofwin_resizewindow(x, y, width, height)

Resize the window to a new position and size.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: x

X-coordinate (in pixels) of the screen of the upper-right corner of the window.

integer(kind=int32), intent(in) :: y

Y-coordinate (in pixels) of the screen of the upper-right corner of the window.

integer(kind=int32), intent(in) :: width

Width of the window (in pixels).

integer(kind=int32), intent(in) :: height

Height of the window (in pixels).

public subroutine ofwin_keypress(key)

Create a key-pressed event.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: key

Key pressed (see osg::GUIEventAdapter::KeySymbol enum).

public subroutine ofwin_keyrelease(key)

Create a key released event.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: key

Key released (see osg::GUIEventAdapter::KeySymbol enum).

public subroutine ofwin_buttonpress(x, y, button)

Create a mouse button pressed event.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: x

X-coordinate of the mouse in the window.

real(kind=real32), intent(in) :: y

Y-coordinate of the mouse in the window.

integer(kind=int32), intent(in) :: button

Mouse button pressed. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.

public subroutine ofwin_buttonrelease(x, y, button)

Create a mouse button released event.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: x

X-coordinate of the mouse in the window.

real(kind=real32), intent(in) :: y

Y-coordinate of the mouse in the window.

integer(kind=int32), intent(in) :: button

Mouse button released. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.

public subroutine ofwin_mousemotion(x, y)

Create a mouse-moved event.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: x

X-coordinate of the mouse in the window.

real(kind=real32), intent(in) :: y

Y-coordinate of the mouse in the window.

public subroutine ofwin_capturewindow()

Capture the next rendered frame.

Read more…

Arguments

None

public subroutine ofwin_setwindowcapturefile(fname, fext)

Set the file name and type that will be used for window captures.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File name (without extension).

character(len=*), intent(in) :: fext

File extension (determines image type).

public subroutine ofwin_setwindowcapturekey(key)

Set the key that activates a window capture.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: key

Integer representation of key char. Set to 0 (zero) to disable key-based window capture.

public subroutine offm_activate(id)

Set the currently active FrameManager.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: id

ID of the frame manager to activate.

public subroutine offm_create(id)

Create a new FrameManager with the given ID.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: id

ID of the frame manager to create.

public subroutine offm_setframe()

Assign a ReferenceFrame to the FrameManager.

Read more…

Arguments

None

public subroutine offm_lock()

Lock the current FrameManager.

Read more…

Arguments

None

public subroutine offm_unlock()

Unlock the current FrameManager.

Read more…

Arguments

None

public subroutine offrame_activate(name)

Set the currently active reference frame.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the frame to activate.

public subroutine offrame_create(name)

Create a new ReferenceFrame with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the frame to create.

public subroutine offrame_setcolor(r, g, b, a)

Set the color of the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

real(kind=real32), intent(in) :: a

Alpha (transparancy) component [0-1].

public subroutine offrame_addchild(name)

* Add a child frame to the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the frame to add as a child to the active frame.

public subroutine offrame_removechild(name)

Remove a child frame from the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the child frame to remove from the active frame.

public subroutine offrame_removeallchildren()

Remove all child frames from the current frame.

Read more…

Arguments

None

public subroutine offrame_getnumchildren(numchildren)

Get the number of child frames in the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(out) :: numchildren

variable to store the number of child frames to.

public subroutine offrame_setposition(x, y, z)

Set the position of the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X position.

real(kind=real64), intent(in) :: y

Y position.

real(kind=real64), intent(in) :: z

Z position.

public subroutine offrame_getposition(x, y, z)

Get the position of the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: x

Returned X position.

real(kind=real64), intent(out) :: y

Returned Y position.

real(kind=real64), intent(out) :: z

Returned Z position.

public subroutine offrame_setattitude(x, y, z, angle)

Set the attitude of the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X component of the rotation quaternion.

real(kind=real64), intent(in) :: y

Y component of the rotation quaternion.

real(kind=real64), intent(in) :: z

Z component of the rotation quaternion.

real(kind=real64), intent(in) :: angle

Angle component of the rotation quaternion.

public subroutine offrame_getattitude(x, y, z, angle)

Get the attitude of the current frame.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: x

Returned X component of the rotation quaternion.

real(kind=real64), intent(out) :: y

Returned Y component of the rotation quaternion.

real(kind=real64), intent(out) :: z

Returned Z component of the rotation quaternion.

real(kind=real64), intent(out) :: angle

Returned angle component of the rotation quaternion.

public subroutine offrame_showaxes(axes)

Toggle which axis components are displayed.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: axes

Axis components to show specified by OpenFrames::ReferenceFrame::AxesType, others will be hidden.

public subroutine offrame_shownamelabel(namelabel)

Toggle display of the name label of the frame.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: namelabel

True to display the label, false to hide it.

public subroutine offrame_showaxeslabels(labels)

Toggle which axis labels are displayed.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: labels

Axis labels to show specified by OpenFrames::ReferenceFrame::AxesType, others will be hidden.

public subroutine offrame_setnamelabel(name)

Change the name label for the current ReferenceFrame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the label.

public subroutine offrame_setaxeslabels(xlabel, ylabel, zlabel)

Change the axes labels for the current ReferenceFrame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: xlabel

Name of the x-axis label.

character(len=*), intent(in) :: ylabel

Name of the y-axis label.

character(len=*), intent(in) :: zlabel

Name of the z-axis label.

public subroutine offrame_setlabelfont(font)

Set the label font for the current ReferenceFrame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: font

Font name, either with absolute path or standalone. Must include extension.

public subroutine offrame_setlabelsize(size)

Set the label size for the current ReferenceFrame.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: size

Label size, used as maximum size for axes labels

public subroutine offrame_movexaxis(pos, length, headratio, bodyradius, headradius)

Reposition and resize the x component of the coordinate axis.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(3) :: pos

Position array of the origin of the x-axis component.

real(kind=real64), intent(in) :: length

Length of the x-axis arrow.

real(kind=real64), intent(in) :: headratio

Ratio of the arrow head to body. Set to 0.0 to use default.

real(kind=real64), intent(in) :: bodyradius

Radius of the body of the arrow. Set to 0.0 to use default.

real(kind=real64), intent(in) :: headradius

Radius of the head of the arrow. Set to 0.0 to use default.

public subroutine offrame_moveyaxis(pos, length, headratio, bodyradius, headradius)

Reposition and resize the y component of the coordinate axis.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(3) :: pos

Position array of the origin of the y-axis component.

real(kind=real64), intent(in) :: length

Length of the y-axis arrow.

real(kind=real64), intent(in) :: headratio

Ratio of the arrow head to body. Set to 0.0 to use default.

real(kind=real64), intent(in) :: bodyradius

Radius of the body of the arrow. Set to 0.0 to use default.

real(kind=real64), intent(in) :: headradius

Radius of the head of the arrow. Set to 0.0 to use default.

public subroutine offrame_movezaxis(pos, length, headratio, bodyradius, headradius)

Reposition and resize the z component of the coordinate axis.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(3) :: pos

Position array of the origin of the z-axis component.

real(kind=real64), intent(in) :: length

Length of the z-axis arrow.

real(kind=real64), intent(in) :: headratio

Ratio of the arrow head to body. Set to 0.0 to use default.

real(kind=real64), intent(in) :: bodyradius

Radius of the body of the arrow. Set to 0.0 to use default.

real(kind=real64), intent(in) :: headradius

Radius of the head of the arrow. Set to 0.0 to use default.

public subroutine offrame_setlightsourceenabled(enabled)

Enable and manage per-frame lighting.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: enabled

Whether to enable or disable lighting.

public subroutine offrame_getlightsourceenabled(enabled)

Enable and manage per-frame lighting.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: enabled

Whether to enable or disable lighting.

public subroutine offrame_setlightambient(r, g, b)

Enable and manage per-frame lighting.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of specified light type.

real(kind=real32), intent(in) :: g

Green component of specified light type.

real(kind=real32), intent(in) :: b

Blue component of specified light type.

public subroutine offrame_setlightdiffuse(r, g, b)

Enable and manage per-frame lighting.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of specified light type.

real(kind=real32), intent(in) :: g

Green component of specified light type.

real(kind=real32), intent(in) :: b

Blue component of specified light type.

public subroutine offrame_setlightspecular(r, g, b)

Enable and manage per-frame lighting.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of specified light type.

real(kind=real32), intent(in) :: g

Green component of specified light type.

real(kind=real32), intent(in) :: b

Blue component of specified light type.

public subroutine offrame_followtrajectory(name)

Have this frame follow the specified trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the trajectory to follow.

public subroutine offrame_followtype(data, mode)

Follow the trajectory's position, attitude, or both, and set the follow mode.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: data

Set whether to follow position and/or velocity (see OpenFrames::TrajectoryFollower::FollowData).

integer(kind=int32), intent(in) :: mode

Set the follow mode to loop repeatedly or to limit to the times added to the trajectory (see OpenFrames::TrajectoryFollower::FollowMode).

public subroutine offrame_followposition(src, element, opt, scale)

Set the elements to follow position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in), dimension(3) :: src

Set data source for each axis (see OpenFrames::Trajectory::SourceType).

integer(kind=int32), intent(in), dimension(3) :: element

Set which element to follow.

integer(kind=int32), intent(in), dimension(3) :: opt

Set which optional to follow.

real(kind=real64), intent(in), dimension(3) :: scale

Set the scale for each axis.

public subroutine offrame_printframestring()

Print (to std::out) a formatted string of the current ReferenceFrame's descendant hierarchy.

Read more…

Arguments

None

public subroutine ofsphere_create(name)

Create a new Sphere with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the sphere to create.

public subroutine ofsphere_setradius(radius)

Set the radius of the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: radius

Radius of the sphere.

public subroutine ofsphere_settexturemap(fname)

Set the image file used as the texture map for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

public subroutine ofsphere_setnighttexturemap(fname)

Set the image file used as the night texture map for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the night texture map.

public subroutine ofsphere_setautolod(lod)

Enable/disable auto level of detailing for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: lod

True to enable auto level of detailing, false to disable.

public subroutine ofsphere_setsphereposition(x, y, z)

Set position of the sphere (within its own reference frame).

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X position.

real(kind=real64), intent(in) :: y

Y position.

real(kind=real64), intent(in) :: z

Z position.

public subroutine ofsphere_setsphereattitude(rx, ry, rz, angle)

Set attitude of the sphere (within its own reference frame).

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: rx

X component of the rotation quaternion.

real(kind=real64), intent(in) :: ry

Y component of the rotation quaternion.

real(kind=real64), intent(in) :: rz

Z component of the rotation quaternion.

real(kind=real64), intent(in) :: angle

Angle component of the rotation quaternion.

public subroutine ofsphere_setspherescale(sx, sy, sz)

Set the scale of the sphere (to turn sphere into ellipsoid). This applies to the current active Sphere, and can be used to turn a Sphere into an ellipsoid.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: sx

X scale.

real(kind=real64), intent(in) :: sy

Y scale.

real(kind=real64), intent(in) :: sz

Z scale.

public subroutine ofsphere_setmaterialambient(r, g, b)

Set material parameters for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of reflectivity for given component.

real(kind=real32), intent(in) :: g

Green component of reflectivity for given component.

real(kind=real32), intent(in) :: b

Blue component of reflectivity for given component.

public subroutine ofsphere_setmaterialdiffuse(r, g, b)

Set material parameters for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of reflectivity for given component.

real(kind=real32), intent(in) :: g

Green component of reflectivity for given component.

real(kind=real32), intent(in) :: b

Blue component of reflectivity for given component.

public subroutine ofsphere_setmaterialspecular(r, g, b)

Set material parameters for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of reflectivity for given component.

real(kind=real32), intent(in) :: g

Green component of reflectivity for given component.

real(kind=real32), intent(in) :: b

Blue component of reflectivity for given component.

public subroutine ofsphere_setmaterialemission(r, g, b)

Set material parameters for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red component of reflectivity for given component.

real(kind=real32), intent(in) :: g

Green component of reflectivity for given component.

real(kind=real32), intent(in) :: b

Blue component of reflectivity for given component.

public subroutine ofsphere_setmaterialshininess(shininess)

Set material parameters for the sphere.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: shininess

Specular shininess for given component.

public subroutine ofmodel_create(name)

Create a new Model with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

public subroutine ofmodel_setmodel(fname)

Set the 3D model to be displayed.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the 3D model.

public subroutine ofmodel_setmodelposition(x, y, z)

Set the position wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X position.

real(kind=real64), intent(in) :: y

Y position.

real(kind=real64), intent(in) :: z

Z position.

public subroutine ofmodel_getmodelposition(x, y, z)

Get the position wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: x

X position.

real(kind=real64), intent(out) :: y

Y position.

real(kind=real64), intent(out) :: z

Z position.

public subroutine ofmodel_setmodelscale(x, y, z)

Set the scale wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

Scale along X axis.

real(kind=real64), intent(in) :: y

Scale along Y axis.

real(kind=real64), intent(in) :: z

Scale along Z axis.

public subroutine ofmodel_getmodelscale(x, y, z)

Get the scale wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: x

Returned scale along X axis.

real(kind=real64), intent(out) :: y

Returned scale along Y axis.

real(kind=real64), intent(out) :: z

Returned scale along Z axis.

public subroutine ofmodel_setmodelpivot(x, y, z)

Set the model pivot point wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X position of pivot point.

real(kind=real64), intent(in) :: y

Y position of pivot point.

real(kind=real64), intent(in) :: z

Z position of pivot point.

public subroutine ofmodel_getmodelpivot(x, y, z)

Get the position wrt the local origin of the current model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: x

Returned X position of pivot point.

real(kind=real64), intent(out) :: y

Returned Y position of pivot point.

real(kind=real64), intent(out) :: z

Returned Z position of pivot point.

public subroutine ofmodel_getmodelsize(size)

Get the size of the model.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out) :: size

Returned size of the model.

public subroutine ofdrawtraj_create(name)

Create a new DrawableTrajectory with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the drawable trajectory to create.

public subroutine ofdrawtraj_addartist(name)

Allow specified TrajectoryArtist to draw using this DrawableTrajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the trajectory artist to draw this DrawableTrajectory.

public subroutine ofdrawtraj_removeartist(name)

Remove specified artist from the current DrawableTrajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the trajectory artist to be removed from this DrawableTrajectory.

public subroutine ofdrawtraj_removeallartists()

Remove all artists from the current DrawableTrajectory.

Read more…

Arguments

None

public subroutine ofcoordaxes_create(name)

Create a new CoordinateAxes with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the coordinate axes to create.

public subroutine ofcoordaxes_setaxislength(len)

Sets the length of the axis.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: len

Axis length.

public subroutine ofcoordaxes_setaxiswidth(width)

Sets the width of the axes.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: width

Axis width.

public subroutine ofcoordaxes_setdrawaxes(axes)

Sets which axis to draw.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: axes

Axis components to show specified by OpenFrames::ReferenceFrame::AxesType, others will be hidden.

public subroutine ofcoordaxes_settickspacing(major, minor)

Sets the major and minor tick spacing.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: major

Major tick spacing.

real(kind=real64), intent(in) :: minor

Major tick spacing.

public subroutine ofcoordaxes_setticksize(major, minor)

Sets the major and minor tick size.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: major

Major tick size.

integer(kind=int32), intent(in) :: minor

Major tick size.

public subroutine ofcoordaxes_settickimage(fname)

Sets an image to be used for the tick, overriding any existing shader.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the image.

public subroutine ofcoordaxes_settickshader(fname)

Set GLSL fragment shader used to draw tick mark, overriding any existing image.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the shader source.

public subroutine oflatlongrid_create(name)

Create a new LatLonGrid with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

public subroutine oflatlongrid_setparameters(radiusx, radiusy, radiusz, latspace, lonspace)

Sets the parameters of the LatLonGrid.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: radiusx

Radius of the grid in the X direction.

real(kind=real64), intent(in) :: radiusy

Radius of the grid in the Y direction.

real(kind=real64), intent(in) :: radiusz

Radius of the grid in the Z direction.

real(kind=real64), intent(in) :: latspace

Spacing between latitude grid lines in radians.

real(kind=real64), intent(in) :: lonspace

Spacing between longitude grid lines in radians.

public subroutine ofradialplane_create(name)

Create a new RadialPlane with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the radial plane to create.

public subroutine ofradialplane_setparameters(radius, radspace, lonspace)

Sets the parameters of the RadialPlane.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: radius

Radius of the radial plane.

real(kind=real64), intent(in) :: radspace

Spacing between radial grid lines in radians.

real(kind=real64), intent(in) :: lonspace

Spacing between longitude grid lines in radians.

public subroutine ofradialplane_setplanecolor(r, g, b, a)

Set the plane color of the current radial plane.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

real(kind=real32), intent(in) :: a

Alpha (transparancy) component [0-1].

public subroutine ofradialplane_setlinecolor(r, g, b, a)

Set the line color of the current radial plane.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

real(kind=real32), intent(in) :: a

Alpha (transparancy) component [0-1].

public subroutine oftraj_activate(name)

Set the currently-active trajectory.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the Trajectory to activate.

public subroutine oftraj_create(name, dof, numopt)

Create a new Trajectory with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the trajectory to create.

integer(kind=int32), intent(in) :: dof

Number of degrees of freedom this trajectory has.

integer(kind=int32), intent(in) :: numopt

Number of optionals this trajectory has.

public subroutine oftraj_setnumoptionals(nopt)

Change the number of optionals for the currently active Trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nopt

Number of optional coordinates to set.

public subroutine oftraj_setdof(dof)

Change the degrees of freedom for the currently-active Trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: dof

Desired number of degrees of freedom.

public subroutine oftraj_addtime(t)

Add a time to the current trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: t

Time.

public subroutine oftraj_addposition(x, y, z)

Add a position to the current trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X position.

real(kind=real64), intent(in) :: y

Y position.

real(kind=real64), intent(in) :: z

Z position.

public subroutine oftraj_addpositionvec(pos)

Add a position to the current trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: pos

Position array to add (length 3).

public subroutine oftraj_addattitude(x, y, z, w)

Add an attitude to the current trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

X component of the rotation quaternion.

real(kind=real64), intent(in) :: y

Y component of the rotation quaternion.

real(kind=real64), intent(in) :: z

Z component of the rotation quaternion.

real(kind=real64), intent(in) :: w

Angle component of the rotation quaternion.

public subroutine oftraj_addattitudevec(att)

Set the attitude of the current trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(4) :: att

Quaternion array to add (length 4). The vector component of the quaternion precedes the scalar component.

public subroutine oftraj_setoptional(index, x, y, z)

Set the optional with the given index, for the most recently-added position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: index

index of optional to add values to.

real(kind=real64), intent(in) :: x

X component of optional.

real(kind=real64), intent(in) :: y

Y component of optional.

real(kind=real64), intent(in) :: z

Z component of optional.

public subroutine oftraj_setoptionalvec(index, opt)

Set the optional with the given index, for the most recently added position.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: index

index of optional to add values to.

real(kind=real64), intent(in), dimension(:) :: opt

Array of values to add to optional (length 3).

public subroutine oftraj_clear()

Clear all points from the currently active Trajectory.

Read more…

Arguments

None

public subroutine oftraj_informartists()

Inform drawable trajectories to redraw this trajectory.

Read more…

Arguments

None

public subroutine oftraj_autoinformartists(autoinform)

Inform drawable trajecotries to redraw this trajectory.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: autoinform

True to auto-inform linked artists when data is added to this trajectory. False to not inform artists unless oftraj_autoinformartists is called.

public subroutine oftrajartist_activate(name)

Set the currently active trajectory artist.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the TrajectoryArtist to activate.

public subroutine oftrajartist_settrajectory()

Set the currently-active trajectory artist.

Arguments

None

public subroutine ofcurveartist_create(name)

Create a new CurveArtist with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

me of the curve artist to create.

public subroutine ofcurveartist_setxdata(src, element, opt, scale)

Set the data used for X coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofcurveartist_setydata(src, element, opt, scale)

Set the data used for Y coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofcurveartist_setzdata(src, element, opt, scale)

Set the data used for Z coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofcurveartist_setcolor(r, g, b)

Set the color of the current curve artist.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

public subroutine ofcurveartist_setwidth(width)

Set the width of the current curve artist.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: width

Width of the line.

public subroutine ofcurveartist_setpattern(factor, pattern)

Set the line pattern of the current curve artist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: factor

Specifies scaling factor used to draw the pattern.

integer(kind=int16), intent(in) :: pattern

16-bit integer which specifies the line pattern.

public subroutine ofsegmentartist_create(name)

Create a new SegmentArtist with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

public subroutine ofsegmentartist_setstartxdata(src, element, opt, scale)

Set the data used for starting X coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setstartydata(src, element, opt, scale)

Set the data used for starting Y coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setstartzdata(src, element, opt, scale)

Set the data used for starting Z coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setendxdata(src, element, opt, scale)

Set the data used for ending X coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setendydata(src, element, opt, scale)

Set the data used for ending Y coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setendzdata(src, element, opt, scale)

Set the data used for ending Z coordinate of each segment.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofsegmentartist_setstride(stride)

Set the offset between drawn points.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: stride

Minimum offset between sucessive drawn points.

public subroutine ofsegmentartist_setcolor(r, g, b)

Set the color of the current segment artist.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

public subroutine ofsegmentartist_setwidth(width)

Set the width of the current segment artist.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(in) :: width

Width of the line.

public subroutine ofsegmentartist_setpattern(factor, pattern)

Set the line pattern of the current segment artist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: factor

Specifies scaling factor used to draw the pattern.

integer(kind=int16), intent(in) :: pattern

16-bit integer which specifies the line pattern.

public subroutine ofmarkerartist_create(name)

Create a new MarkerArtist with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

public subroutine ofmarkerartist_setxdata(src, element, opt, scale)

Set the data used for X coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofmarkerartist_setydata(src, element, opt, scale)

Set the data used for Y coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofmarkerartist_setzdata(src, element, opt, scale)

Set the data used for Z coordinates of each point.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: src

Type of data source to draw (see OpenFrames::Trajectory::SourceType enum).

integer(kind=int32), intent(in) :: element

Array index of the data indicated in src to plot.

integer(kind=int32), intent(in) :: opt

Indicate if a position or optional is plotted. 0 is for position, other values indicate the index of the optional to use. Only used if src = POSOPT.

real(kind=real64), intent(in) :: scale

Scale factor to apply to drawn trajectory data.

public subroutine ofmarkerartist_setmarkers(markers)

Define which markers should be plotted for the current marker artist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: markers

Indicates which data points should be drawn as markers (see: OpenFrames::MarkerArtist::DrawnMarkers enum).

public subroutine ofmarkerartist_setmarkercolor(markers, r, g, b)

Set the color of the current marker artist.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: markers

The markers whose color should be set (see: OpenFrames::MarkerArtist::DrawnMarkers enum).

real(kind=real32), intent(in) :: r

Red color component [0-1].

real(kind=real32), intent(in) :: g

Green color component [0-1].

real(kind=real32), intent(in) :: b

Blue color component [0-1].

public subroutine ofmarkerartist_setmarkerimage(fname)

Set image used as marker, overriding any existing shader.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the image.

public subroutine ofmarkerartist_setmarkershader(fname)

Set GLSL fragment shader used to draw marker, overriding any existing image.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname

File containing the shader source.

public subroutine ofmarkerartist_setintermediatetype(type)

Specify which type of intermediate markers should be drawn.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: type

Indicates how intermediate marker spacing is determined (see: OpenFrames::MarkerArtist::IntermediateType enum).

public subroutine ofmarkerartist_setintermediatespacing(spacing)

Specify the spacing used for intermediate markers.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: spacing

Set spacing for intermediate markers.

public subroutine ofmarkerartist_setintermediatedirection(direction)

Specify the drawing direction (from start or end) of intermediate markers.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: direction

Set intermediate marker direction (see: OpenFrames::MarkerArtist::DrawnMarkers enum).

public subroutine ofmarkerartist_setmarkersize(size)

Specify the marker size in pixels.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: size

The marker size.

public subroutine ofmarkerartist_setautoattenuate(autoattenuate)

Specify whether marker size should be automatically attenuated.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: autoattenuate

True to automatically attenuate marker size, False otherwise.

public subroutine ofview_activate(name)

Set the currently active view.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the View to activate.

public subroutine ofview_create(name)

Create a new View with the given name.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Name of the view to create.

public subroutine ofview_setorthographic(left, right, bottom, top)

Set an orthographic projection with the given bounds.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: left

Left coordinate bound of orthographic projection.

real(kind=real64), intent(in) :: right

Right coordinate bound of orthographic projection.

real(kind=real64), intent(in) :: bottom

Bottom coordinate bound of orthographic projection.

real(kind=real64), intent(in) :: top

Top coordinate bound of orthographic projection.

public subroutine ofview_setperspective(fov, ratio)

Set the current view to use a symmetric perspective projection.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: fov

Vertical field of view (in degrees).

real(kind=real64), intent(in) :: ratio

x/y aspect ratio.

public subroutine ofview_setviewframe(root, frame)

Tell current view to follow the specified ReferenceFrame.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: root

Name of the root of the ReferenceFrame heirarchy.

character(len=*), intent(in) :: frame

ReferenceFrame to follow with this view.

public subroutine ofview_setviewbetweenframes(root, srcframe, dstframe, frameType, rotationType)

View from one frame towards another, using a specified frame type and rotation type.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: root

Name of the root of the ReferenceFrame heirarchy. Note: Must contain 'srcframe' and 'dstframe'.

character(len=*), intent(in) :: srcframe

ReferenceFrame this view will look from.

character(len=*), intent(in) :: dstframe

ReferenceFrame this view will look towards.

integer(kind=int32), intent(in) :: frameType

Frame type to use (see: OpenFrames::View::ViewFrameType enum)

integer(kind=int32), intent(in) :: rotationType

Rotation type to use when following dstframe (see: OpenFrames::View::ViewRotationType enum).

public subroutine ofview_setdefaultviewdistance(distance)

Set the default view distance.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: distance

Distance the camera is from the terget point of the reference frame. A value <= 0.0 means the distance should be auto-computed.

public subroutine ofview_gettrackball(eye, center, up)

Get the trackball's view matrix.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(out), dimension(3) :: eye

3-vector eye position.

real(kind=real64), intent(out), dimension(3) :: center

3-vector look-at position.

real(kind=real64), intent(out), dimension(3) :: up

3-vector up vector.

public subroutine ofview_settrackball(eye, center, up)

Set the trackball view matrix.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(3) :: eye

3-vector eye position.

real(kind=real64), intent(in), dimension(3) :: center

3-vector look-at position.

real(kind=real64), intent(in), dimension(3) :: up

3-vector up vector.

public subroutine ofview_isvalid(valid)

Check if the view frame for the current View is valid.

Read more…

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: valid

Returned value if the view is valid.

public subroutine ofview_reset()

Reset the view to its default state.

Read more…

Arguments

None