Log of /trunk/graf3d/gl/src/TGLScene.cxx
Parent Directory
Revision
46574 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 16 17:56:15 2012 UTC (2 years, 3 months ago) by
matevz
File length: 50122 byte(s)
Diff to
previous 43018
Move enums away from global namespace:
- EOverlap is now in namespace Rgl;
- EClipType is now in class TGLClip;
- EPosition and EManipType were not used and have been removed.
EGLCoordType and EGLPlotType are left in top-level. In these two enums all
names begin with kGL so there is less chance for collision.
Revision
43018 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 16 03:13:21 2012 UTC (2 years, 11 months ago) by
matevz
File length: 50092 byte(s)
Diff to
previous 42974
Rewrite highlight rendering so that the stencil-control logic lives on the
TGLScene level, within new function TGLScene::RenderHighlight(). A set of new
functions called RenderXXXForHighligt() was introduced in TGLViewer/Scene.
This works around the problems with stencil buffer
coherency during multi-pass rendering with multiple clipping planes.
Some tweaking was necessary in TEve-GL classes that implement specialized
DrawHighlight() virtual from TGLLogicalShape.
Revision
42974 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Feb 12 07:22:45 2012 UTC (2 years, 11 months ago) by
matevz
File length: 48334 byte(s)
Diff to
previous 37397
Generalize selection handling for scenes:
- By adding TGLLogicalShape* to TGLSelectRecord the scene sub-classes now have
the ability to lie pretty badly to TGLEventHandler about what actually got
selected and thus achieve great flexibility in managment of scenesobject
collections that do not conform to standard ROOT / EVE / TPad paradigms.
Generalize rendering order and selection/highlight handling.
- Rendering order of opaque/transparent and non-selected/selected objects can
be set via TGLRnrCtx::RenderOrder(), enum ERenderOrder.
- Selection of transparent objects via TGLRnrCtx::SelectTransparents(), enum
ESelectabilityOfTransparents.
- Rendering of highlight halo can be controlled via:
- TGLRnrCtx::SetHighlightDepthRangeOffset(Float_t);
- TGLRnrCtx::SetHighlightedObjectDepthRangeOffset(Float_t);
This should really be rewritten either to use stencil buffer or shaders.
Revision
37397 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 8 13:54:23 2010 UTC (4 years, 1 month ago) by
matevz
File length: 48261 byte(s)
Diff to
previous 34867
Optimizations based on Druid callgrind dump sent by Manqi.
* TGLBoundingBox:
Use TGLVertex3[8] instead of std::vector<> for member that always
has 8 elements. Caused pointless allocations and fragmentation.
* TGLScene:
In CalcBoundingBox() avoid creating a bounding box temporary in a
loop over all elements -- use const& instead.
* TGLCamera:
Fix for changes in TGLBoundingBox.
Revision
32782 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 26 14:39:42 2010 UTC (4 years, 10 months ago) by
matevz
File length: 48187 byte(s)
Diff to
previous 32335
* TEveCalo3DGL
Disable writing the depth buffer by the calo grid but
keep it being drawn after the towers.
* TGLRnrCtx
Add member
Float_t fShapePixSize;
to allow scene to communicate size of the object to the renderer.
This only works if the object does not use central display-lists.
Revision
32335 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 12 15:02:40 2010 UTC (4 years, 11 months ago) by
matevz
File length: 48136 byte(s)
Diff to
previous 32334
* TGLSceneBase
Do not set camera of rnr-ctx in PreRender().
* TGLScene
Fix compilation warning.
* TGLCameraOverlay
Remove obsolete comment.
Revision
32334 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 12 11:52:13 2010 UTC (4 years, 11 months ago) by
matevz
File length: 48135 byte(s)
Diff to
previous 29676
* TGLScene
Optimize DestroyPhysicals() by looping over logical shapes and destroying
all assigned physical shapes via TGLLogicalShape::DestroyPhysicals().
This significantly speeds-up full scene repaints when many replicas of the
same logical volume are present (e.g. when showing geometry).
Change signature -- remove unused arguments.
* TGLScenePad
Modify for changed signature of TGLScene::DestroyPhysicals().
* TGLLogicalShape
In DestroyPhysicals() set fFirstPhysical to null.
This used to be only called from destructor.
* TGLCameraOverlay
Mark a rare bug (existing before) -- requires further investigation.
White-space changes.
Revision
29676 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 4 16:18:07 2009 UTC (5 years, 5 months ago) by
matevz
File length: 48994 byte(s)
Diff to
previous 28197
Add support for control over viewer-global point-size and line-width
scaling. Additionally, allow wireforame and outline line widths to be
specified separately (on viewer / scene / scene-info level).
This will allow for scaling of pixel-based objects (lines and points) when
saving of screenshots with very high resolution is
implemented.
Basic support is impemented across TGLViewer, TGLScene, TGLRnrCtx and
TGLUtil.
Classes that used glPointSize and glLineWidth were modified to call
corresponding static function in TGLUtil class.
Controls were added to TGLViewerEditor (under Style tab).
Revision
28197 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 14 13:59:27 2009 UTC (5 years, 9 months ago) by
matevz
File length: 48287 byte(s)
Diff to
previous 26367
Merge the following revisions from the fireworks branch:
-r 27692:27867
-c 27876
-r 28012:28187
================================================================================
27693
TEveCalo:
Set bounding box when calo data empty.
TEveCaloLegoGL:
TGLAxisPainter:
Draw axis title in TGLAxisPainter::PaintAxis().
--------------------------------------------------------------------------------
27694
Forget to check-in this file in revision 27693.
--------------------------------------------------------------------------------
27695
Don't draw frame and call TGLAxisPainter::Paint() if calo data empty.
--------------------------------------------------------------------------------
27699
Fix issues reported by valgrind.
--------------------------------------------------------------------------------
27758
Return viewer in TEveViewer::SpawnGLViewer and TEveViewer::SpawnGLEmbeddedViewer().
--------------------------------------------------------------------------------
27767
Unset event handler when destroying TGLWidget. This is important in case destruction of TGLWidget is called with timeout.
--------------------------------------------------------------------------------
27840
Add possibility to create different icon boxes in
TEveCompositeFrame. Use static function pointer fgIconBarCreator to change default behavior.
Remove oboslete function TEveCompositeFrame::ReplaceIconBox().
--------------------------------------------------------------------------------
7856
Bug fix: Get font size calculating projected axis length at the Z-title position.
--------------------------------------------------------------------------------
27857
Move to real world coordinates. Add line-set for test.
--------------------------------------------------------------------------------
27867
TGLViewer:
Add function:
void ResetInitGL()
This is needed if GL-context is destroyed from outside.
Call it from derived classes when creating and destroying GL-widget.
--------------------------------------------------------------------------------
27876
In line set add possibility to disable depth test, i.e. draw lines/markers in front.
--------------------------------------------------------------------------------
28013
Fix memory leak in TEveCalo2D.
--------------------------------------------------------------------------------
28048
In HandleCrossing() ignore grab and ungrab events. Several window managers produce them nowadays (fvwm2, x-on-mac, sawfish).
--------------------------------------------------------------------------------
28050
Simplify macro.
--------------------------------------------------------------------------------
28106
URL: http://root.cern.ch/viewcvs?rev=28106&root=root&view=rev
Log:
Add data-members and accessors for controlling brightness of front,
side and speulcar lights.
--------------------------------------------------------------------------------
28114
TGLPShapeObjEditor
==================
Remove obsolete data-members and enum entries.
TGLUtil
=======
New class TGLColor - using this will simplify color management in
TGLViewer and TGLRnrCtx.
TEveUtil
========
Simplify implementation of TEveUtil::ColorFromIdx() functions.
--------------------------------------------------------------------------------
28144
Add dtor for TGLColor.
--------------------------------------------------------------------------------
28161
URL: http://root.cern.ch/viewcvs?rev=28161&root=root&view=rev
Log:
Extend window management demo.
--------------------------------------------------------------------------------
28162
Add support several GL color-sets - each defines colors for background,
foreground, outline, markup and for outlines of selected and
highlighted objects.
GL/
===
TGLUtil - add new class TGLColorSet.
TGLRnrCtx - add color-set stack.
TGLViewer - create two color-sets by default - for light and dark
background. These can be switched with the 'e' key now.
TGLScene - decrease polgon-offset for outline-mode fill-pass from (1,
1) to (0.5, 0.5) which is sufficient.
Use/support color-set functionality in other modified classes.
EVE/
====
TEvePolygonSetProjectedGL - skip outline pass.
TEveProjectionAxesGL - skip outline pass and slightly widen the depth
range so that the text is visible in outline mode, where
polygon-offset is applied during the fill-pass.
--------------------------------------------------------------------------------
28168
Add support for a global GL color-set shared among several (all)
viewers.
TGLViewer - add static data-members and functions to handle global
color-set. Add methods that allow switching between global/private
color-sets for a given viewer.
TGLViewerEditor - Disable backgound-color widget when the viewer uses
global color-set.
TGLCameraOverlay - use foreground color for some markup rendering.
In two tutorials use the new API for setting of the background color.
--------------------------------------------------------------------------------
28187
Put back the old method for setting background color and mark it as deprecated.
Revision
26367 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 21 18:08:30 2008 UTC (6 years, 2 months ago) by
matevz
File length: 48285 byte(s)
Diff to
previous 26274
Merge revisions 26280:26327 from the fireworks branch.
26281
=====
- TGLScenePad: replace static variable with a data-member. Fix comments.
26304
=====
- TEveProjectionAxesGL: fix index out of bounds error reported by valgrind.
26306
=====
- TGLScene, TGLScenePad: better comments, consistent whitespace.
- TEveElement: add method DestroyOrWarn(): original Destroy() method is exception throwing.
- TEveScene: delete GL-scene and pad in destructor; add ownership information to class-docs.
- TEveSceneList: add method DestroyScenes().
- TEveViewer: add ownership information to class-docs.
- TEveManager: delete scenes, scene-list, viewers and viewer-list in destructor.
26325
=====
TEveTrackPropagator: implement the following overrides of virtual functions:
- TEveElement::CheckReferenceCount() - take into account references from TEveRefBackPtr;
- TEveRefBackPtr::OnZeroRefCount() - call CheckReferenceCount().
26327
=====
Remove trailing whitespace in eve/ and gl/.
Revision
26274 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 18 20:32:48 2008 UTC (6 years, 2 months ago) by
matevz
File length: 48258 byte(s)
Diff to
previous 25950
Merge from the fireworks branch the following revisions:
26053
=====
TEveCalo, TGLFontManager - Fix memory leaks.
26167
=====
TEveLegoOverlay - Add possiblity to draw a header text in top right corner of window.
26254
=====
TGLSAViewer - Properly clean up the TGMenuBar.
TEveManager - Add static method Terminate() to shutdown the manager.
26267
=====
TGLScene - In FindLogicalSmartRefresh() delete the shape if the classes don't
match. This was a (rare) memory leak.
TEveBoxSetGL - Consistent punctuation.
26273
=====
TEveManager - Add method 'void CloseEveWindow()' and connect it to the
'CloseWindow()' signal of the main browser.
Revision
25950 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 24 21:34:34 2008 UTC (6 years, 3 months ago) by
matevz
File length: 48233 byte(s)
Diff to
previous 23869
TGLSceneBase, TGLScene, TGLSceneInfo
Move 'Bool_t fUpdateTimeouted' from TGLScene to TGLSceneInfo.
Remove 'Bool_t fForceUpdateSI from TGLSceneBase.
This was potentialy wrong ... if a scene was put into several
viewers.
TGLEventHandler
When scrolling via mouse-wheel or resizing the viewing area
call redraw via timer to group several events in a sequence
into a single redraw.
Avoid selection in handle-motion and in timer callback when a
redraw is already pending.
TGLViewer
Do not draw when viewing area's width or hight <= 1.
TGLWidget
Pass configure-notify event to TGFrame as well.
alice_esd_split.C
Do not resize to almost-full-screen as it doesn't work with
multi-screen displays (can pass optional argument to enforce
it).
Revision
23140 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 11 11:01:39 2008 UTC (6 years, 9 months ago) by
rdm
File length: 48312 byte(s)
Diff to
previous 23087
move the following directories to "graf2d":
asimage, freetype, gpad, graf, postscript, qt, win32gdk, x11, x11ttf
move the following directories to "graf3d":
eve, ftgl, g3d, gl, x3d
Revision
23087 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 9 14:10:56 2008 UTC (6 years, 9 months ago) by
rdm
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 48312 byte(s)
Diff to
previous 22539
From Alja, Bertrand and Matevz - merged branches/dev/fireworks 22550:23082.
Major changes imported by this merge are:
gl/
====
- reorganization of scene rendering in TGLViewer - render opaque
objects from all scenes first, then all transparent ones;
- improve saving of images from the GL-viewer so that the dialog boxes
and other windows do not result in black areas on the saved image;
- improved management of FTGL fonts accross GL contexts.
eve/
====
- new classes for visualization of calorimeter data in lego mode;
- allow fixed scale beyond given radius for fish-eye projections.
Revision
22539 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Mar 8 14:36:37 2008 UTC (6 years, 10 months ago) by
rdm
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 45575 byte(s)
Diff to
previous 21702
From Alja, Bertrand & Matevz: merged branches/dev/fireworks 21757:22514.
This includes:
- development for event-displays of ALICE and CMS since 5.18 in eve/,
gl/ and gui/;
- many new tutorials and demos for eve/;
- fix in TQObject to support class-signals from all base-classes.
Revision
21702 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 14 18:55:14 2008 UTC (7 years ago) by
matevz
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 44953 byte(s)
Diff to
previous 20882
In TGLScene/TGLViewer add two timeouts for high-quality and
low-quality (during rotation etc) scene rendering. Expose both time
limits via TGLViewerEditor.
In TGLCamera::OfInterest() remove redundant test for physical-shape
bbox volume and optimize the remaining bbox diagonal length test.
Remove blanks from the eols.
Revision
19153 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jun 23 21:23:22 2007 UTC (7 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 42545 byte(s)
Diff to
previous 19049
From Matevz:
1. TGLViewer performs internal loop on pad-primitives.
2. Timur: generalization of gl-plot-painters to allow external access.
3. Support usage of gl-plot-painters in gl-viewer.
4. Provide a default gl-sharing context for resource optimization.
Revision
19049 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 18 07:02:16 2007 UTC (7 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 42483 byte(s)
Diff to
previous 19004
From Matev and Timur:
Timur:
1. Allow unique identification of shared GL contexts via
TGLContextIdentity class.
Matevz:
1. Improved overlay selection handling.
2. Perform GL context check before rendering, possibly invalidating
registered display-lists.
3. Minimize updates for window expose and resize events.
Revision
19000 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 11 19:56:34 2007 UTC (7 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 41113 byte(s)
Diff to
previous 18909
From Matevz:
Major restructuring of GL viewer-scene relationship (Matevz)
===================================================
The main idea was to generalize current GL infrustructure so that the
following features can be done in the future:
1. Full pad rendering via GL including 3D histo/func painters and 2D graphics.
2. Implementation of GL canvas (with independent viewers serving as pads).
3. Multi-view event-visualization front-end.
4. Inclusion of external scenes (non-ROOT-gl) in ROOT viewer.
Rendering of ROOT scenes in external GL frameworks.
Changes on the code level
-------------------------
0. Extend current scene/viewer classes into a 2-level class hierarchy.
New classes TGLViewerBase and TGLSceneBase.
1. Allow scenes to be shared among viewers. View-specific scene-cache
needs to be kept at the viewer side.
2. Viewer now manages a list of scenes. It is possible to put together
a combination of scenes (e.g. one showing geometry, another one tracks
and yet another clusters). Each scene can define its own clipping object.
3. Provide API for fine-grained control over rendered object removal,
creation and update. This allows for efficient scene-updates.
4. Disentangle selection, clipping and other markup objects from
within viewer-scene singleton.
New classes TGLClipSet, TGLManipSet.
6. Disentangle selection management.
7. Separate overlay rendering to allow any number of active GL-GUI
elements (like manipulators are now).
New classes TGLOverlayElement.
8. Trailing white space has been removed in all files.
Restructure low-level interface to OpenGL (Timur)
=========================================
1. Allow sharing GL resources among viewers.
2. Do not bind GL-output (windowed or offscreen) to ROOT GUI.
New classes TGLContext, TGLFormat, TGLWidget.
This oboletes TGLKernel and TVirtualGL classes.
Revision
16452 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 5 18:19:09 2006 UTC (8 years, 3 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 56564 byte(s)
Diff to
previous 16090
From Matevz and Timur:
* gl/inc/TGLViewer.h:
* gl/src/TGLViewer.cxx:
Added customizations of update/redraw behaviour:
1) flag 'Bool_t fIgnoreSizesOnUpdate' that tells the viewer
not to check the size of the object in AddObject();
2) member 'Color_t fClearColor' that allows user to select the
background color;
3) method 'void UpdateScene()' thet forces the scene update via
calling 'fPad->Paint()';
4) method 'virtual void RefreshPadEditor(TObject* changed=0)' that
allows updates to be sent to the built-in editor when the
internal state changes.
* gl/inc/TGLSAViewer.h:
* gl/src/TGLSAViewer.cxx:
Implemented virtual 'TGLSAViewer::RefreshPadEditor()'. In all
calls to 'TGedEditor::SetModel()' replaced third argument 'Int_t
event' from 'kButton1' to 'kButton1Down'.
* gl/inc/TGLViewerEditor.h:
* gl/src/TGLViewerEditor.cxx:
Added widgets controlling 'fClearColor', 'fIgnoreSizesOnUpdate',
'fResetCamerasOnUpdate' and 'fResetCameraOnDoubleClick'; added
buttons for invoking 'UpdateScene()' and 'CameraHome()' methods.
* gl/src/TGLScene.cxx:
Removed code setting the glClearColor in 'Draw()'.
Revision
16090 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 23 14:39:40 2006 UTC (8 years, 5 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 56797 byte(s)
Diff to
previous 14952
From Matevz Tadel:
1) Implementation of two-level (secondary) selection
Rendering objects can provide a new level of interactivity, for
example a TPointSet3D holding a set of clusters can attach a pointer
to original cluster to each point and receive notifications when a
specified cluster was clicked.
Secondary selection is activated by Control-Left clicking into the
GL window.
2) Improve control over camera-reset behaviour
Allow user to prevent camera reset on scene update and
double-click.
3) Improvements in TPointSet3D(GL)
Detailed ChangeLog
==================
* base/inc/TVirtualViewer3D.h:
Added virtual methods 'void ResetCameras(){}' and 'void
ResetCamerasAfterNextUpdate(){}'.
* gl/inc/TGLScene.h:
* gl/src/TGLScene.cxx:
Implemented two-level selection. It is enabled for next selection
pass by calling ActivateSecSelect().
DoSelect() does not change the selected object but only indicates
which object has been selected by setting new member
'TGLPhysicalShape *fSelectionResult'. Caller (TGLViewer) must call
new method 'void ApplySelection()' to actually change the selected
object to the last selection result.
Changed declaration of selection buffer from being a static varable
within DoSelect() to data-member. This allows post-processing of
selection records needed by two-level selection.
* gl/inc/TGLCamera.h:
* gl/inc/TGLOrthoCamera.h:
* gl/inc/TGLPerspectiveCamera.h:
* gl/src/TGLCamera.cxx:
* gl/src/TGLOrthoCamera.cxx:
* gl/src/TGLPerspectiveCamera.cxx:
Added Bool_t argument with default value to:
virtual void TGLCamera::Setup(const TGLBoundingBox & box, Bool_t
reset=kTRUE) = 0;
By setting it to false one can change camera parameters for new
scene bounding-box without repositioning the camera.
Added 'Bool_t checkSize' argument to OfInterest().
This is relevant for marker-classes which can have small
volume/length but are still visible as they are rendered in
pixel-coordinates. Value of this argument is needed in TGLScene
(DestroyPhysicals) and TGLViewer (AddObject). It is obtained by
calling virtual method TGLLogicalShape::IgnoreSizeForOfInterest().
This method returns false by defalut and is overriden in
TGLPolyMarker and TPointSet3DGL.
* gl/inc/TGLViewer.h:
* gl/src/TGLViewer.cxx:
Added controls for camera-reset behaviour.
Data-members: 'Bool_t fResetCamerasOnUpdate', 'Bool_t
fResetCamerasOnNextUpdate', 'Bool_t fResetCameraOnDoubleClick'.
Methods: 'ResetCameras()', 'ResetCamerasAfterNextUpdate()',
'ResetCurrentCamera()'.
Added an argument to 'void PostSceneBuildSetup(Bool_t resetCameras).
Added Bool_t return-value to RequestSelect(). It returns true if
result of the selection is different then fSelectedPhysical.
Added method ApplySelection() to interface with TGLScene
selection state. This is called from event-handling functions in
TGLViewer.
Added key-binding for 'Home': ResetCurrentCamera().
* gl/inc/TGLSAViewer.h:
* gl/src/TGLSAViewer.cxx:
Added description of new functionality to fgHelpText.
MSVC was complaining about fgHelpText being too long: I split it
into fgHelpText1 and fgHelpText2.
* gl/inc/TGLDrawFlags.h:
* gl/src/TGLDrawFlags.cxx:
Added members 'Bool_t fSelection' and 'Bool_t
fSecSelection' allowing passing of current selection state to
renderers. This is needed to allow different render-paths during
(secondary) selection.
We should consider passing TGLScene* and/or TGLViewer* down to
DirectDraw() of individual renderers.
* gl/src/TGLDrawable.cxx:
In ShouldCache() return false if secondary selection is in progress.
* gl/src/TGLPhysicalShape.cxx:
Handle new members in TGLDrawFlags.
* gl/inc/TGLLogicalShape.h:
* gl/src/TGLLogicalShape.cxx:
Added three new functions:
1) virtual Bool_t SupportsSecondarySelect() const { return kFALSE; }
This is called by TGLScene::DoSelect() to check is object that was
the result of primary selection supports secondary selection.
2) virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
It is called back from TGLViewer after successful secondary
selection. As the object that does the rendering is the only one
that actually knows how the object sub-parts were named it has
to interpret the results.
Both of these should be overriden in classes that support
secondary selection, for example see TPointSet3DGL.
3) virtual Bool_t IgnoreSizeForOfInterest() const { return kFALSE; }
Signals to TGLScene and TGLViewer that volume/lenght of this
class' bounding box should not be considered when checking if
objects of this class are of interest to current camera.
* gl/inc/TGLObject.h:
* gl/src/TGLObject.cxx:
Changed second argument of function:
Bool_t SetModelCheckClass(TObject* obj, const Text_t* classname);
to 'TClass* cls'. This is much more efficient.
* g3d/inc/TPointSet3D.h:
* g3d/src/TPointSet3D.cxx:
Added support for per-point designations (one TObject* per point;
via casting it can be set to anything).
New virtual method 'void PointSelected(Int_t n)' that is called
back after successful secondary selection in TGLViewer (via
virtual TGLLogicalShape::ProcessSelection()).
* gl/inc/TPointSet3DGL.h:
* gl/src/TPointSet3DGL.cxx:
Added support for per-point selection. Point-sizes are taken into
account during selection (by modifying the projection
matrix).
Implemented 'virtual Bool_t TGLDrawable::ShouldCache()' to disable
caching when in primary selection (point-size improvements).
Cross-like marker types are now supported to some extent.
Improved structure of rendering code.
Override 'virtual Bool_t TGLLogicalShape::IgnoreSizeForOfInterest()'
to return true.
Multiply TAttMarker::GetMarkerSize() by 5 before applying.
* gl/inc/TGLPolyMarker.h:
Override 'virtual Bool_t TGLLogicalShape::IgnoreSizeForOfInterest()'
to return true.
Revision
14580 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 7 08:43:59 2006 UTC (8 years, 9 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 54498 byte(s)
Diff to
previous 14213
From Matevz Tadel:
Introduce a new set of classes dedicated to event visualisation.
TGLObject: base-class for direct GL renderers
TAttBBox: interface, helps maintain/calculate bounding-box
needed for TGLObject (see TPointSet3D and TPointSet3DGL)
TPointSet3D: a demo class for direct GL rendering
TPointSet3DGL:
Mods in existing classes to interface the new classes
Revision
14072 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 21 15:34:44 2006 UTC (8 years, 11 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 52632 byte(s)
Diff to
previous 14015
From Richard:
i) Fix outline drawing - blackwire frame is half of opacity of diffuse
colors.
ii) Now outline on back faces - so get a proper outline round any
clipped edge.
iii) Fix silly timeout calc error.
Revision
14015 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 9 09:56:20 2006 UTC (8 years, 11 months ago) by
couet
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 52379 byte(s)
Diff to
previous 14004
- From Richard:
Improve clipping in GL viewer. Now show back (inner) faces when clipped,
with two sided lighting. Not as good as proper CSG op to cap clipped
solids - but looks better than them being invisible.
Also seems to improve performance which is suprising .....
Revision
14004 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 8 10:49:26 2006 UTC (8 years, 11 months ago) by
couet
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 51254 byte(s)
Diff to
previous 13941
From Richard:
Fixes for wireframe and outline drawing:
i) Both very much slower (up to 10x) than normal filled polygons -
incorrectly calling DirectDraw() bypassing the DL caching.
ii) Outline style did expensive repeated GL state swaps for every
physical shape draw.
iii) Only TGLFaceSet supported outline draw style.
Now:
i) Wireframe roughly same speed (or faster) than filled (~10x faster)
ii) Outline takes ~ filled polygons + wireframe times - as would expect
(about 5x faster).
iii) All shapes support outline style.
Exatct speed gain hardware dependent - but even software GL faster.
Also tidied up draw style code - created new TGLDrawFlags class to wrap
style + LOD hint into.
Revision
13936 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 26 11:59:42 2006 UTC (8 years, 11 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 54404 byte(s)
Diff to
previous 13860
From Richard:
Implement manipulators (translate/scale/rotate) for all shapes in
viewer (previously only clip shapes could use them).
Behaviour:
i) Single selection in viewer - either a normal / clip shape or none.
Current manipulator is attached (and shown) when attached to selection.
ii) Normal viewer shapes are selected using Shift+Left Mouse button (and
have bounding box drawn).
iii) Clip shapes are shown/selected by checking 'Show/Edit' option on
the Scene/Clipping tab of the GUI.
iv) Any exisiting (normal/clip) selection is cleared when making new
choice.
v) (Transparent) clip shapes cannot be selected (picked) directly in the
viewer - normal shape override this.
Rotation properties of shapes are not reflected in GUI currently.
Revision
13860 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 18 16:57:59 2006 UTC (9 years ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 47177 byte(s)
Diff to
previous 13821
From Richard:
Further GL / LOD performance improvements:
i) Shape can indicate LOD support by axis. For tubes TGLCylinder only X+
Y supported. Calc LOD hint based on larger projection of Z faces of
bounding box, avoiding excessive LOD for long tubes.
ii) Only test time limited draws every 50 objects to avoid excessive
timing costs.
Revision
13821 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 11 13:44:39 2006 UTC (9 years ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 44358 byte(s)
Diff to
previous 13781
From Richard:
i) Modify TGLCylinder and subclasses to repsond to LOD (quality) hint.
Meshes are created, draw and deleted in DirectDraw(). After first draw
this is captured into GL display list so only done once.
Gives 2-3 times speed up in typical cases.
Note: All tubes (TGLCylinder) shapes adjust tesselation round the radius
(x/y axis) only - not along the tube length (z). Currently we calculate
LOD hint based on projection of shape bounding box onto screen - so this
means many typical detector tubes are requested to draw at excessive
LOD/quality if long c.f. radius (as most are). Will be fixed shortly.
ii) Add kLODPixel for all shapes < pixel projected size - draws a pixel.
iii) Test script for $ROOTSYS/tutorials/glViewerLOD.C, which creates
random/ordered collecton of spheres/tubes to test the GL LOD
performance.
Revision
13781 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 5 15:11:27 2006 UTC (9 years ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 44215 byte(s)
Diff to
previous 13656
From Richard:
Performance improvements:
i) All drawables now implement SuportsLOD() method to test if they can
respond to LOD (tesselation) quality hint. If not the somewhat costly
projection size calculation can be skipped.
ii) SupportLOD() means low level OpenGL display caching can be enabled
for all shapes (previously only spheres). For shapes which don't support
LOD we create single cache entry using shape ID and kUnsupportedLOD
flag.
Draw times reduced - varries from 10% (Mesa software only GL - no proper
display lists) to about 250% on fast GL card with decent on card memory.
Revision
13656 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 12 15:28:32 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 44117 byte(s)
Diff to
previous 13599
From Richard:
Fix problem found with TH3 painting via g3d's TMarker3DBox to GL
Viewer.
Now GL viewer will take all objects if passed with fID == 0 - i.e. does
not test to see if already cached (as previously). In this case we force
acceptance of all objects offered to viewer as we can't rebuild the
scene.
Updated TMarker3DBox so when recycling object via static method, fID is
zero.
Revision
13250 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 16 16:41:59 2005 UTC (9 years, 2 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 36044 byte(s)
Diff to
previous 13005
From Richard:
Update to axes in GL viewer - in response to requests from Witold
Pokorski.
i) Added options to draw axes through origin (not depth clipped), as
well at edge (depth clipped).
ii) Added option to show a single reference marker (orange sphere) at
location - for debugging geometries.
iii) Improved draw quality of axes - similar to manipulators.
iv) These moved to new "Guides" tab under "Scene" for GUI.
Revision
13005 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 24 14:49:33 2005 UTC (9 years, 3 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 32692 byte(s)
Diff to
previous 12926
From Richard:
i) Add rotation manipulator.
ii) Allow direct manipulation of clipping plane - rotate/translate.
Cannot scale - makes no sense.
Note:
iii) Rotation interaction requires some improvement - difficult when
ring is almost parallel with eye line of camera.
iv) Still need to extend for all selected objects - requires some
internal rearrangement of TGLScene/TGLViewer
Revision
12892 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 3 15:19:35 2005 UTC (9 years, 3 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 32685 byte(s)
Diff to
previous 12540
From Richard:
First implementation for interactive clipping, using OpenGL clip planes.
Initially we have plane & box - others later. See Help for description.
Known Bugs/Issues:
All in GUI:
i) Edit box takes keyboard focus and does not return to viewer pane when
clicked in. Hence all keys in viewer break - an existing general viewer
problem.
ii) Initial layout does not correctly hide the plane/box properties
panels, or scale for V side scroll bar.
Missing Features:
iii) CSG final pass and/or solid cappings.
iv) Can't rotate the box - need a TGLRotManip class soon.
v) Should be able to show and manipulate plane in similar fashion as
box.
vi) Trans/scale/rotate manipulators should be availible for any selected
object.
Revision
12469 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 12 07:38:14 2005 UTC (9 years, 5 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 27930 byte(s)
Diff to
previous 12459
From Richard Maunder:
i) Fix transparent object picking - now pick opaque objects first, and
if none a transparent one (restore previous behaviour).
ii) Ensure transparent selected object is only drawn once.
iii) Allocate pro rata time for transparent drawing - previous
assumption that trans << opaque was invalid
iv) Added some extra debug info for gDebug >= 4, listing draw counts for
shape types (TGLCylinder, TGLFaceSet etc)
Revision
12459 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 10 16:26:36 2005 UTC (9 years, 5 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 25535 byte(s)
Diff to
previous 12391
From Richard:
make TVirtualViewer TObject derv. so TPad can use without modifications.
Also removed last parts of TVirtualGL unrelated to context/draws so it
can be replaced with new TGLManager.
Added:
TGLSAViewer & TGLSAFrame - standalone viewer + GUI main frame.
TGLOutput for containing capture (pdf/eps output).
TX3DFrame (x3d mod) to avoid diamond TObject inheritance from GUI +
TVV3D interface
Removed: TViewerOpenGL
Revision
12281 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 8 15:39:29 2005 UTC (9 years, 6 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 24878 byte(s)
Diff to
previous 12168
From Richard:
Improvements to camera and other GL viewer components to:
i) Avoid unrequired rebuilds.
ii) Improve near/far clip plane calculations - set using current
projected scene limits. Reduces depth buffer precision problems - seen
particularly on MESA software GL.
iii) Improve bounding box overlap tests.
iv) Tidy some vector/vertex code.
Revision
12168 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 23 15:08:45 2005 UTC (9 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 24876 byte(s)
Diff to
previous 12062
From Richard
Update to GL viewer to:
i) Retain modifications/section of physical shapes across scene
rebuilds.
ii) Be a bit smarter about rebuilds:
Detect if all physicals accepted into scene - never need to rebuild in
these cases.
Only destroy physicals no longer of interest to camera.
Imporves times a bit - more work on this required to remove stalls in
viewer interaction.
Revision
12052 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 15 10:22:57 2005 UTC (9 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 25265 byte(s)
Diff to
previous 11949
From Richard maunder:
Draw Sorting: Draw objects in order of decreasing BBox size - makes
dropouts on time termianted draws less intrusive - especially on slow
cards/software only. Reduced interactive drawtime to 100msec (from
300msec).
Added scene locking + more tracing to assist with debugging -
particularly under win32 mutli-thread.
Revision
11929 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 1 12:38:25 2005 UTC (9 years, 7 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 19030 byte(s)
Diff to
previous 11880
From Richard Maunder:
"Apply to Family" color changes - update all physical shapes with same
logical.
Moving/scaling object via edit boxes or moving via Shift+Middle mouse
button.
Removed some old commented code.
Revision
11866 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Wed May 25 14:25:17 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/gl/src/TGLScene.cxx
File length: 14203 byte(s)
From Richard Maunder:
Major changes to GL viewer to support:
i) Logical/Physical shape pairings
ii) Level of detail (LOD) scheme (TGLSphere only using at present)
iii) Common display list cache
iv) Scene rebuilds for large geometries
v) Some basic interactivity improvements - draw timeouts, drop low LOD
shapes etc
vi) New camara interactions:
Left Mouse: Rotate
Middle Mouse: Truck (pan parallel to camera film plane)
Right Mouse: Side-side drag dolly/zoom
Double click any button to reset the camera.
The previous pan with arrow keys, and zoom on mouse wheel are still
supported.
Camera interaction is default in viewer. These extra camera modes mean
there are not enough mouse buttons for previous right context/select.
To select / invoke context menu use Shift+Left Button and Shift+Right
Button respectively.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.