Archived issue #0032183
Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
Description
It is proposed implementing AIS_LightSource::ProcessDragging() interface for rotating directional light source.
This could be done like this:
- Add sphere sensitive for a light (#0032182).
- Dynamically draw a point (cross of two lines on sphere) via HilightWithColor() method implemented for a custom Owner object. Implement IsForcedHilight() to ensure cross is updated on mouse move.
- Calculate AIS_LightSource::ProcessDragging() interface to apply rotation as a delta between points on a sensitive sphere.
This could be done like this:
- Add sphere sensitive for a light (#0032182).
- Dynamically draw a point (cross of two lines on sphere) via HilightWithColor() method implemented for a custom Owner object. Implement IsForcedHilight() to ensure cross is updated on mouse move.
- Calculate AIS_LightSource::ProcessDragging() interface to apply rotation as a delta between points on a sensitive sphere.
Steps to reproduce
v3d light_source dyn_highlight
Public activity
68 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Mar 17 17:38:00 2021 +0300
0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Mar 17 17:38:00 2021 +0300
0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Solution Implementation, Testing
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Testing
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Solution Evaluation
Solution Evaluation
Solution implementation, Testing
Solution implementation
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
Patch is ready to review:
- OCCT: CR32183_1
- OCCT: CR32183_1
Solution Implementation
Solution Implementation
Solution Implementation
Solution Implementation
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
http://jenkins-test-occt.nnov.opencascade.com/view/CR32183_2-master-MKRYLOVA/view/ALL/
(opengl drivers d3dhost is unstable)
(opengl drivers d3dhost is unstable)
Patch is ready to review:
- OCCT: CR32183_2
- OCCT: CR32183_2
Solution Implementation, Testing
Solution Implementation, Testing
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Jun 30 18:14:34 2021 +0300
# osa remarks
- added highlighting
- fixed default arc size
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Jun 30 18:14:34 2021 +0300
# osa remarks
- added highlighting
- fixed default arc size
Solution Implementation, Testing
Solution Implementation, Testing
Solution Implementation, Testing
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Mon Jul 5 10:33:17 2021 +0300
# kgv remarks
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Mon Jul 5 10:33:17 2021 +0300
# kgv remarks
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
Analysis, Solution Implementation
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
Testing, Integration
Patch is ready to review:
- OCCT: CR32183_4
- OCCT: CR32183_4
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Jul 16 14:19:42 2021 +0300
# fixed constructor and added test
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Jul 16 14:19:42 2021 +0300
# fixed constructor and added test
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Mon Jul 19 11:16:24 2021 +0300
# fixed constructor
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Mon Jul 19 11:16:24 2021 +0300
# fixed constructor
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
# fixed constructor
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
# fixed constructor
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Patch is ready to review:
- OCCT: CR32183_6
- OCCT: CR32183_6
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Jul 20 09:32:45 2021 +0300
# cosmetics
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Jul 20 09:32:45 2021 +0300
# cosmetics
Cosmetic remarks have been pushed to CR32183_6.
Is there a reason to force highlight for non-draggable light source types?
Why not using thePickResult.PickedPoint() here?
In addition, normally ::Matches() is expected to reset last detected result on failure.
White highlighting is not reset when dragging another object - only after clicking on no object.
I don't think that white highlighting is necessary at all.
The following scripts leads to unhandled exception and application crash:
Result:
and then crash.
+Standard_Boolean AIS_LightSourceOwner::IsForcedHilight() const
+{
+ return true;
Is there a reason to force highlight for non-draggable light source types?
@@ -53,7 +54,7 @@ Standard_Boolean Select3D_SensitiveSphere::Matches (SelectBasics_SelectingVolume ... + myLastDetectedPoint = theMgr.DetectedPoint (thePickResult.Depth());
Why not using thePickResult.PickedPoint() here?
In addition, normally ::Matches() is expected to reset last detected result on failure.
+void AIS_LightSourceOwner::HilightWithColor() ... + aPrs->Display();
White highlighting is not reset when dragging another object - only after clicking on no object.
I don't think that white highlighting is necessary at all.
The following scripts leads to unhandled exception and application crash:
pload MODELING VISUALIZATION # create simple scene box b 1 2 3 box bb -5 -5 0 10 10 0 -preview vclear vinit View1 vcamera -persp vdisplay -dispMode 1 b bb vaspects bb -material STONE vfit # setup light sources set aPrsSize 75 vlight -clear vlight -add AMBIENT -color WHITE -display amb -prsSize $aPrsSize # add WHITE directional light source vlight -add DIRECTIONAL -color WHITE -direction 1.0 1.0 -1.0 -head 0 -display dir1 -prsSize $aPrsSize vlight -change 1 -castShadows 1 # add RED directional light source in disabled state vlight -add DIRECTIONAL -color RED -direction 1.0 -1.0 -0.5 -head 0 -display dir2 -prsSize $aPrsSize vselect 300 85 vlight -change 2 -castShadows 1 vrenderparams -shadowMapBias 0.01
Result:
An exception was caught [revision removed] : Standard_ConstructionError: gp_Dir::Crossed() - result vector has zero norm
and then crash.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added test
Testing, Solution Implementation
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Jul 21 15:53:15 2021 +0300
# kgv remarks
- added possibility to turn on/off light source dragging
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Wed Jul 21 15:53:15 2021 +0300
# kgv remarks
- added possibility to turn on/off light source dragging
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
[revision removed]
Detailed log of new commits:
Author: mkrylova
Date: Fri Mar 26 12:31:22 2021 +0300
0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
Testing, Solution Implementation
Patch is ready to review:
- OCCT: CR32183_8
- OCCT: CR32183_8
Solution Implementation
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17248.180000000266 / 17229.680000000302 [+0.11%]
Products
Total CPU difference: 11453.40000000009 / 11477.160000000118 [-0.21%]
Windows-64-VC14:
OCCT
Total CPU difference: 19038.78125 / 19020.171875 [+0.10%]
Products
Total CPU difference: 12762.65625 / 12734.125 [+0.22%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17248.180000000266 / 17229.680000000302 [+0.11%]
Products
Total CPU difference: 11453.40000000009 / 11477.160000000118 [-0.21%]
Windows-64-VC14:
OCCT
Total CPU difference: 19038.78125 / 19020.171875 [+0.10%]
Products
Total CPU difference: 12762.65625 / 12734.125 [+0.22%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Solution elaboration
Related records
- #0032182 · related to · closedVisualization - add Select3D_SensitiveSphere
- #0032604 · parent of · closedVisualization, AIS_LightSource - improve dragging robustness
- #0032605 · parent of · assignedVisualization, AIS_LightSource - handle dragging outside of sphere
- #0031704 · child of · closedVisualization - add an interactive object AIS_LightSource representing a light source