DART  6.7.3
dart::gui::glut::SimWindow Class Reference

#include <SimWindow.hpp>

Inheritance diagram for dart::gui::glut::SimWindow:
dart::gui::glut::Win3D dart::gui::glut::Window dart::gui::glut::MotionBlurSimWindow dart::gui::glut::SoftSimWindow

Public Member Functions

 SimWindow ()
 
virtual ~SimWindow ()
 
virtual void timeStepping ()
 
virtual void drawWorld () const
 
virtual void drawSkeletons () const
 
virtual void drawSkels ()
 
virtual void drawEntities ()
 
void displayTimer (int _val) override
 
void draw () override
 
void keyboard (unsigned char _key, int _x, int _y) override
 
void setWorld (dart::simulation::WorldPtr _world)
 
void saveWorld ()
 Save world in 'tempWorld.txt'. More...
 
void plot (Eigen::VectorXd &_data)
 Plot _data in a 2D window. More...
 
void initWindow (int _w, int _h, const char *_name) override
 
void resize (int _w, int _h) override
 
void render () override
 
void click (int _button, int _state, int _x, int _y) override
 
void drag (int _x, int _y) override
 
virtual void initGL ()
 
virtual void initLights ()
 

Static Public Member Functions

static void reshape (int _w, int _h)
 
static void keyEvent (unsigned char _key, int _x, int _y)
 
static void specKeyEvent (int _key, int _x, int _y)
 
static void mouseClick (int _button, int _state, int _x, int _y)
 
static void mouseDrag (int _x, int _y)
 
static void mouseMove (int _x, int _y)
 
static void refresh ()
 
static void refreshTimer (int _val)
 
static void runTimer (int _val)
 
static Windowcurrent ()
 

Static Public Attributes

static std::vector< Window * > mWindows
 
static std::vector< int > mWinIDs
 

Protected Member Functions

virtual void drawSkeleton (const dynamics::Skeleton *skeleton, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true) const
 
virtual void drawEntity (const dynamics::Entity *entity, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true) const
 
virtual void drawBodyNode (const dynamics::BodyNode *bodyNode, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true, bool recursive=false) const
 
virtual void drawShapeFrame (const dynamics::ShapeFrame *shapeFrame, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true) const
 
virtual void drawShape (const dynamics::Shape *shape, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5)) const
 
virtual void drawPointMasses (const std::vector< dynamics::PointMass * > pointMasses, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true) const
 
virtual void drawMarker (const dynamics::Marker *marker, const Eigen::Vector4d &color=Eigen::Vector4d::Constant(0.5), bool useDefaultColor=true) const
 
virtual void specKey (int _key, int _x, int _y)
 
virtual void move (int _x, int _y)
 
virtual void simTimer (int _val)
 
virtual bool screenshot ()
 

Protected Attributes

simulation::WorldPtr mWorld
 
int mPlayFrame
 
bool mPlay
 
bool mSimulating
 
bool mShowPointMasses
 If true, render point masses of soft bodies. More...
 
bool mShowMarkers
 If true, render markers. More...
 
std::vector< GraphWindow * > mGraphWindows
 Array of graph windows. More...
 
Trackball mTrackBall
 
Eigen::Vector3d mTrans
 
Eigen::Vector3d mEye
 
Eigen::Vector3d mUp
 
float mZoom
 
float mPersp
 
bool mRotate
 
bool mTranslate
 
bool mZooming
 
int mWinWidth
 
int mWinHeight
 
int mMouseX
 
int mMouseY
 
double mDisplayTimeout
 
bool mMouseDown
 
bool mMouseDrag
 
bool mCapture
 
double mBackground [4]
 
gui::RenderInterfacemRI
 
std::vector< unsigned char > mScreenshotTemp
 
std::vector< unsigned char > mScreenshotTemp2
 

Constructor & Destructor Documentation

◆ SimWindow()

dart::gui::glut::SimWindow::SimWindow ( )

◆ ~SimWindow()

dart::gui::glut::SimWindow::~SimWindow ( )
virtual

Member Function Documentation

◆ click()

void dart::gui::glut::Win3D::click ( int  _button,
int  _state,
int  _x,
int  _y 
)
overridevirtualinherited

Reimplemented from dart::gui::glut::Window.

◆ current()

Window * dart::gui::glut::Window::current ( )
inlinestaticinherited

◆ displayTimer()

void dart::gui::glut::SimWindow::displayTimer ( int  _val)
overridevirtual

Reimplemented from dart::gui::glut::Window.

◆ drag()

void dart::gui::glut::Win3D::drag ( int  _x,
int  _y 
)
overridevirtualinherited

Reimplemented from dart::gui::glut::Window.

◆ draw()

void dart::gui::glut::SimWindow::draw ( )
overridevirtual

◆ drawBodyNode()

void dart::gui::glut::SimWindow::drawBodyNode ( const dynamics::BodyNode bodyNode,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true,
bool  recursive = false 
) const
protectedvirtual

◆ drawEntities()

void dart::gui::glut::SimWindow::drawEntities ( )
virtual

◆ drawEntity()

void dart::gui::glut::SimWindow::drawEntity ( const dynamics::Entity entity,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true 
) const
protectedvirtual

◆ drawMarker()

void dart::gui::glut::SimWindow::drawMarker ( const dynamics::Marker marker,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true 
) const
protectedvirtual

◆ drawPointMasses()

void dart::gui::glut::SimWindow::drawPointMasses ( const std::vector< dynamics::PointMass * >  pointMasses,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true 
) const
protectedvirtual

◆ drawShape()

void dart::gui::glut::SimWindow::drawShape ( const dynamics::Shape shape,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5) 
) const
protectedvirtual

◆ drawShapeFrame()

void dart::gui::glut::SimWindow::drawShapeFrame ( const dynamics::ShapeFrame shapeFrame,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true 
) const
protectedvirtual

◆ drawSkeleton()

void dart::gui::glut::SimWindow::drawSkeleton ( const dynamics::Skeleton skeleton,
const Eigen::Vector4d &  color = Eigen::Vector4d::Constant(0.5),
bool  useDefaultColor = true 
) const
protectedvirtual

◆ drawSkeletons()

void dart::gui::glut::SimWindow::drawSkeletons ( ) const
virtual

◆ drawSkels()

void dart::gui::glut::SimWindow::drawSkels ( )
virtual

◆ drawWorld()

void dart::gui::glut::SimWindow::drawWorld ( ) const
virtual

◆ initGL()

void dart::gui::glut::Win3D::initGL ( )
virtualinherited

◆ initLights()

void dart::gui::glut::Win3D::initLights ( )
virtualinherited

◆ initWindow()

void dart::gui::glut::Win3D::initWindow ( int  _w,
int  _h,
const char *  _name 
)
overridevirtualinherited
Warning
This function should be called once.

Reimplemented from dart::gui::glut::Window.

◆ keyboard()

void dart::gui::glut::SimWindow::keyboard ( unsigned char  _key,
int  _x,
int  _y 
)
overridevirtual

Reimplemented from dart::gui::glut::Window.

Reimplemented in dart::gui::glut::SoftSimWindow.

◆ keyEvent()

void dart::gui::glut::Window::keyEvent ( unsigned char  _key,
int  _x,
int  _y 
)
staticinherited

◆ mouseClick()

void dart::gui::glut::Window::mouseClick ( int  _button,
int  _state,
int  _x,
int  _y 
)
staticinherited

◆ mouseDrag()

void dart::gui::glut::Window::mouseDrag ( int  _x,
int  _y 
)
staticinherited

◆ mouseMove()

void dart::gui::glut::Window::mouseMove ( int  _x,
int  _y 
)
staticinherited

◆ move()

void dart::gui::glut::Window::move ( int  _x,
int  _y 
)
protectedvirtualinherited

◆ plot()

void dart::gui::glut::SimWindow::plot ( Eigen::VectorXd &  _data)

Plot _data in a 2D window.

◆ refresh()

void dart::gui::glut::Window::refresh ( )
staticinherited

◆ refreshTimer()

void dart::gui::glut::Window::refreshTimer ( int  _val)
staticinherited

◆ render()

void dart::gui::glut::Win3D::render ( )
overridevirtualinherited

◆ reshape()

void dart::gui::glut::Window::reshape ( int  _w,
int  _h 
)
staticinherited

◆ resize()

void dart::gui::glut::Win3D::resize ( int  _w,
int  _h 
)
overridevirtualinherited

◆ runTimer()

void dart::gui::glut::Window::runTimer ( int  _val)
staticinherited

◆ saveWorld()

void dart::gui::glut::SimWindow::saveWorld ( )

Save world in 'tempWorld.txt'.

◆ screenshot()

bool dart::gui::glut::Window::screenshot ( )
protectedvirtualinherited

◆ setWorld()

void dart::gui::glut::SimWindow::setWorld ( dart::simulation::WorldPtr  _world)

◆ simTimer()

void dart::gui::glut::Window::simTimer ( int  _val)
protectedvirtualinherited

◆ specKey()

void dart::gui::glut::Window::specKey ( int  _key,
int  _x,
int  _y 
)
protectedvirtualinherited

◆ specKeyEvent()

void dart::gui::glut::Window::specKeyEvent ( int  _key,
int  _x,
int  _y 
)
staticinherited

◆ timeStepping()

void dart::gui::glut::SimWindow::timeStepping ( )
virtual

Member Data Documentation

◆ mBackground

double dart::gui::glut::Window::mBackground[4]
protectedinherited

◆ mCapture

bool dart::gui::glut::Window::mCapture
protectedinherited

◆ mDisplayTimeout

double dart::gui::glut::Window::mDisplayTimeout
protectedinherited

◆ mEye

Eigen::Vector3d dart::gui::glut::Win3D::mEye
protectedinherited

◆ mGraphWindows

std::vector<GraphWindow*> dart::gui::glut::SimWindow::mGraphWindows
protected

Array of graph windows.

◆ mMouseDown

bool dart::gui::glut::Window::mMouseDown
protectedinherited

◆ mMouseDrag

bool dart::gui::glut::Window::mMouseDrag
protectedinherited

◆ mMouseX

int dart::gui::glut::Window::mMouseX
protectedinherited

◆ mMouseY

int dart::gui::glut::Window::mMouseY
protectedinherited

◆ mPersp

float dart::gui::glut::Win3D::mPersp
protectedinherited

◆ mPlay

bool dart::gui::glut::SimWindow::mPlay
protected

◆ mPlayFrame

int dart::gui::glut::SimWindow::mPlayFrame
protected

◆ mRI

gui::RenderInterface* dart::gui::glut::Window::mRI
protectedinherited

◆ mRotate

bool dart::gui::glut::Win3D::mRotate
protectedinherited

◆ mScreenshotTemp

std::vector<unsigned char> dart::gui::glut::Window::mScreenshotTemp
protectedinherited

◆ mScreenshotTemp2

std::vector<unsigned char> dart::gui::glut::Window::mScreenshotTemp2
protectedinherited

◆ mShowMarkers

bool dart::gui::glut::SimWindow::mShowMarkers
protected

If true, render markers.

◆ mShowPointMasses

bool dart::gui::glut::SimWindow::mShowPointMasses
protected

If true, render point masses of soft bodies.

◆ mSimulating

bool dart::gui::glut::SimWindow::mSimulating
protected

◆ mTrackBall

Trackball dart::gui::glut::Win3D::mTrackBall
protectedinherited

◆ mTrans

Eigen::Vector3d dart::gui::glut::Win3D::mTrans
protectedinherited

◆ mTranslate

bool dart::gui::glut::Win3D::mTranslate
protectedinherited

◆ mUp

Eigen::Vector3d dart::gui::glut::Win3D::mUp
protectedinherited

◆ mWindows

std::vector< Window * > dart::gui::glut::Window::mWindows
staticinherited

◆ mWinHeight

int dart::gui::glut::Window::mWinHeight
protectedinherited

◆ mWinIDs

std::vector< int > dart::gui::glut::Window::mWinIDs
staticinherited

◆ mWinWidth

int dart::gui::glut::Window::mWinWidth
protectedinherited

◆ mWorld

simulation::WorldPtr dart::gui::glut::SimWindow::mWorld
protected

◆ mZoom

float dart::gui::glut::Win3D::mZoom
protectedinherited

◆ mZooming

bool dart::gui::glut::Win3D::mZooming
protectedinherited