DiscussionsIssue archiveOCCT:Visualization

Archived issue #0008205

"DisplayPriority" attribute needed for PrsMgr_PresentableObject

Open CASCADEOCCT:Visualizationclosed1 public note

Search issues

Description

It is desirable to have "DisplayPriority" attribute in PrsMgr_PresentableObject
class.
It is a common practice to design an application, so that creation of
presentations and their visualization are perfromed by separate classes (let's
call them Displayer and Viewer). Display priority plays sometimes an important
role in displaying partially overlapped presentations. Unfortunately, currently
there is no way for Displayer to set required display priority for a certain
presentable object in advance: it is necessary to change display priority
thorugh AIS_InteractiveContext (or PrsMgr_PresentationManager) interface AFTER
displaying an object. This is not convenient.

It is proposed to add the following methods to PrsMgr_PresentableObject class:
- DisplayPriority(): returns current value of myDisplayPriority field;
- SetDisplayPriority(): stores new value in myDisplayPriority field AND,
probably, updates all DISPLAYED object presentations according to it (see
PrsMgr_PresentationManager::SetDisplayPriority()).

All methods of PrsMgr_PresentationManager class which deal with presentable
objects should be modified to take this new attribute into account.

Additional information

Documentation remark, added by AEL 2005-07-27 10:28:09:

Improvements:
Added methods to manage display priority attribute and algorithm in
PrsMgr_PresentableObject class and modified algorithm to control display
priority to let programmer set the display priority attribute before displaying
an object. Unfortunately there was common practice in OpenCASCADE to set display
priority for objects at the displaying phase and also for transparent,
highlighted and other objects. To avoid collisions with previous algorithm it
was divided in two parts.
So now programmer should use PrsMgr_PresentableObject->SetDisplayPriority method
before displaying an object and it will affect all presentations of the object
and to change after displaying an object should be used dependent on context
method SetDisplayPriority() through the AIS context.
Modified entities:
    In the PrsMgr package:
-PrsMgr_PresentableObject.cdl and PrsMgr_PresentableObject.cxx:
added new methods to manage display priority attribute (SetDisplayPriority,
DisplayPriority, ResetDisplayPriority, UpdatePriority).
-PrsMgr_PresentationManager.cxx - modification of corresponding methods

    In the Graphic3d package:
-Graphic3d_Structure.cxx - modification of corresponding methods

Public activity

1 archived note

Participants are labeled by their role within this record.

01Commenter 1
Dear Commenter 2,

please close this issue.