MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #2618 All Revisions ] Back to Issue ]
Summary 0002618: Visualization - choose better center of gravity for camera rotation operations
Revision 2011-11-23 16:48 by szy
Additional information
and documentation updates
Documentation remark, added by apl 2011-07-26 11:55:53:

Improvements:
Two new approaches has been developed for rotating the model in the view. In
addition to the older algorithm when the displayed model in the view was
rotated around its gravity point, the new algorithms take for rotation more
appropriate point that provides more convenient method, similar to turning the
camera. There are two new methods: first calculates rotation point depending on
the objects displayed inside of the view that are visible, and the second
calculates rotation point in the same manner with priority of the closest
object in center of the view providing the rotation of the model around this
object. These methods calculate rotation point not the same as the gravity
point, thus the model could go out of front and back view planes (ZSize), but
this solution provides an option that enables automated recalculation of the
view planes for such rotations.

The mathematical part of solution is developed as an utility tool, which could
be reused with any viewer that could provide information on displayed objects
such as bounding boxes and its viewing volume geometrical properties.

You might need to revise code of your application to enable use of these new
approaches. The gravity point will be selected by default as point of rotating
the model when porting your application.
Changes:
Gravity point calculation has been fixed, in the case when the zoomed object
inside of the view the gravity point is taken as the object's center. Two new
approaches to calculate model rotation point has been added: these approaches
project the model on the ray that goes from the center of the view in front
direction, and find average point on it. New enumeration
Aspect_ViewRotationType has been added to define the rotation point calculation
algorithms. The rotation type and option to automatically recompute front and
back view planes (ZSize) is specified for the V3d view in the method
StartRotation that calculates the point of model rotation.

There are changes in the following packages:
Aspect package:
1) New enumeration Aspect_ViewRotationType has been added

Bnd package:
Bnd_Box class:
1) New methods has been added to Bnd_Box class: project its bounding points on
the line (Bnd_Box::ProjectedPoints (const gp_Lin& theLine)), find intersection
points of the line with bounding box (Bnd_Box::IntersectionPoints (const
gp_Lin& theLine))

TColgp package:
1) TColgp_Array1OfPln class has been defined in cdl.

V3d package:
V3d_View class:
1) Gravity method has been corrected;
2) StartRotation method now has two new arguments: theViewRotationType and
FitZSize to provide services of new approaches for calculating the rotation
point and automatically ZSize calculation;
3) FrustumPlanes method has been added, this method calculates view volume
planes of the view, normals of planes are oriented outside the viewing volume;
4) PointOfRotation method has been added, this method uses utility tool to
compute the point of model rotation depending on the bounding boxes and view
volume.

Viewer package:
Viewer_ViewRotationTool class:
1) New class Viewer_ViewRotationTool has been added, this class provides
services for interactive rotation point calculation. This class could be reused
with other viewers.

ViewerTest package:
1) ViewerTest_ViewerCommands.cxx: new command vsetrotationtype has been added
to switch between rotation point calculation methods; this command manipulates
variables that are passed to the StartRotation command on mouse move and right
button click.
Modified entities:
Aspect.cdl - New enumeration Aspect_ViewRotationType has been added.
Bnd_Box.cdl - Two methods ProjectedPoints, IntersectionPoints has been added.
TColgp.cdl - New class TColgp_Array1OfPln has been added.
V3d_View.cdl - New methods FrustumPlanes and PointOfRotation has been added.
Viewer_ViewRotationTool.cxx - new class has been added.
ViewerTest_ViewerCommands.cxx - new method VSetRotationType has been added.
Revision 2011-11-23 16:47 by szy
Additional information
and documentation updates
Documentation remark, added by Anton (apl) 2011-07-26 11:55:53:

Improvements:
Two new approaches has been developed for rotating the model in the view. In
addition to the older algorithm when the displayed model in the view was
rotated around its gravity point, the new algorithms take for rotation more
appropriate point that provides more convenient method, similar to turning the
camera. There are two new methods: first calculates rotation point depending on
the objects displayed inside of the view that are visible, and the second
calculates rotation point in the same manner with priority of the closest
object in center of the view providing the rotation of the model around this
object. These methods calculate rotation point not the same as the gravity
point, thus the model could go out of front and back view planes (ZSize), but
this solution provides an option that enables automated recalculation of the
view planes for such rotations.

The mathematical part of solution is developed as an utility tool, which could
be reused with any viewer that could provide information on displayed objects
such as bounding boxes and its viewing volume geometrical properties.

You might need to revise code of your application to enable use of these new
approaches. The gravity point will be selected by default as point of rotating
the model when porting your application.
Changes:
Gravity point calculation has been fixed, in the case when the zoomed object
inside of the view the gravity point is taken as the object's center. Two new
approaches to calculate model rotation point has been added: these approaches
project the model on the ray that goes from the center of the view in front
direction, and find average point on it. New enumeration
Aspect_ViewRotationType has been added to define the rotation point calculation
algorithms. The rotation type and option to automatically recompute front and
back view planes (ZSize) is specified for the V3d view in the method
StartRotation that calculates the point of model rotation.

There are changes in the following packages:
Aspect package:
1) New enumeration Aspect_ViewRotationType has been added

Bnd package:
Bnd_Box class:
1) New methods has been added to Bnd_Box class: project its bounding points on
the line (Bnd_Box::ProjectedPoints (const gp_Lin& theLine)), find intersection
points of the line with bounding box (Bnd_Box::IntersectionPoints (const
gp_Lin& theLine))

TColgp package:
1) TColgp_Array1OfPln class has been defined in cdl.

V3d package:
V3d_View class:
1) Gravity method has been corrected;
2) StartRotation method now has two new arguments: theViewRotationType and
FitZSize to provide services of new approaches for calculating the rotation
point and automatically ZSize calculation;
3) FrustumPlanes method has been added, this method calculates view volume
planes of the view, normals of planes are oriented outside the viewing volume;
4) PointOfRotation method has been added, this method uses utility tool to
compute the point of model rotation depending on the bounding boxes and view
volume.

Viewer package:
Viewer_ViewRotationTool class:
1) New class Viewer_ViewRotationTool has been added, this class provides
services for interactive rotation point calculation. This class could be reused
with other viewers.

ViewerTest package:
1) ViewerTest_ViewerCommands.cxx: new command vsetrotationtype has been added
to switch between rotation point calculation methods; this command manipulates
variables that are passed to the StartRotation command on mouse move and right
button click.
Modified entities:
Aspect.cdl - New enumeration Aspect_ViewRotationType has been added.
Bnd_Box.cdl - Two methods ProjectedPoints, IntersectionPoints has been added.
TColgp.cdl - New class TColgp_Array1OfPln has been added.
V3d_View.cdl - New methods FrustumPlanes and PointOfRotation has been added.
Viewer_ViewRotationTool.cxx - new class has been added.
ViewerTest_ViewerCommands.cxx - new method VSetRotationType has been added.
Revision 2011-09-21 14:11 by szy
Additional information
and documentation updates
Documentation remark, added by POLETAEV Anton (apl) 2011-07-26 11:55:53:

Improvements:
Two new approaches has been developed for rotating the model in the view. In
addition to the older algorithm when the displayed model in the view was
rotated around its gravity point, the new algorithms take for rotation more
appropriate point that provides more convenient method, similar to turning the
camera. There are two new methods: first calculates rotation point depending on
the objects displayed inside of the view that are visible, and the second
calculates rotation point in the same manner with priority of the closest
object in center of the view providing the rotation of the model around this
object. These methods calculate rotation point not the same as the gravity
point, thus the model could go out of front and back view planes (ZSize), but
this solution provides an option that enables automated recalculation of the
view planes for such rotations.

The mathematical part of solution is developed as an utility tool, which could
be reused with any viewer that could provide information on displayed objects
such as bounding boxes and its viewing volume geometrical properties.

You might need to revise code of your application to enable use of these new
approaches. The gravity point will be selected by default as point of rotating
the model when porting your application.
Changes:
Gravity point calculation has been fixed, in the case when the zoomed object
inside of the view the gravity point is taken as the object's center. Two new
approaches to calculate model rotation point has been added: these approaches
project the model on the ray that goes from the center of the view in front
direction, and find average point on it. New enumeration
Aspect_ViewRotationType has been added to define the rotation point calculation
algorithms. The rotation type and option to automatically recompute front and
back view planes (ZSize) is specified for the V3d view in the method
StartRotation that calculates the point of model rotation.

There are changes in the following packages:
Aspect package:
1) New enumeration Aspect_ViewRotationType has been added

Bnd package:
Bnd_Box class:
1) New methods has been added to Bnd_Box class: project its bounding points on
the line (Bnd_Box::ProjectedPoints (const gp_Lin& theLine)), find intersection
points of the line with bounding box (Bnd_Box::IntersectionPoints (const
gp_Lin& theLine))

TColgp package:
1) TColgp_Array1OfPln class has been defined in cdl.

V3d package:
V3d_View class:
1) Gravity method has been corrected;
2) StartRotation method now has two new arguments: theViewRotationType and
FitZSize to provide services of new approaches for calculating the rotation
point and automatically ZSize calculation;
3) FrustumPlanes method has been added, this method calculates view volume
planes of the view, normals of planes are oriented outside the viewing volume;
4) PointOfRotation method has been added, this method uses utility tool to
compute the point of model rotation depending on the bounding boxes and view
volume.

Viewer package:
Viewer_ViewRotationTool class:
1) New class Viewer_ViewRotationTool has been added, this class provides
services for interactive rotation point calculation. This class could be reused
with other viewers.

ViewerTest package:
1) ViewerTest_ViewerCommands.cxx: new command vsetrotationtype has been added
to switch between rotation point calculation methods; this command manipulates
variables that are passed to the StartRotation command on mouse move and right
button click.
Modified entities:
Aspect.cdl - New enumeration Aspect_ViewRotationType has been added.
Bnd_Box.cdl - Two methods ProjectedPoints, IntersectionPoints has been added.
TColgp.cdl - New class TColgp_Array1OfPln has been added.
V3d_View.cdl - New methods FrustumPlanes and PointOfRotation has been added.
Viewer_ViewRotationTool.cxx - new class has been added.
ViewerTest_ViewerCommands.cxx - new method VSetRotationType has been added.
Revision 2011-09-13 17:35 by szy
Additional information
and documentation updates
Documentation remark, added by POLETAEV Anton (apl) 2011-07-26 11:55:53:

Improvements:
Two new approaches has been developed for rotating the model in the view. In
addition to the older algorithm when the displayed model in the view was
rotated around its gravity point, the new algorithms take for rotation more
appropriate point that provides more convenient method, similar to turning the
camera. There are two new methods: first calculates rotation point depending on
the objects displayed inside of the view that are visible, and the second
calculates rotation point in the same manner with priority of the closest
object in center of the view providing the rotation of the model around this
object. These methods calculate rotation point not the same as the gravity
point, thus the model could go out of front and back view planes (ZSize), but
this solution provides an option that enables automated recalculation of the
view planes for such rotations.

The mathematical part of solution is developed as an utility tool, which could
be reused with any viewer that could provide information on displayed objects
such as bounding boxes and its viewing volume geometrical properties.

You might need to revise code of your application to enable use of these new
approaches. The gravity point will be selected by default as point of rotating
the model when porting your application.
Changes:
Gravity point calculation has been fixed, in the case when the zoomed object
inside of the view the gravity point is taken as the object's center. Two new
approaches to calculate model rotation point has been added: these approaches
project the model on the ray that goes from the center of the view in front
direction, and find average point on it. New enumeration
Aspect_ViewRotationType has been added to define the rotation point calculation
algorithms. The rotation type and option to automatically recompute front and
back view planes (ZSize) is specified for the V3d view in the method
StartRotation that calculates the point of model rotation.

There are changes in the following packages:
Aspect package:
1) New enumeration Aspect_ViewRotationType has been added

Bnd package:
Bnd_Box class:
1) New methods has been added to Bnd_Box class: project its bounding points on
the line (Bnd_Box::ProjectedPoints (const gp_Lin& theLine)), find intersection
points of the line with bounding box (Bnd_Box::IntersectionPoints (const
gp_Lin& theLine))

TColgp package:
1) TColgp_Array1OfPln class has been defined in cdl.

V3d package:
V3d_View class:
1) Gravity method has been corrected;
2) StartRotation method now has two new arguments: theViewRotationType and
FitZSize to provide services of new approaches for calculating the rotation
point and automatically ZSize calculation;
3) FrustumPlanes method has been added, this method calculates view volume
planes of the view, normals of planes are oriented outside the viewing volume;
4) PointOfRotation method has been added, this method uses utility tool to
compute the point of model rotation depending on the bounding boxes and view
volume.

Viewer package:
Viewer_ViewRotationTool class:
1) New class Viewer_ViewRotationTool has been added, this class provides
services for interactive rotation point calculation. This class could be reused
with other viewers.

ViewerTest package:
1) ViewerTest_ViewerCommands.cxx: new command vsetrotationtype has been added
to switch between rotation point calculation methods; this command manipulates
variables that are passed to the StartRotation command on mouse move and right
button click.
Modified entities:
Aspect.cdl - New enumeration Aspect_ViewRotationType has been added.
Bnd_Box.cdl - Two methods ProjectedPoints, IntersectionPoints has been added.
TColgp.cdl - New class TColgp_Array1OfPln has been added.
V3d_View.cdl - New methods FrustumPlanes and PointOfRotation has been added.
Viewer_ViewRotationTool.cxx - new class has been added.
ViewerTest_ViewerCommands.cxx - new method VSetRotationType has been added.


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker