Public Member Functions | List of all members
Viewport Struct Referenceabstract

#include <DgnViewport.h>

Inheritance diagram for Viewport:
QvViewport

Public Member Functions

IViewDrawP GetIViewDraw ()
 Gets the object required for immediate drawing to the Viewport. The methods on IViewDraw can be used to draw View Decorators. More...
 
IViewOutputP GetIViewOutput ()
 Gets the object required for advanced immediate drawing to the Viewport. IViewOutput is a subclass of IViewDraw, and generally only IViewDraw is needed. More...
 
ICachedDrawP GetICachedDraw ()
 Gets the object required for advanced cached drawing to the Viewport. Cached Drawing is seldom required by applications. More...
 
void SetNeedsRefresh ()
 Sets the flag indicating that the Viewport needs to be refreshed from the backing store at the next opportunity. More...
 
RotMatrixCP GetRotMatrix () const
 Get the Rotation Matrix for this Viewport. More...
 
DPoint3dCP GetScale () const
 Get the Scale Factors for X, Y, Z for this Viewport. More...
 
double GetActiveZRoot () const
 Get the distance from the back plane of this Viewport to the Active Z plane, in DgnCoordSystem::Root. More...
 
void GetCameraView (CameraParams *) const
 Fill in an CameraParams structure with the current camera parameters in DgnCoordSystem::View coordinates. More...
 
CameraParams const * GetCameraRoot () const
 Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates. More...
 
StatusInt GetCameraTarget (DPoint3dP) const
 Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates. More...
 
StatusInt GetClipBoundElemHandle (EditElementHandleR) const
 
StatusInt GetClipMaskElemHandle (EditElementHandleR) const
 
ElementRefP GetClipBoundElementRef () const
 
ElementRefP GetClipMaskElementRef () const
 
void SetTemporaryClipElementRef (ElementRefP element)
 
void SetTemporaryClipMaskElementRef (ElementRefP element)
 
DMap4dCP GetRootToViewMap ()
 Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::View coordinates for this Viewport. More...
 
DMap4dCP GetRootToNpcMap ()
 Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::Npc coordinates for this Viewport. More...
 
DMap4dCP GetActiveToRootMap () const
 Get the DMap4d to convert between DgnCoordSystem::Active and DgnCoordSystem::Root coordinates for this Viewport. More...
 
int GetIndexedLineWidth (int index) const
 Get the number width in pixels for a line weight value for this Viewport. More...
 
UInt32 GetIndexedLinePattern (int index) const
 Get the 32 bit on-off "line pattern" for a line code value for this Viewport. More...
 
void SetMinimumLOD (double minLOD)
 
BentleyStatus SynchWithViewInfo (bool saveInUndo, bool updateViewTitle)
 Synchronizes the view information that is displayed with this viewport. Optionally add an entry in the view undo stack and update the view title. More...
 
StatusInt ComputeFittedElementRange (DRange3dR range, IElementSetR elements, RotMatrixCP rMatrix)
 Compute the range of the element when displayed in the viewport. More...
 
StatusInt ComputeDisplayedModelRefRange (DRange3dR range, DgnModelRefP modelRef, bool includeChildren, FitViewParams &fitParams)
 Compute range of a model ref when display in the viewport. More...
 
Coordinate Query and Conversion
void GetViewBox (DPoint3dP pts, DgnCoordSystem sys, bool adjustedBox) const
 Get an 8-point box corresponding to the 8 corners of the Viewport in the specified coordinate system. More...
 
void GetViewRect (BSIRect &rect) const
 Get the Viewport rectangle in either DgnCoordSystem::View or DgnCoordSystem::Screen. More...
 
void GetViewCorners (DPoint3dR low, DPoint3dR high) const
 Get the DgnCoordSystem::View coordinates of lower-left-back and upper-right-front corners of a viewport. More...
 
void NpcToView (DPoint3dP viewPts, DPoint3dCP npcPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Npc into DgnCoordSystem::View. More...
 
void ViewToNpc (DPoint3dP npcPts, DPoint3dCP viewPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Npc. More...
 
void NpcToRoot (DPoint3dP rootPts, DPoint3dCP npcPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Npc into DgnCoordSystem::Root. More...
 
void RootToNpc (DPoint3dP npcPts, DPoint3dCP rootPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::Npc. More...
 
void RootToView (DPoint4dP viewPts, DPoint3dCP rootPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::View. More...
 
void ViewToRoot (DPoint3dP rootPts, DPoint4dCP viewPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Root. More...
 
void RootToView (DPoint3dP viewPts, DPoint3dCP rootPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::View. More...
 
void RootToView2d (DPoint2dP viewPts, DPoint3dCP rootPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Root into an array of 2D points in DgnCoordSystem::View. More...
 
void ViewToRoot (DPoint3dP rootPts, DPoint3dCP viewPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Root. More...
 
void ActiveToView (DPoint3dP viewPts, DPoint3dCP activePts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::View. More...
 
void ViewToActive (DPoint3dP activePts, DPoint3dCP viewPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Active. More...
 
void ActiveToRoot (DPoint3dP rootPts, DPoint3dCP activePts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::Root. More...
 
void RootToActive (DPoint3dP activePts, DPoint3dCP rootPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::Active. More...
 
void ActiveToRoot (RotMatrixR rootRMatrix, RotMatrixCR activeRMatrix) const
 Transfrom a rotation matrix in DgnCoordSystem::Active into DgnCoordSystem::Root. More...
 
void RootToActive (RotMatrixR activeRMatrix, RotMatrixCR rootRMatrix) const
 Transfrom a rotation matrix in DgnCoordSystem::Root into DgnCoordSystem::Active. More...
 
void ViewToScreen (DPoint3dP screenPts, DPoint3dCP viewPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Screen. More...
 
void ScreenToView (DPoint3dP viewPts, DPoint3dCP screenPts, int nPts) const
 Transfrom an array of points in DgnCoordSystem::Screen into DgnCoordSystem::View. More...
 
Viewport Parameters
bool IsActive () const
 Determine whether this Viewport is currently active. More...
 
bool IsCameraOn () const
 Determine whether this Viewport currently has a camera enabled. More...
 
bool IsGridOn () const
 Determine whether the Grid display is currently enabled in this Viewport. More...
 
bool Is3dModel () const
 Determine whether the root modelRef of this viewport is a 3D model. More...
 
bool IsSheetView () const
 Determine whether the root modelRef of this viewport is a Sheet model. More...
 
DgnModelP GetRootModel () const
 Get the Root modelRef for this Viewport. More...
 
DgnModelRefP GetTargetModel () const
 Get the current target modelRef for this Viewport. More...
 
ViewInfoCP GetViewInfoCP () const
 Get a pointer to the ViewInfo associated with this Viewport. More...
 
ViewInfoP GetViewInfoP ()
 Get a pointer to the ViewInfo associated with this Viewport. More...
 
void GetViewName (WStringR name)
 Get the name for this view. More...
 
int GetViewNumber () const
 Get the view number of this Viewport. More...
 
int GetScreenNumber () const
 Get the screen number on which this Viewport resides. More...
 
DPoint3dCP GetViewOrigin () const
 Get View Origin for this Viewport. More...
 
DPoint3dCP GetViewDelta () const
 Get the View Delta (size) of this Viewport in root coordinate distances. More...
 
ViewFlagsCP GetViewFlags () const
 Get the current View Flags for this Viewport. More...
 
double GetPixelSizeAtPoint (DPoint3dCP rootPt, DgnCoordSystem coordSys=DgnCoordSystem::Root) const
 Get the size of a single pixel at a given point as a distance along the view-x axis. More...
 
Changing Viewport Frustum
StatusInt Scroll (Point2dCP viewDist)
 Scroll the Viewport by a given number of pixels in the view's X and/or Y direction. More...
 
StatusInt Zoom (DPoint3dCP newCenterRoot, double factor, bool normalizeCamera)
 Change the size of this Viewport's frustum by a ratio to its current size. More...
 
StatusInt SetupFromFrustum (DPoint3dCP frustPts)
 Change the frustum for this Viewport. More...
 

Color Controls

UInt32 GetBackgroundColor () const
 Get the RGB color of the background for this Viewport. More...
 
UInt32 GetContrastToBackgroundColor () const
 
UInt32 AdjustColorForContrast (UInt32 thisColor, UInt32 againstColor) const
 Adjust a color such that there is visible contrast to another color. More...
 
void ResynchColorMap ()
 *//* Bentley Systems More...
 
UInt32 GetHiliteColor () const
 Get the current TBGR color value of the user-selected hilite color for this Viewport. More...
 
UInt32 GetHiliteColor (DisplayPathCP path) const
 Get the hilite TBGR color value for a DisplayPath. More...
 
void SetSymbologyRgb (UInt32 lineColorTBGR, UInt32 fillColorTBGR, int lineWidth, int lineCodeIndex)
 Set the current display symbology for this Viewport by TBGR color values, a pixel width, and 0-7 line code. More...
 
static UInt32 MakeTrgbColor (int red, int green, int blue, int transparency)
 Compose a TRGB color from separate Red, Green, Blue, and Transparency values. More...
 
static UInt32 MakeColorTransparency (UInt32 color, int transparency)
 Adjust the transparency value of a TRGB color, leaving the Red, Blue, and Green components unchanged. More...
 
static UInt32 MakeTransparentIfOpaque (UInt32 color, int transparency)
 Adjust the transparency value of a TRGB color, leaving the Red, Blue, and Green components unchanged, but ONLY IF the current transparency value of the color is opaque. More...
 

Member Function Documentation

void ActiveToRoot ( DPoint3dP  rootPts,
DPoint3dCP  activePts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::Root.

Parameters
[out]rootPtsAn array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points.
[in]activePtsInput array in DgnCoordSystem::Active
[in]nPtsNumber of points in both arrays.
void ActiveToRoot ( RotMatrixR  rootRMatrix,
RotMatrixCR  activeRMatrix 
) const

Transfrom a rotation matrix in DgnCoordSystem::Active into DgnCoordSystem::Root.

Parameters
[out]rootRMatrixRotation in DgnCoordSystem::Root.
[in]activeRMatrixInput rotation in DgnCoordSystem::Active
void ActiveToView ( DPoint3dP  viewPts,
DPoint3dCP  activePts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]activePtsInput array in DgnCoordSystem::Active
[in]nPtsNumber of points in both arrays.
UInt32 AdjustColorForContrast ( UInt32  thisColor,
UInt32  againstColor 
) const

Adjust a color such that there is visible contrast to another color.

This method is useful for adjusting a color slightly so that it can be discerned by the user in the context of other objects or against the background color. If the two colors are nearly the same, such that the user wouldn't be able to tell them apart (e.g. they are both very dark or very light) this method will adjust the starting color by making it either brighter or darker, but keeping the same hue, until there is sufficient Contrast.

Parameters
[in]thisColorStarting color
[in]againstColorColor against which the result must contrast.
Returns
the adjusted, contrasting color
StatusInt ComputeDisplayedModelRefRange ( DRange3dR  range,
DgnModelRefP  modelRef,
bool  includeChildren,
FitViewParams fitParams 
)

Compute range of a model ref when display in the viewport.

StatusInt ComputeFittedElementRange ( DRange3dR  range,
IElementSetR  elements,
RotMatrixCP  rMatrix 
)

Compute the range of the element when displayed in the viewport.

DMap4dCP GetActiveToRootMap ( ) const

Get the DMap4d to convert between DgnCoordSystem::Active and DgnCoordSystem::Root coordinates for this Viewport.

Returns
the current ActiveToRoot map for this Viewport. Will be NULL if active model and root model are the same.
double GetActiveZRoot ( ) const

Get the distance from the back plane of this Viewport to the Active Z plane, in DgnCoordSystem::Root.

Returns
the Active Z depth in root coordinates.
UInt32 GetBackgroundColor ( ) const

Get the RGB color of the background for this Viewport.

Returns
background RGB color
CameraParams const* GetCameraRoot ( ) const

Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates.

Returns
the current CameraParams for this Viewport.
See also
GetCameraView
StatusInt GetCameraTarget ( DPoint3dP  ) const

Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates.

Returns
the current CameraParams for this Viewport.
See also
GetCameraView
void GetCameraView ( CameraParams ) const

Fill in an CameraParams structure with the current camera parameters in DgnCoordSystem::View coordinates.

See also
GetCameraRoot
ElementRefP GetClipBoundElementRef ( ) const
Returns
the clipping element for this Viewport. If there is no clipping element active, return NULL. The returned element will always be a persistent element. If the element is in a different model, a "path" elementRef is returned.
StatusInt GetClipBoundElemHandle ( EditElementHandleR  ) const
Returns
the clipping element for this Viewport. If there is no clipping element active, return ERROR. The returned element could be a temporary/transient. If the actual element is in a different model, the returned element data will be transformed to the root model.
ElementRefP GetClipMaskElementRef ( ) const
Returns
the clip mask element for this Viewport. If there is no clip mask active, return NULL. The returned element will always be a persistent element. If the element is in a different model, a "path" elementRef is returned.
StatusInt GetClipMaskElemHandle ( EditElementHandleR  ) const
Returns
the clip mask element for this Viewport. If there is no clip mask active, return ERROR. The returned element could be a temporary/transient. If the actual element is in a different model, the returned element data will be transformed to the root model.
UInt32 GetContrastToBackgroundColor ( ) const
Returns
either white or black, whichever has more contrast to the background color of this Viewport.
UInt32 GetHiliteColor ( ) const

Get the current TBGR color value of the user-selected hilite color for this Viewport.

Returns
the current TBGR hilite color.
UInt32 GetHiliteColor ( DisplayPathCP  path) const

Get the hilite TBGR color value for a DisplayPath.

Display paths that are to elements currently in the Selection Set are hilited with the Selection Set Color and paths that are not in the selection set use the normal hilite color.

Parameters
[in]pathDisplay path to check
Returns
the hilite color for path
ICachedDrawP GetICachedDraw ( )

Gets the object required for advanced cached drawing to the Viewport. Cached Drawing is seldom required by applications.

UInt32 GetIndexedLinePattern ( int  index) const

Get the 32 bit on-off "line pattern" for a line code value for this Viewport.

Users select, and elements store a "line code" value in the range of 0 to 7. Output devices can change the on-off patterns based on resolution, etc. This method returns the line pattern for a given line code value from the mapping table for this Viewport.

Parameters
[in]indexa the range of 0 to 7.
Returns
the line pattern for lineCodeValue
int GetIndexedLineWidth ( int  index) const

Get the number width in pixels for a line weight value for this Viewport.

Users select, and elements store a "line weight" value in the range of 0 to 31. Users can also specify a mapping from line weight values to pixels as a user preference. This mapping can vary from view to view, and for plotting views. This method returns the number of pixels for a given line weight value from the mapping table for this Viewport.

Parameters
[in]indexthe line weight value in the range of 0 to 31.
Returns
the number of pixels for lineWeightValue
IViewDrawP GetIViewDraw ( )

Gets the object required for immediate drawing to the Viewport. The methods on IViewDraw can be used to draw View Decorators.

IViewOutputP GetIViewOutput ( )

Gets the object required for advanced immediate drawing to the Viewport. IViewOutput is a subclass of IViewDraw, and generally only IViewDraw is needed.

double GetPixelSizeAtPoint ( DPoint3dCP  rootPt,
DgnCoordSystem  coordSys = DgnCoordSystem::Root 
) const

Get the size of a single pixel at a given point as a distance along the view-x axis.

The size of a pixel will only differ at different points within the same Viewport if the camera is on for this Viewport (in which case, points closer to the eye return larger values than ones further from the eye.)

Parameters
[in]rootPtThe point in DgnCoordSystem::Root for determining pixel size. If NULL, use the center of the Viewport.
[in]coordSysThe coordinate system for the returned distance.
Returns
the size of the pixel at point rootPt.
DgnModelP GetRootModel ( ) const

Get the Root modelRef for this Viewport.

Returns
the root modelRef for this Viewport.
DMap4dCP GetRootToNpcMap ( )

Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::Npc coordinates for this Viewport.

Returns
the current RootToNpc map for this Viewport.
DMap4dCP GetRootToViewMap ( )

Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::View coordinates for this Viewport.

Returns
the current RootToView map for this Viewport.
RotMatrixCP GetRotMatrix ( ) const

Get the Rotation Matrix for this Viewport.

The concept of a Viewport's Rotation Matrix is somewhat limiting since it does not support perspective transformations. This method is provided for compatibility with previous MicroStation API only.

See also
the Coordinate Coordinate Query and Conversion functions and GetRootToViewMap
DPoint3dCP GetScale ( ) const

Get the Scale Factors for X, Y, Z for this Viewport.

See also
the Coordinate Coordinate Query and Conversion functions and GetRootToViewMap
int GetScreenNumber ( ) const

Get the screen number on which this Viewport resides.

DgnModelRefP GetTargetModel ( ) const

Get the current target modelRef for this Viewport.

If this Viewport becomes the SelectedView, the target model becomes the ActiveModel.

Returns
the target modelRef for this Viewport.
void GetViewBox ( DPoint3dP  pts,
DgnCoordSystem  sys,
bool  adjustedBox 
) const

Get an 8-point box corresponding to the 8 corners of the Viewport in the specified coordinate system.

When front or back clipping is turned off, there are two sets of corners that may be of interest. The "expanded" box is the one that is computed by examining the extents of the content of the view and moving the front and back planes to enclose everything in the view [N.B. this is the way that MicroStation implements the concept of "no front/back clipping", since there always must be a view frustum]. The "unexpanded" box is the one that is saved in the view definition.

Parameters
[out]ptsA array of 8 points to receive the 8 points of the view box. See NpcCorners for order of points.
[in]sysCoordinate system for points
[in]adjustedBoxIf true, and if f/b clipping is OFF, retrieve the "adjusted" box. Otherwise retrieve the box that came from the view definition.
Note
The "adjusted" box may, in reality, be either larger or smaller than the "unexpanded" box since the expanded box depends on the current content of the view.
void GetViewCorners ( DPoint3dR  low,
DPoint3dR  high 
) const

Get the DgnCoordSystem::View coordinates of lower-left-back and upper-right-front corners of a viewport.

NOTE: the y values are "swapped" (llb.y is greater than urf.y) on the screen and and "unswapped" for plots.

Parameters
[out]lowThe lower left back corner of the view
[out]highThe upper right front corner of the view
DPoint3dCP GetViewDelta ( ) const

Get the View Delta (size) of this Viewport in root coordinate distances.

Returns
the view delta in root coordinate distances.
ViewFlagsCP GetViewFlags ( ) const

Get the current View Flags for this Viewport.

Returns
the View flags for this Viewport.
ViewInfoCP GetViewInfoCP ( ) const

Get a pointer to the ViewInfo associated with this Viewport.

ViewInfoP GetViewInfoP ( )

Get a pointer to the ViewInfo associated with this Viewport.

void GetViewName ( WStringR  name)

Get the name for this view.

Parameters
[out]nameA string to be filled with the current name of this view.
int GetViewNumber ( ) const

Get the view number of this Viewport.

If this Viewport is one of the 8 MicroStation numbered views (i.e. "View 1" through "View 8"), then return the index of view number (e.g. "View 1" is view index 0, "View 8" is view index 7). If the Viewport is not one of the 8 MicroStation numbered views, this method will return -1.

Returns
the view index of this Viewport, or -1 if it is not one of the numbered views.
DPoint3dCP GetViewOrigin ( ) const

Get View Origin for this Viewport.

Returns
the root coordinates of the lower left back corner of the Viewport.
void GetViewRect ( BSIRect rect) const

Get the Viewport rectangle in either DgnCoordSystem::View or DgnCoordSystem::Screen.

Parameters
[out]rectThe current size of the Viewport
bool Is3dModel ( ) const

Determine whether the root modelRef of this viewport is a 3D model.

Returns
true if the root model is 3D.
bool IsActive ( ) const

Determine whether this Viewport is currently active.

Viewports become "active" after they have been initialized and connected to an output device.

Returns
true if the Viewport is active.
bool IsCameraOn ( ) const

Determine whether this Viewport currently has a camera enabled.

In this context, the "camera" is on if the RootToView transform contains a perspective transformation.

Returns
true if the camera is on.
bool IsGridOn ( ) const

Determine whether the Grid display is currently enabled in this Viewport.

Returns
true if the grid display is on.
bool IsSheetView ( ) const

Determine whether the root modelRef of this viewport is a Sheet model.

static UInt32 MakeColorTransparency ( UInt32  color,
int  transparency 
)
static

Adjust the transparency value of a TRGB color, leaving the Red, Blue, and Green components unchanged.

Parameters
[in]colorOriginal color
[in]transparencyNew transparency (0=opaque, 255=fully transparent)
Returns
color with transparency adjusted.
static UInt32 MakeTransparentIfOpaque ( UInt32  color,
int  transparency 
)
static

Adjust the transparency value of a TRGB color, leaving the Red, Blue, and Green components unchanged, but ONLY IF the current transparency value of the color is opaque.

If the color already has a transparency value, this method returns the original value of color.

Parameters
[in]colorOriginal color
[in]transparencyNew transparency (0=opaque, 255=fully transparent)
Returns
color with transparency adjusted.
static UInt32 MakeTrgbColor ( int  red,
int  green,
int  blue,
int  transparency 
)
static

Compose a TRGB color from separate Red, Green, Blue, and Transparency values.

All values must be between 0 and 255.

Parameters
[in]redThe red component
[in]greenThe green component
[in]blueThe blue component
[in]transparencyTransparency component (0=opaque, 255=fully transparent)
Returns
the TRGB color
void NpcToRoot ( DPoint3dP  rootPts,
DPoint3dCP  npcPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Npc into DgnCoordSystem::Root.

Parameters
[out]rootPtsAn array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points.
[in]npcPtsInput array in DgnCoordSystem::Npc
[in]nPtsNumber of points in both arrays.
void NpcToView ( DPoint3dP  viewPts,
DPoint3dCP  npcPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Npc into DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]npcPtsInput array in DgnCoordSystem::Npc
[in]nPtsNumber of points in both arrays.
void ResynchColorMap ( )

*//* Bentley Systems

void RootToActive ( DPoint3dP  activePts,
DPoint3dCP  rootPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::Active.

Parameters
[out]activePtsAn array to receive the points in DgnCoordSystem::Active. Must be dimensioned to hold nPts points.
[in]rootPtsInput array in DgnCoordSystem::Root
[in]nPtsNumber of points in both arrays.
void RootToActive ( RotMatrixR  activeRMatrix,
RotMatrixCR  rootRMatrix 
) const

Transfrom a rotation matrix in DgnCoordSystem::Root into DgnCoordSystem::Active.

Parameters
[out]activeRMatrixRotation in DgnCoordSystem::Active.
[in]rootRMatrixInput rotation in DgnCoordSystem::Root
void RootToNpc ( DPoint3dP  npcPts,
DPoint3dCP  rootPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::Npc.

Parameters
[out]npcPtsAn array to receive the points in DgnCoordSystem::Npc. Must be dimensioned to hold nPts points.
[in]rootPtsInput array in DgnCoordSystem::Root
[in]nPtsNumber of points in both arrays.
void RootToView ( DPoint4dP  viewPts,
DPoint3dCP  rootPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]rootPtsInput array in DgnCoordSystem::Root
[in]nPtsNumber of points in both arrays.
void RootToView ( DPoint3dP  viewPts,
DPoint3dCP  rootPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]rootPtsInput array in DgnCoordSystem::Root
[in]nPtsNumber of points in both arrays.
void RootToView2d ( DPoint2dP  viewPts,
DPoint3dCP  rootPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Root into an array of 2D points in DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]rootPtsInput array in DgnCoordSystem::Root
[in]nPtsNumber of points in both arrays.
void ScreenToView ( DPoint3dP  viewPts,
DPoint3dCP  screenPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::Screen into DgnCoordSystem::View.

Parameters
[out]viewPtsAn array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points.
[in]screenPtsInput array in DgnCoordSystem::Screen
[in]nPtsNumber of points in both arrays.
StatusInt Scroll ( Point2dCP  viewDist)

Scroll the Viewport by a given number of pixels in the view's X and/or Y direction.

This method will move the Viewport's frustum in the indicated direction, but does not update the screen (even if the Viewport happens to be a visible View.) This method does change the ViewInfo associated with the Viewport.

Parameters
[in]viewDistThe distance to scroll, in pixels.
Note
To update the view, see IViewManager::UpdateView or IViewManager::UpdateViewDynamic. To save the change to the ViewInfo in the view undo buffer, see SynchWithViewInfo.
void SetMinimumLOD ( double  minLOD)
void SetNeedsRefresh ( )

Sets the flag indicating that the Viewport needs to be refreshed from the backing store at the next opportunity.

When the Viewport is refreshed, the view decorators are redrawn.

void SetSymbologyRgb ( UInt32  lineColorTBGR,
UInt32  fillColorTBGR,
int  lineWidth,
int  lineCodeIndex 
)

Set the current display symbology for this Viewport by TBGR color values, a pixel width, and 0-7 line code.

Parameters
[in]lineColorTBGRLine color in TBGR (T=0 for opaque)
[in]fillColorTBGRFill color in TBGR (T=0 for opaque)
[in]lineWidthLine width in pixels (1 or greater)
[in]lineCodeIndexLine code index (0-7)
void SetTemporaryClipElementRef ( ElementRefP  element)
void SetTemporaryClipMaskElementRef ( ElementRefP  element)
StatusInt SetupFromFrustum ( DPoint3dCP  frustPts)

Change the frustum for this Viewport.

The frustum is an 8-point array of points in DgnCoordSystem::Root coordinates in the order specified by NpcCorners. This method will change the Viewport's frustum, but does not update the screen (even if the Viewport happens to be a visible View.) This method does change the ViewInfo associated with the Viewport.

Note
To update the view, see IViewManager::UpdateView or IViewManager::UpdateViewDynamic. To save the change to the ViewInfo in the view undo buffer, see SynchWithViewInfo.
BentleyStatus SynchWithViewInfo ( bool  saveInUndo,
bool  updateViewTitle 
)

Synchronizes the view information that is displayed with this viewport. Optionally add an entry in the view undo stack and update the view title.

void ViewToActive ( DPoint3dP  activePts,
DPoint3dCP  viewPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Active.

Parameters
[out]activePtsAn array to receive the points in DgnCoordSystem::Active. Must be dimensioned to hold nPts points.
[in]viewPtsInput array in DgnCoordSystem::View
[in]nPtsNumber of points in both arrays.
void ViewToNpc ( DPoint3dP  npcPts,
DPoint3dCP  viewPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Npc.

Parameters
[out]npcPtsAn array to receive the points in DgnCoordSystem::Npc. Must be dimensioned to hold nPts points.
[in]viewPtsInput array in DgnCoordSystem::View
[in]nPtsNumber of points in both arrays.
void ViewToRoot ( DPoint3dP  rootPts,
DPoint4dCP  viewPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Root.

Parameters
[out]rootPtsAn array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points.
[in]viewPtsInput array of DPoint4d coordinates in DgnCoordSystem::View
[in]nPtsNumber of points in both arrays.
void ViewToRoot ( DPoint3dP  rootPts,
DPoint3dCP  viewPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Root.

Parameters
[out]rootPtsAn array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points.
[in]viewPtsInput array in DgnCoordSystem::View
[in]nPtsNumber of points in both arrays.
void ViewToScreen ( DPoint3dP  screenPts,
DPoint3dCP  viewPts,
int  nPts 
) const

Transfrom an array of points in DgnCoordSystem::View into DgnCoordSystem::Screen.

Parameters
[out]screenPtsAn array to receive the points in DgnCoordSystem::Screen. Must be dimensioned to hold nPts points.
[in]viewPtsInput array in DgnCoordSystem::View
[in]nPtsNumber of points in both arrays.
StatusInt Zoom ( DPoint3dCP  newCenterRoot,
double  factor,
bool  normalizeCamera 
)

Change the size of this Viewport's frustum by a ratio to its current size.

Also, specify a new center point for the frustum in DgnCoordSystem::Root coordinates. This method will change the Viewport's frustum, but does not update the screen (even if the Viewport happens to be a visible View.) This method does change the ViewInfo associated with the Viewport.

Parameters
[in]newCenterRootThe position, in DgnCoordSystem::Root, for the new center of the frustum. If NULL, center is unchanged.
[in]factorScale factor to apply to current frustum. Scale factors greater than 1.0 zoom out (that is, the view frustum gets larger and shows more of the model), and scale factors less than 1.0 zoom in.
[in]normalizeCameraif true, renormalize camera after zoom.
Note
To update the view, see IViewManager::UpdateView or IViewManager::UpdateViewDynamic. To save the change to the ViewInfo in the view undo buffer, see SynchWithViewInfo.

The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.