Search Toolkit Book for OpenGLRenderer
#include "opengl_renderer.hpp"
(Private to src/app/cn3d
.)
Definition at line 72 of file opengl_renderer.hpp.
◆ SphereList ◆ SphereMap ◆ SpherePtrList ◆ EColorAction Enumerator eResetCache eSetCacheValues eUseCachedValues eSetColorIfDifferentDefinition at line 173 of file opengl_renderer.hpp.
◆ eViewAdjust Enumerator eXYRotateHV eZRotateH eXYTranslateHV eZoomH eZoomHHVV eZoomIn eZoomOut eCenterCameraDefinition at line 97 of file opengl_renderer.hpp.
◆ OpenGLRenderer() OpenGLRenderer::OpenGLRenderer ( Cn3DGLCanvas * parentGLCanvas ) ◆ AddTransparentSphere() void OpenGLRenderer::AddTransparentSphere ( const Vector & color, unsigned int name, const Vector & site, double radius, double alpha ) private ◆ AddTransparentSpheresForList() void OpenGLRenderer::AddTransparentSpheresForList ( unsigned int list ) private ◆ AttachStructureSet() void OpenGLRenderer::AttachStructureSet ( StructureSet * targetStructureSet ) ◆ CenterView() void OpenGLRenderer::CenterView ( const Vector & viewCenter, double radius )Definition at line 660 of file opengl_renderer.cpp.
References cameraAngleRad, cameraDistance, cameraLookAtX, cameraLookAtY, StructureSet::center, NewView(), Vector< T >::normalize(), NULL, RadToDegrees(), ResetCamera(), StructureSet::rotationCenter, SaveToASNViewSettings(), structureSet, TRACEMSG, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by StructureSet::CenterViewOnAlignedResidues(), and StructureSet::CenterViewOnStructure().
◆ ChangeView()Definition at line 583 of file opengl_renderer.cpp.
References ApplyTransformation(), cameraAngleRad, cameraDistance, cameraLookAtX, cameraLookAtY, StructureSet::center, eCenterCamera, eXYRotateHV, eXYTranslateHV, eZoomH, eZoomHHVV, eZoomIn, eZoomOut, eZRotateH, GL2Matrix(), MAX_CAMERA_ANGLE, MIN_CAMERA_ANGLE, NewView(), rotateSpeed, StructureSet::rotationCenter, structureSet, viewMatrix, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by StructureWindow::OnAdjustView(), StructureWindow::OnAnimationTimer(), and Cn3DGLCanvas::OnMouseEvent().
◆ ClearTransparentSpheresForList() void OpenGLRenderer::ClearTransparentSpheresForList ( unsigned int list ) inlineprivate ◆ ComputeBestView() void OpenGLRenderer::ComputeBestView ( void ) ◆ Construct() void OpenGLRenderer::Construct ( void )Definition at line 874 of file opengl_renderer.cpp.
References atomSlices, atomStacks, bondSides, ConstructLogo(), StructureBase::DrawAll(), eResetCache, ERRORMSG, GlobalMessenger(), helixSides, highlightsOn, projectionType, REG_HIGHLIGHTS_ON, REG_PROJECTION_TYPE, REG_QUALITY_ATOM_SLICES, REG_QUALITY_ATOM_STACKS, REG_QUALITY_BOND_SIDES, REG_QUALITY_HELIX_SIDES, REG_QUALITY_SECTION, REG_QUALITY_WORM_SEGMENTS, REG_QUALITY_WORM_SIDES, RegistryGetBoolean(), RegistryGetInteger(), RegistryGetString(), SetColor(), structureSet, Messenger::UnPostStructureRedraws(), wormSegments, and wormSides.
Referenced by AttachStructureSet(), ExportPNG(), and Messenger::ProcessRedraws().
◆ ConstructLogo() void OpenGLRenderer::ConstructLogo ( void ) privateDefinition at line 959 of file opengl_renderer.cpp.
References ClearTransparentSpheresForList(), CR, eSetColorIfDifferent, FIRST_LIST, g(), H, i, n, PI, SetColor(), and tmp.
Referenced by Construct().
◆ Display() void OpenGLRenderer::Display ( void )Definition at line 453 of file opengl_renderer.cpp.
References AddTransparentSpheresForList(), ALL_FRAMES, currentFrame, ERRORMSG, first(), FIRST_LIST, StructureSet::frameMap, StyleManager::GetBackgroundColor(), i, l(), last(), StructureSet::lastDisplayList, le(), NewView(), PopMatrix(), PushMatrix(), REG_ADVANCED_SECTION, REG_PROXIMAL_STEREO, REG_STEREO_SEPARATION, RegistryGetBoolean(), RegistryGetDouble(), RenderTransparentSpheres(), selectMode, stereoOn, structureSet, StructureSet::styleManager, StructureSet::transformMap, and viewMatrix.
Referenced by ExportPNG(), GetSelected(), and Cn3DGLCanvas::OnPaint().
◆ DrawAtom()Definition at line 1148 of file opengl_renderer.cpp.
References AddTransparentSphere(), AtomStyle::alpha, atomSlices, atomStacks, AtomStyle::centerLabel, AtomStyle::color, currentDisplayList, displayListEmpty, DrawLabel(), Colors::eHighlight, StyleManager::eNotDisplayed, eSetCacheValues, eSetColorIfDifferent, StyleManager::eSolidAtom, Get(), GlobalColors(), GLU_SPHERE, AtomStyle::isHighlighted, AtomStyle::name, AtomStyle::radius, SetColor(), site, and AtomStyle::style.
Referenced by Residue::Draw().
◆ DrawBond()Definition at line 1452 of file opengl_renderer.cpp.
References BondStyle::EndStyle::atomCap, BondStyle::EndStyle::color, currentDisplayList, displayListEmpty, DrawHalfBond(), DrawHalfWorm(), StyleManager::eLineBond, StyleManager::eLineWormBond, BondStyle::end1, BondStyle::end2, StyleManager::eNotDisplayed, eSetCacheValues, eSetColorIfDifferent, StyleManager::eThickWormBond, BondStyle::midCap, BondStyle::EndStyle::name, BondStyle::EndStyle::radius, SetColor(), BondStyle::EndStyle::style, and BondStyle::tension.
Referenced by Bond::Draw().
◆ DrawHalfBond() ◆ DrawHalfWorm()Definition at line 1178 of file opengl_renderer.cpp.
References a, b, ERRORMSG, H, i, len, MAC_GL_SETCOLOR, Vector< T >::normalize(), NULL, offset, PI, SWAPPTR, t, T, tmp, WARNINGMSG, wormSegments, wormSides, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by DrawBond().
◆ DrawHelix()Definition at line 1509 of file opengl_renderer.cpp.
References ObjectStyle::arrowBaseWidthProportion, ObjectStyle::arrowLength, HelixStyle::arrowTipWidthProportion, ObjectStyle::color, currentDisplayList, displayListEmpty, DoCylinderPlacementTransform(), StyleManager::eObjectWithArrow, eSetCacheValues, eSetColorIfDifferent, GLU_CYLINDER, GLU_DISK, helixSides, NO_NAME, HelixStyle::radius, SetColor(), and ObjectStyle::style.
Referenced by Helix3D::Draw().
◆ DrawLabel()Definition at line 1809 of file opengl_renderer.cpp.
References color, currentDisplayList, displayListEmpty, eSetColorIfDifferent, FONT_BASE, glCanvas, Cn3DGLCanvas::MeasureText(), NULL, SetColor(), text(), WARNINGMSG, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by Residue::Draw(), Molecule::DrawAllWithTerminiLabels(), and DrawAtom().
◆ DrawStrand()Definition at line 1574 of file opengl_renderer.cpp.
References a, ObjectStyle::arrowBaseWidthProportion, ObjectStyle::arrowLength, ObjectStyle::color, currentDisplayList, displayListEmpty, StyleManager::eObjectWithArrow, StyleManager::eObjectWithoutArrow, eSetCacheValues, eSetColorIfDifferent, FB, FT, i, LT, MAC_GL_SETCOLOR, n, NO_NAME, Vector< T >::normalize(), RT, SetColor(), ObjectStyle::style, StrandStyle::thickness, and StrandStyle::width.
Referenced by Strand3D::Draw().
◆ EnableStereo() void OpenGLRenderer::EnableStereo ( bool enableStereo ) ◆ EndDisplayList() void OpenGLRenderer::EndDisplayList ( void ) ◆ GetGLFont() const wxFont & OpenGLRenderer::GetGLFont ( void ) const ◆ GetRotateSpeed() double OpenGLRenderer::GetRotateSpeed ( void ) const inline ◆ GetSelected() bool OpenGLRenderer::GetSelected ( int x, int y, unsigned int * name )Definition at line 800 of file opengl_renderer.cpp.
References Display(), i, n, NewView(), NO_NAME, pickBufSize, selectBuf, selectMode, selectX, selectY, and WARNINGMSG.
Referenced by Cn3DGLCanvas::OnMouseEvent().
◆ HasASNViewSettings() bool OpenGLRenderer::HasASNViewSettings ( void ) const inline ◆ Init() void OpenGLRenderer::Init ( void ) const ◆ IsFrameEmpty() bool OpenGLRenderer::IsFrameEmpty ( unsigned int frame ) const private ◆ LoadFromASNViewSettings() bool OpenGLRenderer::LoadFromASNViewSettings ( const ncbi::objects::CCn3d_user_annotations & annotations ) ◆ MyGluCylinder() void OpenGLRenderer::MyGluCylinder ( double baseRadius, double topRadius, double height, int slices, int stacks ) private ◆ MyGluDisk() void OpenGLRenderer::MyGluDisk ( double innerRadius, double outerRadius, int slices, int loops ) private ◆ MyGluSphere() void OpenGLRenderer::MyGluSphere ( double radius, int slices, int stacks ) privateDefinition at line 258 of file opengl_renderer.cpp.
References a, ERRORMSG, i, MAC_GL_SETCOLOR, n, N, PI, r(), unitZ, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
◆ NewView() void OpenGLRenderer::NewView ( double eyeTranslateToAngleDegrees =0.0
) const
Definition at line 388 of file opengl_renderer.cpp.
References cameraAngleRad, cameraClipFar, cameraClipNear, cameraDistance, cameraLookAtX, cameraLookAtY, DegreesToRad(), Vector< T >::length(), Vector< T >::normalize(), projectionType, RadToDegrees(), selectMode, selectX, selectY, stereoOn, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by CenterView(), ChangeView(), Display(), EnableStereo(), ExportPNG(), GetSelected(), Cn3DGLCanvas::OnSize(), Messenger::ProcessRedraws(), ResetCamera(), and RestoreSavedView().
◆ PopMatrix() void OpenGLRenderer::PopMatrix ( void ) ◆ PushMatrix() void OpenGLRenderer::PushMatrix ( const Matrix * xform ) ◆ RecreateQuadric() void OpenGLRenderer::RecreateQuadric ( void ) const ◆ RenderTransparentSpheres() void OpenGLRenderer::RenderTransparentSpheres ( void ) private ◆ ResetCamera() void OpenGLRenderer::ResetCamera ( void )Definition at line 549 of file opengl_renderer.cpp.
References cameraAngleRad, cameraClipFar, cameraClipNear, cameraDistance, cameraLookAtX, cameraLookAtY, StructureSet::center, DegreesToRad(), StructureSet::maxDistFromCenter, NewView(), PI, StructureSet::rotationCenter, structureSet, viewMatrix, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by CenterView(), StructureWindow::OnAdjustView(), and RestoreSavedView().
◆ RestoreSavedView() void OpenGLRenderer::RestoreSavedView ( void )Definition at line 1876 of file opengl_renderer.cpp.
References cameraAngleRad, cameraClipFar, cameraClipNear, cameraDistance, cameraLookAtX, cameraLookAtY, initialViewFromASN, NewView(), ResetCamera(), StructureSet::rotationCenter, Vector< T >::Set(), structureSet, and viewMatrix.
Referenced by AttachStructureSet(), ExportPNG(), and StructureWindow::OnAdjustView().
◆ SaveToASNViewSettings() bool OpenGLRenderer::SaveToASNViewSettings ( ncbi::objects::CCn3d_user_annotations * annotations )Definition at line 1827 of file opengl_renderer.cpp.
References cameraAngleRad, cameraClipFar, cameraClipNear, cameraDistance, cameraLookAtX, cameraLookAtY, initialViewFromASN, StructureSet::rotationCenter, structureSet, viewMatrix, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by CenterView(), and StructureSet::SaveASNData().
◆ SetColor() void OpenGLRenderer::SetColor ( EColorAction action, int =0
, double red = 0.0
, double green = 0.0
, double blue = 0.0
, double alpha = 1.0
) private
Definition at line 903 of file opengl_renderer.cpp.
References Color_MostlyOff, Color_Off, Color_Specular, eResetCache, ERRORMSG, eSetCacheValues, eSetColorIfDifferent, eUseCachedValues, and highlightsOn.
Referenced by Construct(), ConstructLogo(), DrawAtom(), DrawBond(), DrawHelix(), DrawLabel(), DrawStrand(), RenderTransparentSpheres(), and StartDisplayList().
◆ SetGLFont() bool OpenGLRenderer::SetGLFont ( int firstChar, int nChars, int fontBase ) ◆ ShowAllFrames() void OpenGLRenderer::ShowAllFrames ( void ) ◆ ShowFirstFrame() void OpenGLRenderer::ShowFirstFrame ( void ) ◆ ShowFrameNumber() void OpenGLRenderer::ShowFrameNumber ( int frame ) ◆ ShowLastFrame() void OpenGLRenderer::ShowLastFrame ( void ) ◆ ShowNextFrame() void OpenGLRenderer::ShowNextFrame ( void ) ◆ ShowPreviousFrame() void OpenGLRenderer::ShowPreviousFrame ( void ) ◆ StartDisplayList() void OpenGLRenderer::StartDisplayList ( unsigned int list ) ◆ cameraAngleRad double OpenGLRenderer::cameraAngleRad private ◆ cameraClipFar double OpenGLRenderer::cameraClipFar private ◆ cameraClipNear double OpenGLRenderer::cameraClipNear private ◆ cameraDistance double OpenGLRenderer::cameraDistance private ◆ cameraLookAtX double OpenGLRenderer::cameraLookAtX private ◆ cameraLookAtY double OpenGLRenderer::cameraLookAtY private ◆ currentDisplayList unsigned int OpenGLRenderer::currentDisplayList private ◆ currentFrame unsigned int OpenGLRenderer::currentFrame private ◆ displayListEmpty std::vector< bool > OpenGLRenderer::displayListEmpty private ◆ FIRST_LIST const unsigned int OpenGLRenderer::FIRST_LIST = 1 static ◆ FONT_BASE const unsigned int OpenGLRenderer::FONT_BASE = 100000 static ◆ glCanvas ◆ initialViewFromASN ncbi::CRef< ncbi::objects::CCn3d_view_settings > OpenGLRenderer::initialViewFromASN private ◆ NO_LIST const unsigned int OpenGLRenderer::NO_LIST = 0 static ◆ NO_NAME const unsigned int OpenGLRenderer::NO_NAME = 0 static ◆ rotateSpeed double OpenGLRenderer::rotateSpeed private ◆ selectMode bool OpenGLRenderer::selectMode private ◆ selectX int OpenGLRenderer::selectX private ◆ selectY int OpenGLRenderer::selectY private ◆ stereoOn bool OpenGLRenderer::stereoOn private ◆ structureSetDefinition at line 170 of file opengl_renderer.hpp.
Referenced by AddTransparentSpheresForList(), AttachStructureSet(), CenterView(), ChangeView(), ComputeBestView(), Construct(), Display(), IsFrameEmpty(), ResetCamera(), RestoreSavedView(), SaveToASNViewSettings(), ShowAllFrames(), ShowFirstFrame(), ShowFrameNumber(), ShowLastFrame(), ShowNextFrame(), and ShowPreviousFrame().
◆ transparentSphereMap SphereMap OpenGLRenderer::transparentSphereMap private ◆ transparentSpheresToRender ◆ viewMatrix double OpenGLRenderer::viewMatrix[16] privateThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4