MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024119Community[OCCT] OCCT:Visualizationpublic2013-08-21 03:482014-03-04 10:44
Reportermach22 
Assigned Tomach22 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2012OS Version64 bit
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.7.0 
Summary0024119: Dynamic operations on the v3d view can not be simultaneously used with V3d_View::Eye(...) getter
Description-------------------------------------------------------------------------------
The description of the problem, reported by mach22
-------------------------------------------------------------------------------
I need to get the Eye position every time using the DynamicRotation change the position of the eye. but if I call the method
V3d_View::Eye(V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
something change in the state of the view and when I activate the DynamicRotation the objects in the scene seem to change their position jumping from a frame to another.

-------------------------------------------------------------------------------
V3d view features interactive operations: Rotation, Panning, Zooming. To perform these operation, the one can call an appropriate method ("Rotation", "Panning", ...) passing a value of special "toStart" flag as TRUE. The method remembers initial state of view or mouse coordinates in a set of temporary variables. Then, the operation can be performed by calling the same method with new mouse cursor position, and "toStart" value equal to FALSE. Using the temporary data, the method derives difference of mouse cursor coordinates, or view state, and performs transformation, relative to the initial state of the view.

The problem is that, in general, these operations remember the initial state in form of static variables - the same ones, which are, for some reason, silently modified by logically independent getters, like Eye(...) or FocalReferencePoint(...).

Calling such methods, like Eye, during the interactive operation will lead to undefined behavior on the next step.
Steps To ReproduceUsing the samples provided with the latest release, running the Geometry project.
in the GeometryView.cpp file, in the OnMouseMove method I have added the call to the Eye method in the DynamicRotation section like this:

case CurAction3d_DynamicRotation :
  myView->Rotation(point.x,point.y);

  V3d_Coordinate x, y, z;
  myView->Eye(x,y,z);

  myView->Redraw();
break;
Additional information
and documentation updates
I have added the modified file for the sample
TagsNo tags attached.
Test case numberNot needed
Attached Filescpp file icon GeometryView.cpp (15,051 bytes) 2013-08-21 03:48
png file icon dynamic_rotation_sample.png (69,578 bytes) 2014-02-17 19:07

- Relationships
related to 0024413closedabv Open CASCADE Visualization - get rid of projection shift from orthographic camera definition 

-  Notes
(0027929)
kgv (developer)
2014-02-17 16:35

Dear apl,

could you please revise bug description?
(0027934)
apl (developer)
2014-02-17 19:12
edited on: 2014-02-17 19:22

Dear Bugmaster,

The problems with static variables in interactive operations on v3d view were fixed with implementation of camera approach #24001.

Could you please check, on current occt master, the MFC Geometry sample with modified "GeometryView.cpp" that the problem is not reproduced anymore? The source file can be found in attachments.

The dynamic rotation operation is shown on illustration.

Thank you!

(0028056)
bugmaster (administrator)
2014-02-27 18:07

Dear APN,

Please check request of APL
(0028113)
apn (administrator)
2014-03-04 10:44

Problem is not reproduced on current occt master with modified "GeometryView.cpp" on MFC Geometry sample.

- Issue History
Date Modified Username Field Change
2013-08-21 03:48 mach22 New Issue
2013-08-21 03:48 mach22 Assigned To => san
2013-08-21 03:48 mach22 File Added: GeometryView.cpp
2014-02-17 16:34 kgv Relationship added related to 0024413
2014-02-17 16:35 kgv Note Added: 0027929
2014-02-17 16:35 kgv Assigned To san => apl
2014-02-17 16:35 kgv Priority urgent => normal
2014-02-17 16:35 kgv Severity major => minor
2014-02-17 16:35 kgv Status new => feedback
2014-02-17 18:07 apl Summary calling the method V3d_View::Eye(...) change the state of the view => Dynamic operations on the v3d view can not be simultaneously used with V3d_View::Eye(...) getter
2014-02-17 18:07 apl Description Updated View Revisions
2014-02-17 19:07 apl File Added: dynamic_rotation_sample.png
2014-02-17 19:08 apl Assigned To apl => bugmaster
2014-02-17 19:12 apl Note Added: 0027934
2014-02-17 19:13 apl Relationship added related to 0024001
2014-02-17 19:16 apl Description Updated View Revisions
2014-02-17 19:22 apl Note Edited: 0027934 View Revisions
2014-02-27 18:07 bugmaster Note Added: 0028056
2014-02-27 18:08 bugmaster Assigned To bugmaster => apn
2014-03-04 10:44 apn Note Added: 0028113
2014-03-04 10:44 apn Assigned To apn => mach22
2014-03-04 10:44 apn Status feedback => closed
2014-03-04 10:44 apn Resolution open => fixed
2014-03-04 10:44 apn Fixed in Version => 6.7.0
2014-03-04 10:44 apn Target Version => 6.7.0
2014-03-04 10:44 apn Test case number => Not needed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker