Cheetah Software
1.0
|
#include <Graphics3D.h>
Public Member Functions | |
Graphics3D (QWidget *parent=0) | |
virtual | ~Graphics3D () |
void | setAnimating (bool animating) |
size_t | setupCheetah3 (Vec4< float > color, bool useOld) |
size_t | setupMiniCheetah (Vec4< float > color, bool useOld) |
void | lockGfxMutex () |
void | unlockGfxMutex () |
GamepadCommand & | getDriverCommand () |
void | resetGameController () |
bool | IsPaused () |
bool | wantTurbo () |
Public Attributes | |
double | _fps = 0 |
DrawList | _drawList |
char | infoString [200] = "" |
Protected Member Functions | |
void | initializeGL () override |
void | paintGL () override |
void | mousePressEvent (QMouseEvent *event) override |
void | mouseMoveEvent (QMouseEvent *event) override |
void | mouseReleaseEvent (QMouseEvent *event) override |
void | wheelEvent (QWheelEvent *e) override |
void | keyReleaseEvent (QKeyEvent *e) override |
void | keyPressEvent (QKeyEvent *event) override |
Protected Attributes | |
float | _color1 [3] = {0.364784, 0.513401, 0.952230} |
float | _color2 [3] = {0.553970, 0.477397, 0.628871} |
float | _color3 [3] = {0.335223, 0.768230, 0.277775} |
Private Member Functions | |
void | updateCameraMatrix () |
void | renderDrawlist () |
void | configOpenGLPass (int pass) |
void | _BoxObstacleDrawing () |
void | _MeshObstacleDrawing () |
void | _DrawBox (double depth, double width, double height) |
void | _Additional_Drawing (int pass) |
void | _DrawContactForce () |
void | _DrawContactPoint () |
void | _drawArrow (ArrowVisualization &arrow) |
void | _drawBlock (BlockVisualization &box) |
void | _drawSphere (SphereVisualization &sphere) |
void | _drawCone (ConeVisualization &cone) |
void | _rotateZtoDirection (const Vec3< float > &direction) |
void | _setColor (const Vec4< float > &color) |
void | _translate (const Vec3< float > &position) |
void | _drawArrow (const Vec3< float > &base, const Vec3< float > &direction, float lineWidth, float headWidth, float headLength) |
void | getHeightColor (const double &height, float &r, float &g, float &b) |
void | _SetRGBHeight (const double &h, const double &step, const int &idx, float &r, float &g, float &b) |
Definition at line 33 of file Graphics3D.h.
|
explicit |
Initialize a 3D visualization window
Definition at line 77 of file Graphics3D.cpp.
|
virtual |
Definition at line 112 of file Graphics3D.cpp.
|
private |
Definition at line 679 of file Graphics3D.cpp.
References _cameraMatrix, _drawArrow(), _drawBlock(), _drawCone(), _DrawContactForce(), _DrawContactPoint(), _drawList, _drawSphere(), DrawList::_visualizationData, VisualizationData::arrows, VisualizationData::blocks, PathVisualization::color, VisualizationData::cones, configOpenGLPass(), VisualizationData::num_arrows, VisualizationData::num_blocks, VisualizationData::num_cones, VisualizationData::num_paths, PathVisualization::num_points, VisualizationData::num_spheres, VisualizationData::paths, PathVisualization::position, and VisualizationData::spheres.
|
private |
Definition at line 611 of file Graphics3D.cpp.
References _cameraMatrix, _DrawBox(), _drawList, and DrawList::getBoxInfoList().
|
private |
Definition at line 835 of file Graphics3D.cpp.
References _setColor(), ArrowVisualization::base_position, ArrowVisualization::color, ArrowVisualization::direction, ArrowVisualization::head_length, ArrowVisualization::head_width, and ArrowVisualization::shaft_width.
|
private |
Definition at line 841 of file Graphics3D.cpp.
References _rotateZtoDirection(), _translate(), and f().
|
private |
Definition at line 821 of file Graphics3D.cpp.
References _DrawBox(), _setColor(), _translate(), BlockVisualization::color, BlockVisualization::corner_position, BlockVisualization::dimension, and BlockVisualization::rpy.
|
private |
Definition at line 629 of file Graphics3D.cpp.
|
private |
Definition at line 808 of file Graphics3D.cpp.
References _rotateZtoDirection(), _setColor(), _translate(), ConeVisualization::color, ConeVisualization::direction, ConeVisualization::point_position, and ConeVisualization::radius.
|
private |
Definition at line 722 of file Graphics3D.cpp.
References _drawArrow(), _drawList, f(), DrawList::getGCForce(), DrawList::getGCPos(), and DrawList::getTotalNumGC().
|
private |
Definition at line 744 of file Graphics3D.cpp.
References _drawList, f(), DrawList::getGCPos(), and DrawList::getTotalNumGC().
|
private |
Definition at line 799 of file Graphics3D.cpp.
References _setColor(), _translate(), SphereVisualization::color, SphereVisualization::position, and SphereVisualization::radius.
|
private |
Definition at line 519 of file Graphics3D.cpp.
References _cameraMatrix, _drawList, f(), DrawList::getGridSize(), getHeightColor(), DrawList::getHeightMap(), DrawList::getHeightMapLeftCorner(), DrawList::getHeightMapMax(), and DrawList::getHeightMapMin().
|
private |
Definition at line 764 of file Graphics3D.cpp.
References ori::rad2deg().
|
inlineprivate |
|
private |
|
inlineprivate |
Definition at line 101 of file Graphics3D.h.
References _drawArrow().
|
private |
|
inline |
Definition at line 52 of file Graphics3D.h.
References _driverCommand.
|
private |
Definition at line 577 of file Graphics3D.cpp.
References _SetRGBHeight().
|
overrideprotected |
Definition at line 167 of file Graphics3D.cpp.
References _cameraTarget, _colAttrColorArray, _colAttrSolidColor, _colorArrayProgram, _colUniformSolidColor, _matrixUniformColorArray, _matrixUniformSolidColor, _normAttrColorArray, _normAttrSolidColor, _posAttrColorArray, _posAttrSolidColor, _solidColorProgram, clearColor, f(), fragmentShaderSource, vertexShaderSourceColorArray, and vertexShaderSourceSolidColor.
|
inline |
Definition at line 56 of file Graphics3D.h.
References _pause.
|
overrideprotected |
Definition at line 238 of file Graphics3D.cpp.
References _arrowsPressed, _freeCamMove, _freeCamPos, _pause, _rx, _ry, _targetSpeed, and _turbo.
|
overrideprotected |
Definition at line 289 of file Graphics3D.cpp.
References _arrowsPressed, _freeCamMove, _rotOrig, _targetSpeed, and _turbo.
|
inline |
Definition at line 43 of file Graphics3D.h.
References _gfxMutex.
|
overrideprotected |
Definition at line 218 of file Graphics3D.cpp.
References _orbiting, _orbiting_x_start, _orbiting_y_start, _pixel_to_rad, _rx, _rx_base, _ry, and _ry_base.
|
overrideprotected |
Definition at line 210 of file Graphics3D.cpp.
References _orbiting, _orbiting_x_start, _orbiting_y_start, _rx, _rx_base, _ry, and _ry_base.
|
overrideprotected |
Definition at line 224 of file Graphics3D.cpp.
References _orbiting, _orbiting_x_start, _orbiting_y_start, _pixel_to_rad, _rx_base, and _ry_base.
|
overrideprotected |
Definition at line 477 of file Graphics3D.cpp.
References _Additional_Drawing(), _animating, _BoxObstacleDrawing(), _driverCommand, _fps, _frame, _gameController, _MeshObstacleDrawing(), configOpenGLPass(), infoString, last_frame_ms, renderDrawlist(), updateCameraMatrix(), and GameController::updateGamepadCommand().
|
private |
Definition at line 333 of file Graphics3D.cpp.
References _buffID, _cameraMatrix, _colAttrColorArray, _colAttrSolidColor, _colorArrayProgram, _colUniformSolidColor, _drawList, DrawList::_instanceColor, _matrixUniformColorArray, _matrixUniformSolidColor, _normAttrColorArray, _normAttrSolidColor, _posAttrColorArray, _posAttrSolidColor, _solidColorProgram, DrawList::getColorArray(), DrawList::getGLDataSizeMB(), DrawList::getGLDrawArrayOffset(), DrawList::getGLDrawArraySize(), DrawList::getModelBaseTransform(), DrawList::getModelKinematicTransform(), DrawList::getNormalArray(), DrawList::getNumObjectsToDraw(), DrawList::getSizeOfAllData(), DrawList::getVertexArray(), and DrawList::needsReload().
|
inline |
Definition at line 54 of file Graphics3D.h.
References _gameController, and GameController::findNewController().
void Graphics3D::setAnimating | ( | bool | animating | ) |
Enable and disable animation
Definition at line 331 of file Graphics3D.cpp.
References _animating.
size_t Graphics3D::setupCheetah3 | ( | Vec4< float > | color, |
bool | useOld | ||
) |
Configure the window for displaying cheetah 3
Definition at line 117 of file Graphics3D.cpp.
References _drawList, and DrawList::addCheetah3().
size_t Graphics3D::setupMiniCheetah | ( | Vec4< float > | color, |
bool | useOld | ||
) |
Configure the window for displaying mini cheetah
Definition at line 122 of file Graphics3D.cpp.
References _drawList, and DrawList::addMiniCheetah().
|
inline |
Definition at line 45 of file Graphics3D.h.
References _gfxMutex.
|
private |
Update the camera matrix for the current zoom/orbit
Definition at line 128 of file Graphics3D.cpp.
References _arrowsPressed, _cameraMatrix, _cameraTarget, _drawList, _frameTime, _freeCamFilter, _freeCamMove, _freeCamPos, _rotOrig, _rx, _ry, _targetSpeed, _zoom, ori::deg2rad(), f(), FirstOrderIIRFilter< T, T2 >::get(), DrawList::getCameraOrigin(), and FirstOrderIIRFilter< T, T2 >::update().
|
inline |
Definition at line 57 of file Graphics3D.h.
References _turbo, initializeGL(), keyPressEvent(), keyReleaseEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintGL(), and wheelEvent().
|
overrideprotected |
Definition at line 230 of file Graphics3D.cpp.
References _zoom.
|
private |
Definition at line 106 of file Graphics3D.h.
|
private |
Definition at line 154 of file Graphics3D.h.
|
private |
Definition at line 160 of file Graphics3D.h.
|
private |
Definition at line 120 of file Graphics3D.h.
|
private |
Definition at line 145 of file Graphics3D.h.
|
private |
Definition at line 147 of file Graphics3D.h.
|
private |
Definition at line 110 of file Graphics3D.h.
|
private |
Definition at line 116 of file Graphics3D.h.
|
protected |
Definition at line 75 of file Graphics3D.h.
|
protected |
Definition at line 76 of file Graphics3D.h.
|
protected |
Definition at line 77 of file Graphics3D.h.
|
private |
Definition at line 123 of file Graphics3D.h.
|
private |
Definition at line 115 of file Graphics3D.h.
DrawList Graphics3D::_drawList |
Definition at line 49 of file Graphics3D.h.
|
private |
Definition at line 81 of file Graphics3D.h.
double Graphics3D::_fps = 0 |
Definition at line 48 of file Graphics3D.h.
|
private |
Definition at line 127 of file Graphics3D.h.
Definition at line 152 of file Graphics3D.h.
|
private |
Definition at line 148 of file Graphics3D.h.
|
private |
Definition at line 150 of file Graphics3D.h.
Definition at line 151 of file Graphics3D.h.
|
private |
Definition at line 159 of file Graphics3D.h.
|
private |
Definition at line 80 of file Graphics3D.h.
|
private |
Definition at line 83 of file Graphics3D.h.
|
private |
Definition at line 111 of file Graphics3D.h.
|
private |
Definition at line 117 of file Graphics3D.h.
|
private |
Definition at line 112 of file Graphics3D.h.
|
private |
Definition at line 118 of file Graphics3D.h.
|
private |
Definition at line 132 of file Graphics3D.h.
|
private |
Definition at line 133 of file Graphics3D.h.
|
private |
Definition at line 134 of file Graphics3D.h.
|
private |
Definition at line 166 of file Graphics3D.h.
|
private |
Definition at line 139 of file Graphics3D.h.
|
private |
Definition at line 109 of file Graphics3D.h.
|
private |
Definition at line 114 of file Graphics3D.h.
|
private |
Definition at line 158 of file Graphics3D.h.
|
private |
Definition at line 142 of file Graphics3D.h.
|
private |
Definition at line 137 of file Graphics3D.h.
|
private |
Definition at line 135 of file Graphics3D.h.
|
private |
Definition at line 138 of file Graphics3D.h.
|
private |
Definition at line 136 of file Graphics3D.h.
|
private |
Definition at line 124 of file Graphics3D.h.
|
private |
Definition at line 156 of file Graphics3D.h.
|
private |
Definition at line 143 of file Graphics3D.h.
|
private |
Definition at line 146 of file Graphics3D.h.
|
private |
Definition at line 140 of file Graphics3D.h.
char Graphics3D::infoString[200] = "" |
Definition at line 50 of file Graphics3D.h.
|
private |
Definition at line 129 of file Graphics3D.h.