Privacy
An open-source, flexible 3D physical simulation framework
mars::interfaces Namespace Reference

Classes

class  BaseArraySensor
 
class  BaseCameraSensor
 
class  BaseConfig
 
class  BaseGridIntersectionSensor
 
class  BaseNodeSensor
 
class  BasePolarIntersectionSensor
 
class  BaseSensor
 
struct  camera_sensor_config
 
struct  cameraStruct
 this struct seems to be used to get information about a camera which can be accessed through the sensor interface. More...
 
struct  contact_params
 
class  ControlCenter
 The declaration of the ControlCenter. More...
 
class  ControllerData
 
class  ControllerInterface
 The Interface to load controller dynamically into the simulation. More...
 
class  ControllerManagerInterface
 "ControllerManagerInterface" declares the interfaces for all controller operations that are used for the communication between the simulation modules. More...
 
struct  core_objects_exchange
 core_objects_exchange is a struct to exchange core objects information between the modules of the simulation. More...
 
struct  draw_item
 draw_item is a struct that is used to draw elements directly to the gui More...
 
class  DrawInterface
 The interface DrawInterface is used for updating draw_item structs via an update function. More...
 
struct  drawStruct
 drawStruct connects a vector of draw_item objects with their update interface DrawInterface More...
 
class  EntityManagerInterface
 
class  EntitySubscriberInterface
 The interface for notifying components of changes in simulation entities. More...
 
class  GraphicData
 
class  GraphicsCameraInterface
 
class  GraphicsEventClient
 
class  GraphicsEventInterface
 
class  GraphicsGuiInterface
 Interface for the osgWidget functionality. More...
 
class  GraphicsManagerInterface
 
class  GraphicsUpdateInterface
 The Interface to load controller dynamically into the simulation. More...
 
class  GraphicsWindowInterface
 
class  GuiEventInterface
 
struct  hudElementStruct
 
struct  indexMaps_t
 
class  JointData
 JointData is a class to exchange joint information between the simulation modules. More...
 
class  JointInterface
 
class  JointManagerInterface
 Interface class for the node organization. More...
 
struct  jointStruct
 jointStruct is a struct to exchange joint information between the GUI and the simulation More...
 
class  LightData
 LightData is a struct to exchange light information between the Dialog_Add_Light, the MainWindow and the osg widget. More...
 
class  LoadCenter
 
class  LoadHeightmapInterface
 
class  LoadMeshInterface
 
class  LoadSceneInterface
 
struct  local_settings
 
class  MarsGuiInterface
 Sets up the main gui of the simulation and handles various generic gui options. More...
 
class  MarsPluginTemplate
 
class  MarsPluginTemplateGUI
 
class  MaterialData
 MaterialData is a struct to exchange material information of nodes. More...
 
class  MotorData
 MotorData is a struct to exchange motor information between the GUI and the simulation. More...
 
class  MotorManagerInterface
 "MotorManagerInterface" declares the interfaces for all motor operations that are used for the communication between the simulation modules. More...
 
struct  NodeData
 NodeData is a struct to exchange node information between the GUI and the simulation. More...
 
class  NodeInterface
 Interface class for the physical layer. More...
 
class  NodeManagerInterface
 "NodeManagerInterface" declares the interfaces for all NodeOperations that are used for the communication between the simulation modules. More...
 
struct  nodeState
 A physical state of the node. More...
 
class  PhysicsInterface
 
class  PluginInterface
 The interface to load plugin dynamically into the simulation. More...
 
struct  pluginStruct
 
class  SceneParseException
 
class  SensorInterface
 
class  SensorManagerInterface
 "SensorManagerInterface" declares the interfaces for all sensor operations that are used for the communication between the simulation modules. More...
 
class  SimulatorInterface
 
struct  snmesh
 
struct  terrainStruct
 terrainStruct is a struct to exchange height maps between the GUI and the simulation More...
 

Typedefs

typedef unsigned long NodeId
 
typedef unsigned long JointId
 
typedef unsigned long MotorId
 
typedef double sReal
 
typedef sReal mydVector3[4]
 
typedef sReal mydVector2[4]
 
typedef ControllerInterfacecreate_controller(void)
 
typedef void destroy_controller(ControllerInterface *)
 
typedef void * pDestroyPlugin(PluginInterface *sp)
 
typedef PluginInterfacecreate_plugin(ControlCenter *control)
 

Enumerations

enum  DrawType {
  DRAW_UNKNOWN = 0, DRAW_LINE, DRAW_POINT, DRAW_ARROW,
  DRAW_TEXT, DRAW_RECTANGLE, DRAW_HUD_RECT, DRAW_TRIANGLE_SET,
  DRAW_POINTS, DRAW_CIRCLE, DRAW_LINE_STRIP, DRAW_LINES,
  DRAW_LAST
}
 
enum  NodeType {
  NODE_TYPE_UNDEFINED =0, NODE_TYPE_MESH, NODE_TYPE_BOX, NODE_TYPE_SPHERE,
  NODE_TYPE_CAPSULE, NODE_TYPE_CYLINDER, NODE_TYPE_PLANE, NODE_TYPE_TERRAIN,
  NODE_TYPE_REFERENCE, NODE_TYPE_EMPTY, NUMBER_OF_NODE_TYPES
}
 
enum  JointType {
  JOINT_TYPE_UNDEFINED =0, JOINT_TYPE_HINGE, JOINT_TYPE_HINGE2, JOINT_TYPE_SLIDER,
  JOINT_TYPE_BALL, JOINT_TYPE_UNIVERSAL, JOINT_TYPE_FIXED, JOINT_TYPE_ISTRUCT_SPINE,
  NUMBER_OF_JOINT_TYPES
}
 
enum  MotorType {
  MOTOR_TYPE_UNDEFINED =0, MOTOR_TYPE_POSITION, MOTOR_TYPE_VELOCITY, MOTOR_TYPE_EFFORT,
  MOTOR_TYPE_PID, MOTOR_TYPE_DC, MOTOR_TYPE_PID_FORCE
}
 
enum  SensorType {
  SENSOR_TYPE_UNDEFINED =0, SENSOR_TYPE_TORQUE_AVG, SENSOR_TYPE_LOAD, SENSOR_TYPE_POSITION,
  SENSOR_TYPE_ROTATION, SENSOR_TYPE_GROUND_CONTACT, SENSOR_TYPE_GROUND_CONTACT_FORCE, SENSOR_TYPE_GROUND_CENTER_OF_GRAVITY,
  SENSOR_TYPE_JOINT_POSITION, SENSOR_TYPE_CAMERA, SENSOR_TYPE_VELOCITY, SENSOR_TYPE_RAY,
  SENSOR_TYPE_RAY_GRID, SENSOR_TYPE_ANGULAR_VELOCITY, SENSOR_TYPE_MOTOR_CURRENT, SENSOR_TYPE_6DOF,
  SENSOR_TYPE_TORQUE, SENSOR_TYPE_MOTOR_POSITION, SENSOR_TYPE_JOINT_VELOCITY, SENSOR_TYPE_RAY2D
}
 
enum  LightType { OMNILIGHT =1, SPOTLIGHT }
 
enum  MaterialFaceType { FACE_NONE =0, FACE_FRONT, FACE_BACK, FACE_BOTH }
 
enum  Command {
  COMMAND_NODE_POSITION = 1, COMMAND_NODE_ROTATION, COMMAND_NODE_APPLY_FORCE, COMMAND_NODE_APPLY_FORCE_AT,
  COMMAND_NODE_CONTACT_MOTION1, COMMAND_PARAM_ADD, COMMAND_MOTOR_POSITION, COMMAND_NODE_RELOAD_EXTENT,
  COMMAND_NODE_RELOAD_POSITION, COMMAND_NODE_RELOAD_ANGLE, COMMAND_JOINT_RELOAD_OFFSET, COMMAND_JOINT_RELOAD_AXIS,
  COMMAND_PHYSICS_PARAMETER, COMMAND_SIM_QUIT, COMMAND_CONTACT_NODE_PARAMETER, COMMAND_NODE_VELOCITY,
  COMMAND_NODES_CONNECT, COMMAND_NODES_DISCONNECT, COMMAND_MOTOR_PID, COMMAND_NODE_ANGULAR_VELOCITY,
  COMMAND_NODE_RELOAD_FRICTION, COMMAND_NODE_ANGULAR_DAMPING, COMMAND_NODE_RELOAD_QUATERNION, COMMAND_JOINT_RELOAD_ANCHOR,
  COMMAND_PHYSICS_GRAVITY, COMMAND_MOTOR_MAX_VELOCITY
}
 
enum  ParameterType { WS_HSLIDER =1, WS_VSLIDER, WS_EDIT, WS_CBUTTON }
 
enum  PluginMode { PLUGIN_NO_MODE =0, PLUGIN_SIM_MODE, PLUGIN_GUI_MODE }
 
enum  IDMapType {
  MAP_TYPE_UNDEFINED =0, MAP_TYPE_NODE, MAP_TYPE_JOINT, MAP_TYPE_MOTOR,
  MAP_TYPE_SENSOR, MAP_TYPE_CONTROLLER
}
 
enum  EditNodeMask {
  EDIT_NODE_POS = 1, EDIT_NODE_ROT = 2, EDIT_NODE_SIZE = 4, EDIT_NODE_TYPE = 8,
  EDIT_NODE_MASS = 16, EDIT_NODE_NAME = 32, EDIT_NODE_MOVABLE = 64, EDIT_NODE_MOVE_ALL = 128,
  EDIT_NODE_MATERIAL = 256, EDIT_NODE_CONTACT = 512, EDIT_NODE_GROUP = 1024, EDIT_NODE_PHYSICS = 2048
}
 
enum  PreviewType {
  PREVIEW_CREATE = 1, PREVIEW_MOVE, PREVIEW_CLOSE, PREVIEW_EDIT,
  PREVIEW_COLOR
}
 
enum  OpenMode { OPEN_INITIAL = 1, OPEN_ACTUAL, OPEN_RELATIVE }
 
enum  AnchorMode { ANCHOR_NODE1 = 1, ANCHOR_NODE2, ANCHOR_CENTER, ANCHOR_CUSTOM }
 
enum  ShaderType { SHADER_TYPE_FRAGMENT, SHADER_TYPE_GEOMETRY, SHADER_TYPE_VERTEX, SHADER_TYPE_FFP }
 
enum  PhysicsError { PHYSICS_NO_ERROR = 0, PHYSICS_DEBUG, PHYSICS_ERROR, PHYSICS_UNKNOWN }
 

Functions

void ZERO_JOINT_STRUCT (jointStruct &a)
 
void ZERO_NODE_STRUCT (NodeData &a)
 
void destroy_plugin (PluginInterface *sp)
 
void getAbsFromRel (const NodeData &node1, NodeData *node2)
 get the absolute position of a new node by its relative position More...
 
void getRelFromAbs (const NodeData &node1, NodeData *node2)
 
const char * getJointTypeString (JointType type)
 Return a string for the joint-type. More...
 
JointType getJointType (const std::string &text)
 Helper function to get type-id from string in scene file. More...
 

Variables

const sReal MARS_PI = 3.1415926535897932384626433832795
 
const sReal MARS_PI2 = 6.283185307179586476925286766559
 
const sReal DTR = 0.017453292519943295769236907685
 
const sReal RTD = 57.295779513082320876798154814105
 
const unsigned int COLLIDE_MASK_SENSOR = 32768
 
static const char * sTypeNames [NUMBER_OF_NODE_TYPES]
 
static const char * sJointTypeStrings [NUMBER_OF_JOINT_TYPES]
 

Typedef Documentation

◆ create_controller

typedef ControllerInterface* mars::interfaces::create_controller(void)

Definition at line 58 of file ControllerInterface.h.

◆ create_plugin

typedef PluginInterface* mars::interfaces::create_plugin(ControlCenter *control)

Definition at line 64 of file PluginInterface.h.

◆ destroy_controller

typedef void mars::interfaces::destroy_controller(ControllerInterface *)

Definition at line 59 of file ControllerInterface.h.

◆ JointId

typedef unsigned long mars::interfaces::JointId

Definition at line 46 of file MARSDefs.h.

◆ MotorId

typedef unsigned long mars::interfaces::MotorId

Definition at line 47 of file MARSDefs.h.

◆ mydVector2

typedef sReal mars::interfaces::mydVector2[4]

Definition at line 51 of file MARSDefs.h.

◆ mydVector3

typedef sReal mars::interfaces::mydVector3[4]

Definition at line 50 of file MARSDefs.h.

◆ NodeId

typedef unsigned long mars::interfaces::NodeId

Definition at line 45 of file MARSDefs.h.

◆ pDestroyPlugin

typedef void* mars::interfaces::pDestroyPlugin(PluginInterface *sp)

Definition at line 63 of file PluginInterface.h.

◆ sReal

typedef double mars::interfaces::sReal

Definition at line 49 of file MARSDefs.h.

Enumeration Type Documentation

◆ AnchorMode

Enumerator
ANCHOR_NODE1 
ANCHOR_NODE2 
ANCHOR_CENTER 
ANCHOR_CUSTOM 

Definition at line 233 of file MARSDefs.h.

◆ Command

Enumerator
COMMAND_NODE_POSITION 
COMMAND_NODE_ROTATION 
COMMAND_NODE_APPLY_FORCE 
COMMAND_NODE_APPLY_FORCE_AT 
COMMAND_NODE_CONTACT_MOTION1 
COMMAND_PARAM_ADD 
COMMAND_MOTOR_POSITION 
COMMAND_NODE_RELOAD_EXTENT 
COMMAND_NODE_RELOAD_POSITION 
COMMAND_NODE_RELOAD_ANGLE 
COMMAND_JOINT_RELOAD_OFFSET 
COMMAND_JOINT_RELOAD_AXIS 
COMMAND_PHYSICS_PARAMETER 
COMMAND_SIM_QUIT 
COMMAND_CONTACT_NODE_PARAMETER 
COMMAND_NODE_VELOCITY 
COMMAND_NODES_CONNECT 
COMMAND_NODES_DISCONNECT 
COMMAND_MOTOR_PID 
COMMAND_NODE_ANGULAR_VELOCITY 
COMMAND_NODE_RELOAD_FRICTION 
COMMAND_NODE_ANGULAR_DAMPING 
COMMAND_NODE_RELOAD_QUATERNION 
COMMAND_JOINT_RELOAD_ANCHOR 
COMMAND_PHYSICS_GRAVITY 
COMMAND_MOTOR_MAX_VELOCITY 

Definition at line 150 of file MARSDefs.h.

◆ DrawType

Enumerator
DRAW_UNKNOWN 
DRAW_LINE 
DRAW_POINT 
DRAW_ARROW 
DRAW_TEXT 
DRAW_RECTANGLE 
DRAW_HUD_RECT 
DRAW_TRIANGLE_SET 
DRAW_POINTS 
DRAW_CIRCLE 
DRAW_LINE_STRIP 
DRAW_LINES 
DRAW_LAST 

Definition at line 59 of file draw_structs.h.

◆ EditNodeMask

Enumerator
EDIT_NODE_POS 
EDIT_NODE_ROT 
EDIT_NODE_SIZE 
EDIT_NODE_TYPE 
EDIT_NODE_MASS 
EDIT_NODE_NAME 
EDIT_NODE_MOVABLE 
EDIT_NODE_MOVE_ALL 
EDIT_NODE_MATERIAL 
EDIT_NODE_CONTACT 
EDIT_NODE_GROUP 
EDIT_NODE_PHYSICS 

Definition at line 204 of file MARSDefs.h.

◆ IDMapType

Enumerator
MAP_TYPE_UNDEFINED 
MAP_TYPE_NODE 
MAP_TYPE_JOINT 
MAP_TYPE_MOTOR 
MAP_TYPE_SENSOR 
MAP_TYPE_CONTROLLER 

Definition at line 195 of file MARSDefs.h.

◆ JointType

Enumerator
JOINT_TYPE_UNDEFINED 
JOINT_TYPE_HINGE 
JOINT_TYPE_HINGE2 
JOINT_TYPE_SLIDER 
JOINT_TYPE_BALL 
JOINT_TYPE_UNIVERSAL 
JOINT_TYPE_FIXED 
JOINT_TYPE_ISTRUCT_SPINE 
NUMBER_OF_JOINT_TYPES 

Definition at line 75 of file MARSDefs.h.

◆ LightType

Enumerator
OMNILIGHT 
SPOTLIGHT 

Definition at line 123 of file MARSDefs.h.

◆ MaterialFaceType

Enumerator
FACE_NONE 
FACE_FRONT 
FACE_BACK 
FACE_BOTH 

Definition at line 129 of file MARSDefs.h.

◆ MotorType

Enumerator
MOTOR_TYPE_UNDEFINED 
MOTOR_TYPE_POSITION 
MOTOR_TYPE_VELOCITY 
MOTOR_TYPE_EFFORT 
MOTOR_TYPE_PID 
MOTOR_TYPE_DC 
MOTOR_TYPE_PID_FORCE 

Definition at line 88 of file MARSDefs.h.

◆ NodeType

Enumerator
NODE_TYPE_UNDEFINED 
NODE_TYPE_MESH 
NODE_TYPE_BOX 
NODE_TYPE_SPHERE 
NODE_TYPE_CAPSULE 
NODE_TYPE_CYLINDER 
NODE_TYPE_PLANE 
NODE_TYPE_TERRAIN 
NODE_TYPE_REFERENCE 
NODE_TYPE_EMPTY 
NUMBER_OF_NODE_TYPES 

Definition at line 60 of file MARSDefs.h.

◆ OpenMode

Enumerator
OPEN_INITIAL 
OPEN_ACTUAL 
OPEN_RELATIVE 

Definition at line 227 of file MARSDefs.h.

◆ ParameterType

Enumerator
WS_HSLIDER 
WS_VSLIDER 
WS_EDIT 
WS_CBUTTON 

Definition at line 179 of file MARSDefs.h.

◆ PhysicsError

Enumerator
PHYSICS_NO_ERROR 
PHYSICS_DEBUG 
PHYSICS_ERROR 
PHYSICS_UNKNOWN 

Definition at line 45 of file PhysicsInterface.h.

◆ PluginMode

Enumerator
PLUGIN_NO_MODE 
PLUGIN_SIM_MODE 
PLUGIN_GUI_MODE 

Definition at line 186 of file MARSDefs.h.

◆ PreviewType

Enumerator
PREVIEW_CREATE 
PREVIEW_MOVE 
PREVIEW_CLOSE 
PREVIEW_EDIT 
PREVIEW_COLOR 

Definition at line 219 of file MARSDefs.h.

◆ SensorType

Enumerator
SENSOR_TYPE_UNDEFINED 
SENSOR_TYPE_TORQUE_AVG 
SENSOR_TYPE_LOAD 
SENSOR_TYPE_POSITION 
SENSOR_TYPE_ROTATION 
SENSOR_TYPE_GROUND_CONTACT 
SENSOR_TYPE_GROUND_CONTACT_FORCE 
SENSOR_TYPE_GROUND_CENTER_OF_GRAVITY 
SENSOR_TYPE_JOINT_POSITION 
SENSOR_TYPE_CAMERA 
SENSOR_TYPE_VELOCITY 
SENSOR_TYPE_RAY 
SENSOR_TYPE_RAY_GRID 
SENSOR_TYPE_ANGULAR_VELOCITY 
SENSOR_TYPE_MOTOR_CURRENT 
SENSOR_TYPE_6DOF 
SENSOR_TYPE_TORQUE 
SENSOR_TYPE_MOTOR_POSITION 
SENSOR_TYPE_JOINT_VELOCITY 
SENSOR_TYPE_RAY2D 

Definition at line 99 of file MARSDefs.h.

◆ ShaderType

Enumerator
SHADER_TYPE_FRAGMENT 
SHADER_TYPE_GEOMETRY 
SHADER_TYPE_VERTEX 
SHADER_TYPE_FFP 

Definition at line 240 of file MARSDefs.h.

Function Documentation

◆ destroy_plugin()

void mars::interfaces::destroy_plugin ( PluginInterface sp)

◆ getAbsFromRel()

void mars::interfaces::getAbsFromRel ( const NodeData node1,
NodeData node2 
)

get the absolute position of a new node by its relative position

Definition at line 43 of file utils.cpp.

◆ getJointType()

JointType mars::interfaces::getJointType ( const std::string &  text)

Helper function to get type-id from string in scene file.

Returns
the found id or JOINT_TYPE_UNDEFINED on error.

Definition at line 77 of file utils.cpp.

◆ getJointTypeString()

const char * mars::interfaces::getJointTypeString ( JointType  type)

Return a string for the joint-type.

Returns
NULL on error.

Definition at line 65 of file utils.cpp.

◆ getRelFromAbs()

void mars::interfaces::getRelFromAbs ( const NodeData node1,
NodeData node2 
)

Definition at line 48 of file utils.cpp.

◆ ZERO_JOINT_STRUCT()

void mars::interfaces::ZERO_JOINT_STRUCT ( jointStruct a)
inline

Definition at line 104 of file jointStruct.h.

◆ ZERO_NODE_STRUCT()

void mars::interfaces::ZERO_NODE_STRUCT ( NodeData a)
inline

Definition at line 387 of file NodeData.h.

Variable Documentation

◆ COLLIDE_MASK_SENSOR

const unsigned int mars::interfaces::COLLIDE_MASK_SENSOR = 32768

Definition at line 193 of file MARSDefs.h.

◆ DTR

const sReal mars::interfaces::DTR = 0.017453292519943295769236907685

Definition at line 56 of file MARSDefs.h.

◆ MARS_PI

const sReal mars::interfaces::MARS_PI = 3.1415926535897932384626433832795

Definition at line 53 of file MARSDefs.h.

◆ MARS_PI2

const sReal mars::interfaces::MARS_PI2 = 6.283185307179586476925286766559

Definition at line 54 of file MARSDefs.h.

◆ RTD

const sReal mars::interfaces::RTD = 57.295779513082320876798154814105

Definition at line 57 of file MARSDefs.h.

◆ sJointTypeStrings

const char* mars::interfaces::sJointTypeStrings[NUMBER_OF_JOINT_TYPES]
static
Initial value:
= {
"undefined",
"hinge",
"hinge2",
"slider",
"ball",
"universal",
"fixed",
"istruct-spine"
}

Definition at line 54 of file utils.cpp.

◆ sTypeNames

const char* mars::interfaces::sTypeNames[NUMBER_OF_NODE_TYPES]
static
Initial value:
= {
"undefined",
"mesh",
"box",
"sphere",
"capsule",
"cylinder",
"plane",
"terrain",
"reference",
"empty"
}

Definition at line 58 of file NodeData.cpp.