Log of /trunk/graf3d/gl/src/TGLObject.cxx
Parent Directory
Revision
33124 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 21 20:04:42 2010 UTC (4 years, 9 months ago) by
matevz
File length: 4666 byte(s)
Diff to
previous 24444
Implement central infractructure to allow eve-elements to support
internal multiple selection and highlightning of their sub-parts.
Use this in TEveDigitSet and its sub-classes TEveQuadSet and
TEveBoxSet.
Extend GL rendering and event-handling to support these operations.
eve/
====
* TEveElement - Add 3 new functions:
virtual TString GetHighlightTooltip();
virtual void UnSelected();
virtual void UnHighlighted();
* TEveSecondarySelectable - New secondary base-class for elements
supporting internal multiple selection / highlight.
* TEveDigitSet, TEveQuadSet, TEveBoxSet
- Sub-class TEveDigitSet from TEveSecondarySelectable.
- Implement functions needed for internal selection.
- Add common base-class TEveDigitSetGL for quad and box-set GL rendering.
* TEveChunkManager - Add support for restricted iteration.
TEveChunkManager::iterator accepts set<Int_t> for that purpose.
* TEveViewer - Add functions to handle additional mouse-hover signals
from TGLViewer.
* Other classes (all GL renderers) - Changes for additional argument
to TGLLogicalShape::DrawHighlight().
gl/
===
* TGLObject - Take AlwaysSecondarySelect() into account when deciding
whether to use DL caching for given draw-pass.
* TGLLogicalShape - Add a new (optional) argument to DrawHighlight()
specifying kind of outline to use (selected or highlighted). This
allows classes with internal selection to properly render outlines
when sub-parts of an object are both selected and highlighted.
* TGLEventHandler - Proparly handle objects with internal selection /
highlight.
* TGLSelectRecord - Add flag to separate GL-selection for selection
and for highlight. This is really used by record handlers.
* TGLViewer - Add two new signal-emitting functions to properly notify
clients about changes in internal object selection:
virtual void ReMouseOver(TObject *obj, UInt_t state); // *SIGNAL*
virtual void UnMouseOver(TObject *obj, UInt_t state); // *SIGNAL*
tutorials/eve
=============
Add instructions for activation of internal selection in
TEveQuad/BoxSet.
Revision
24444 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 17:52:37 2008 UTC (6 years, 7 months ago) by
matevz
File length: 4609 byte(s)
Diff to
previous 24214
TGLRnrCtx
---------
Add new member 'Bool_t fHighlightOutline' that is set during the
outline-pass of the highlight.
TGLObject
---------
Disable use of display-lists for multi-colored objects only in the
outline pass of the highlight.
TGLPhysicalShape
----------------
Set HighlightOutline and HighlightOutline of the rnr-ctx during highlight.
Revision
24214 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 11 14:48:35 2008 UTC (6 years, 7 months ago) by
matevz
File length: 4602 byte(s)
Diff to
previous 23140
TGLObject and subclasses
-----------------------------------------
Introduce new member 'Bool_t TGLObject::fMultiColor' that specifies
whether the class uses multiple colors for its rendering. This
information is important when drawing highlight or outlines around
objects as display-lists can not be used if color-state changes are
stored in them.
With this modification most of the logick for
virtual Bool_t TGLLogicalShape::ShouldDLCache(...)
can be implemented in TGLObject version.
Most of the GL-rendering classes have been fixed to properly set the
fMultiColor state and rely on the TGLObject::ShouldDLCache().
TGLPhysicalShape
----------------
Use TGLLogicalShape::Draw() instead of DirectDraw() when drawing
highlights to allow usage of display-lists for classes that do not use
multiple colors.
TGLUtil
-------
Decrease the default draw-quality for DrawLine/Cylinder/Sphere/Disk to
10. With software rendering the previous value of 60 caused very low
refresh rates.
Introduce two inner classes TDrawQualityModifier and
TDrawQualityScaler allowing easy/safe modification of draw-quality for
the above functions.
Introduce inner class TColorLocker allowing easy/safe modification of
color-lock state.
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: 3932 byte(s)
Diff to
previous 20882
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
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/TGLObject.cxx
File length: 2806 byte(s)
Diff to
previous 16090
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
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/TGLObject.cxx
File length: 2536 byte(s)
Diff to
previous 14979
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]
Added
Fri Apr 7 08:43:59 2006 UTC (8 years, 9 months ago) by
brun
Original Path:
trunk/gl/src/TGLObject.cxx
File length: 1345 byte(s)
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
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.