SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
SRInterface Class Reference

#include <SRInterface.h>

Public Member Functions

 SRInterface (std::shared_ptr< spire::Context > context, const std::vector< std::string > &shaderDirs, spire::Interface::LogFunction logFP=spire::Interface::LogFunction())
 
 ~SRInterface ()
 
void eventResize (size_t width, size_t height)
 
void inputMouseWheel (int32_t delta)
 
size_t getScreenWidthPixels () const
 Screen width retrieval. Dimensions are pixels. More...
 
size_t getScreenHeightPixels () const
 
void readAsset (const std::string &filename, std::vector< uint8_t > vbo, std::vector< uint8_t > ibo)
 
void removeAllGeomObjects ()
 Remove all SCIRun 5 objects. More...
 
void gcInvalidObjects (const std::vector< std::string > &validObjects)
 Garbage collect all invalid objects not given in the valid objects vector. More...
 
void handleGeomObject (boost::shared_ptr< Core::Datatypes::GeometryObject > object)
 Handles a new geometry object. More...
 
void doFrame ()
 Performs a frame. More...
 
void setMouseMode (MouseMode mode)
 Sets the mouse interaction mode. More...
 
MouseMode getMouseMode ()
 Retrieves mouse interaction mode. More...
 
void doAutoView ()
 Performs an autoview. More...
 
enum  MouseButton { MOUSE_NONE, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE }
 
enum  MouseMode { MOUSE_OLDSCIRUN, MOUSE_NEWSCIRUN }
 
void inputMouseDown (const glm::ivec2 &pos, MouseButton btn)
 
void inputMouseMove (const glm::ivec2 &pos, MouseButton btn)
 
void inputMouseUp (const glm::ivec2 &pos, MouseButton btn)
 

Member Enumeration Documentation

Todo:
Specify what buttons are pressed.
Enumerator
MOUSE_NONE 
MOUSE_LEFT 
MOUSE_RIGHT 
MOUSE_MIDDLE 
enum MouseMode
Enumerator
MOUSE_OLDSCIRUN 
MOUSE_NEWSCIRUN 

Constructor & Destructor Documentation

SRInterface ( std::shared_ptr< spire::Context >  context,
const std::vector< std::string > &  shaderDirs,
spire::Interface::LogFunction  logFP = spire::Interface::LogFunction() 
)

Member Function Documentation

void doAutoView ( )

Performs an autoview.

void doFrame ( )

Performs a frame.

void eventResize ( size_t  width,
size_t  height 
)

Call this whenever the window is resized. This will modify the viewport appropriately.

Todo:
Ensure perspective matrix is rebuilt with correct aspect ratio.
void gcInvalidObjects ( const std::vector< std::string > &  validObjects)

Garbage collect all invalid objects not given in the valid objects vector.

SRInterface::MouseMode getMouseMode ( )

Retrieves mouse interaction mode.

size_t getScreenHeightPixels ( ) const
inline
size_t getScreenWidthPixels ( ) const
inline

Screen width retrieval. Dimensions are pixels.

Todo:
Selecting objects...
Todo:
Obtaining data from mesh objects in order to spatially partition them and provide quick object feedback.
void handleGeomObject ( boost::shared_ptr< Core::Datatypes::GeometryObject object)

Handles a new geometry object.

void inputMouseDown ( const glm::ivec2 &  pos,
MouseButton  btn 
)
void inputMouseMove ( const glm::ivec2 &  pos,
MouseButton  btn 
)
void inputMouseUp ( const glm::ivec2 &  pos,
MouseButton  btn 
)
void inputMouseWheel ( int32_t  delta)
void readAsset ( const std::string &  filename,
std::vector< uint8_t >  vbo,
std::vector< uint8_t >  ibo 
)

Reads an asset file and returns the associated vertex buffer and index buffer.

void removeAllGeomObjects ( )

Remove all SCIRun 5 objects.

void setMouseMode ( MouseMode  mode)

Sets the mouse interaction mode.


The documentation for this class was generated from the following files: