Privacy
An open-source, flexible 3D physical simulation framework
mars::graphics::GuiHelper Class Reference

#include <gui_helper_functions.h>

Public Member Functions

 GuiHelper (interfaces::GraphicsManagerInterface *gi)
 
mars::utils::Vector getExtend (osg::Node *oGroup)
 
void initGraphics ()
 
virtual std::vector< double > getMeshSize (const std::string &filename)
 
virtual void getPhysicsFromMesh (mars::interfaces::NodeData *node)
 
virtual void readPixelData (mars::interfaces::terrainStruct *terrain)
 
- Public Member Functions inherited from mars::interfaces::LoadMeshInterface
virtual ~LoadMeshInterface ()
 
- Public Member Functions inherited from mars::interfaces::LoadHeightmapInterface
virtual ~LoadHeightmapInterface ()
 

Static Public Member Functions

static void clearStates (osg::ref_ptr< osg::Node > node)
 
static mars::interfaces::snmesh convertOsgNodeToSnMesh (osg::Node *node, double scaleX, double scaleY, double scaleZ, double pivotX, double pivotY, double pivotZ)
 converts the mesh of an osgNode to the snmesh struct More...
 
static osg::ref_ptr< osg::Node > readNodeFromFile (std::string fileName)
 
static osg::ref_ptr< osg::Node > readBobjFromFile (const std::string &filename)
 
static osg::ref_ptr< osg::Texture2D > loadTexture (std::string filename)
 
static osg::ref_ptr< osg::Image > loadImage (std::string filename)
 

Private Member Functions

void getPhysicsFromNode (mars::interfaces::NodeData *node, osg::ref_ptr< osg::Node > completeNode)
 

Private Attributes

osg::Geometry * my_geo
 
osg::ref_ptr< osg::Vec3Array > my_v3
 
interfaces::GraphicsManagerInterfacegi
 
mars::interfaces::GraphicData gs
 

Static Private Attributes

static std::vector< nodeFileStructnodeFiles
 
static std::vector< textureFileStructtextureFiles
 
static std::vector< imageFileStructimageFiles
 

Detailed Description

Definition at line 99 of file gui_helper_functions.h.

Constructor & Destructor Documentation

◆ GuiHelper()

mars::graphics::GuiHelper::GuiHelper ( interfaces::GraphicsManagerInterface gi)

Definition at line 135 of file gui_helper_functions.cpp.

Member Function Documentation

◆ clearStates()

void mars::graphics::GuiHelper::clearStates ( osg::ref_ptr< osg::Node >  node)
static

Definition at line 149 of file gui_helper_functions.cpp.

◆ convertOsgNodeToSnMesh()

snmesh mars::graphics::GuiHelper::convertOsgNodeToSnMesh ( osg::Node *  node,
double  scaleX,
double  scaleY,
double  scaleZ,
double  pivotX,
double  pivotY,
double  pivotZ 
)
static

converts the mesh of an osgNode to the snmesh struct

Definition at line 163 of file gui_helper_functions.cpp.

◆ getExtend()

Vector mars::graphics::GuiHelper::getExtend ( osg::Node *  oGroup)

Definition at line 232 of file gui_helper_functions.cpp.

◆ getMeshSize()

std::vector< double > mars::graphics::GuiHelper::getMeshSize ( const std::string &  filename)
virtual

Implements mars::interfaces::LoadMeshInterface.

Definition at line 248 of file gui_helper_functions.cpp.

◆ getPhysicsFromMesh()

void mars::graphics::GuiHelper::getPhysicsFromMesh ( mars::interfaces::NodeData node)
virtual

Implements mars::interfaces::LoadMeshInterface.

Definition at line 263 of file gui_helper_functions.cpp.

◆ getPhysicsFromNode()

void mars::graphics::GuiHelper::getPhysicsFromNode ( mars::interfaces::NodeData node,
osg::ref_ptr< osg::Node >  completeNode 
)
private

Definition at line 272 of file gui_helper_functions.cpp.

◆ initGraphics()

void mars::graphics::GuiHelper::initGraphics ( )

◆ loadImage()

osg::ref_ptr< osg::Image > mars::graphics::GuiHelper::loadImage ( std::string  filename)
static

Definition at line 661 of file gui_helper_functions.cpp.

◆ loadTexture()

osg::ref_ptr< osg::Texture2D > mars::graphics::GuiHelper::loadTexture ( std::string  filename)
static

Definition at line 637 of file gui_helper_functions.cpp.

◆ readBobjFromFile()

osg::ref_ptr< osg::Node > mars::graphics::GuiHelper::readBobjFromFile ( const std::string &  filename)
static

Definition at line 393 of file gui_helper_functions.cpp.

◆ readNodeFromFile()

osg::ref_ptr< osg::Node > mars::graphics::GuiHelper::readNodeFromFile ( std::string  fileName)
static

Definition at line 378 of file gui_helper_functions.cpp.

◆ readPixelData()

void mars::graphics::GuiHelper::readPixelData ( mars::interfaces::terrainStruct terrain)
virtual

Member Data Documentation

◆ gi

interfaces::GraphicsManagerInterface* mars::graphics::GuiHelper::gi
private

Definition at line 132 of file gui_helper_functions.h.

◆ gs

mars::interfaces::GraphicData mars::graphics::GuiHelper::gs
private

Definition at line 135 of file gui_helper_functions.h.

◆ imageFiles

vector< imageFileStruct > mars::graphics::GuiHelper::imageFiles
staticprivate

Definition at line 140 of file gui_helper_functions.h.

◆ my_geo

osg::Geometry* mars::graphics::GuiHelper::my_geo
private

Definition at line 130 of file gui_helper_functions.h.

◆ my_v3

osg::ref_ptr<osg::Vec3Array> mars::graphics::GuiHelper::my_v3
private

Definition at line 131 of file gui_helper_functions.h.

◆ nodeFiles

vector< nodeFileStruct > mars::graphics::GuiHelper::nodeFiles
staticprivate

Definition at line 136 of file gui_helper_functions.h.

◆ textureFiles

vector< textureFileStruct > mars::graphics::GuiHelper::textureFiles
staticprivate

Definition at line 138 of file gui_helper_functions.h.


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