When generating a display of a solid in a window, Creo Parametric maintains two display lists. A display list contains a set of vectors that are used to represent the shape of the solid in
the view. A 3D display list contains a set of three-dimensional vectors that represent an approximation to the geometry of
the edges of the solid. This list gets rebuilt every time the solid is regenerated.
A 2D display list contains the two-dimensional projections of the edges of the solid 3D display list onto the current window.
It is rebuilt from the 3D display list when the orientation of the solid changes. The methods in this section enable you to
add your own vectors to the display lists, so that the graphics will be redisplayed automatically by Creo Parametric until the display lists are rebuilt.
When you add graphics items to the 2D display list, they will be regenerated after each repaint (when zooming and panning)
and will be included in plots created by Creo Parametric. When you add graphics to the 3D display list, you get the further benefit that the graphics survive a change to the orientation
of the solid and are displayed even when you spin the solid dynamically.
Methods Introduced:
|
|
IpfcDisplayListener.OnDisplay() |
|
|
IpfcDisplay.CreateDisplayList2D() |
|
|
IpfcDisplay.CreateDisplayList3D() |
|
|
IpfcDisplayList2D.Display() |
|
|
IpfcDisplayList3D.Display() |
|
|
IpfcDisplayList2D.Delete() |
|
|
IpfcDisplayList3D.Delete() |
A display listener is a class that acts similarly to an action listener. You must implement the method inherited from the IpfcDisplayListener interface. The implementation should provide calls to methods on the provided IpfcDisplay object to produce 2D or 3D graphics.
In order to create a display list in Creo Parametric, you call IpfcDisplay.CreateDisplayList2D or IpfcDisplay.CreateDisplayList3D() to tell Creo Parametric to use your listener to create the display list vectors.
IpfcDisplayList2D.Display() or IpfcDisplayList3D.Display() will display or redisplay the elements in your display list. The application should delete the display list data when it
is no longer needed.
The method IpfcDisplayList2D.Delete() and the method IpfcDisplayList3D.Delete() will remove both the specified display list from a session.
Note
The method IpfcWindow.Refresh() does not cause either of the display lists to be regenerated, but simply repaints the window using the 2D display list.