#include <DgnViewport.h>
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... | |
void ActiveToRoot | ( | DPoint3dP | rootPts, |
DPoint3dCP | activePts, | ||
int | nPts | ||
) | const |
Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::Root.
[out] | rootPts | An array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points. |
[in] | activePts | Input array in DgnCoordSystem::Active |
[in] | nPts | Number of points in both arrays. |
void ActiveToRoot | ( | RotMatrixR | rootRMatrix, |
RotMatrixCR | activeRMatrix | ||
) | const |
Transfrom a rotation matrix in DgnCoordSystem::Active into DgnCoordSystem::Root.
[out] | rootRMatrix | Rotation in DgnCoordSystem::Root. |
[in] | activeRMatrix | Input rotation in DgnCoordSystem::Active |
void ActiveToView | ( | DPoint3dP | viewPts, |
DPoint3dCP | activePts, | ||
int | nPts | ||
) | const |
Transfrom an array of points in DgnCoordSystem::Active into DgnCoordSystem::View.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | activePts | Input array in DgnCoordSystem::Active |
[in] | nPts | Number of points in both arrays. |
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.
[in] | thisColor | Starting color |
[in] | againstColor | Color against which the result must contrast. |
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.
double GetActiveZRoot | ( | ) | const |
Get the distance from the back plane of this Viewport to the Active Z plane, in DgnCoordSystem::Root.
UInt32 GetBackgroundColor | ( | ) | const |
Get the RGB color of the background for this Viewport.
CameraParams const* GetCameraRoot | ( | ) | const |
Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates.
Get the current CameraParams for this Viewport in DgnCoordSystem::Root coordinates.
void GetCameraView | ( | CameraParams * | ) | const |
Fill in an CameraParams structure with the current camera parameters in DgnCoordSystem::View coordinates.
ElementRefP GetClipBoundElementRef | ( | ) | const |
StatusInt GetClipBoundElemHandle | ( | EditElementHandleR | ) | const |
ElementRefP GetClipMaskElementRef | ( | ) | const |
StatusInt GetClipMaskElemHandle | ( | EditElementHandleR | ) | const |
UInt32 GetContrastToBackgroundColor | ( | ) | const |
UInt32 GetHiliteColor | ( | ) | const |
Get the current TBGR color value of the user-selected hilite color for this Viewport.
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.
[in] | path | Display path to check |
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.
[in] | index | a the range of 0 to 7. |
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.
[in] | index | the line weight value in the range of 0 to 31. |
IViewDrawP GetIViewDraw | ( | ) |
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.)
[in] | rootPt | The point in DgnCoordSystem::Root for determining pixel size. If NULL, use the center of the Viewport. |
[in] | coordSys | The coordinate system for the returned distance. |
rootPt
. DgnModelP GetRootModel | ( | ) | const |
DMap4dCP GetRootToNpcMap | ( | ) |
Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::Npc coordinates for this Viewport.
DMap4dCP GetRootToViewMap | ( | ) |
Get the DMap4d to convert between DgnCoordSystem::Root and DgnCoordSystem::View coordinates 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.
DPoint3dCP GetScale | ( | ) | const |
Get the Scale Factors for X, Y, Z for this Viewport.
int GetScreenNumber | ( | ) | const |
Get the screen number on which this Viewport resides.
DgnModelRefP GetTargetModel | ( | ) | const |
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.
[out] | pts | A array of 8 points to receive the 8 points of the view box. See NpcCorners for order of points. |
[in] | sys | Coordinate system for points |
[in] | adjustedBox | If true, and if f/b clipping is OFF, retrieve the "adjusted" box. Otherwise retrieve the box that came from the view definition. |
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.
[out] | low | The lower left back corner of the view |
[out] | high | The upper right front corner of the view |
DPoint3dCP GetViewDelta | ( | ) | const |
Get the View Delta (size) of this Viewport in root coordinate distances.
ViewFlagsCP GetViewFlags | ( | ) | const |
ViewInfoCP GetViewInfoCP | ( | ) | const |
void GetViewName | ( | WStringR | name | ) |
Get the name for this view.
[out] | name | A 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.
DPoint3dCP GetViewOrigin | ( | ) | const |
void GetViewRect | ( | BSIRect & | rect | ) | const |
Get the Viewport rectangle in either DgnCoordSystem::View or DgnCoordSystem::Screen.
[out] | rect | The current size of the Viewport |
bool Is3dModel | ( | ) | const |
Determine whether the root modelRef of this viewport is a 3D model.
bool IsActive | ( | ) | const |
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.
bool IsGridOn | ( | ) | const |
Determine whether the Grid display is currently enabled in this Viewport.
bool IsSheetView | ( | ) | const |
Determine whether the root modelRef of this viewport is a Sheet model.
Adjust the transparency value of a TRGB color, leaving the Red, Blue, and Green components unchanged.
[in] | color | Original color |
[in] | transparency | New transparency (0=opaque, 255=fully transparent) |
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.
[in] | color | Original color |
[in] | transparency | New transparency (0=opaque, 255=fully transparent) |
|
static |
Compose a TRGB color from separate Red, Green, Blue, and Transparency values.
All values must be between 0 and 255.
[in] | red | The red component |
[in] | green | The green component |
[in] | blue | The blue component |
[in] | transparency | Transparency component (0=opaque, 255=fully transparent) |
void NpcToRoot | ( | DPoint3dP | rootPts, |
DPoint3dCP | npcPts, | ||
int | nPts | ||
) | const |
Transfrom an array of points in DgnCoordSystem::Npc into DgnCoordSystem::Root.
[out] | rootPts | An array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points. |
[in] | npcPts | Input array in DgnCoordSystem::Npc |
[in] | nPts | Number 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.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | npcPts | Input array in DgnCoordSystem::Npc |
[in] | nPts | Number 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.
[out] | activePts | An array to receive the points in DgnCoordSystem::Active. Must be dimensioned to hold nPts points. |
[in] | rootPts | Input array in DgnCoordSystem::Root |
[in] | nPts | Number of points in both arrays. |
void RootToActive | ( | RotMatrixR | activeRMatrix, |
RotMatrixCR | rootRMatrix | ||
) | const |
Transfrom a rotation matrix in DgnCoordSystem::Root into DgnCoordSystem::Active.
[out] | activeRMatrix | Rotation in DgnCoordSystem::Active. |
[in] | rootRMatrix | Input rotation in DgnCoordSystem::Root |
void RootToNpc | ( | DPoint3dP | npcPts, |
DPoint3dCP | rootPts, | ||
int | nPts | ||
) | const |
Transfrom an array of points in DgnCoordSystem::Root into DgnCoordSystem::Npc.
[out] | npcPts | An array to receive the points in DgnCoordSystem::Npc. Must be dimensioned to hold nPts points. |
[in] | rootPts | Input array in DgnCoordSystem::Root |
[in] | nPts | Number 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.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | rootPts | Input array in DgnCoordSystem::Root |
[in] | nPts | Number 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.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | rootPts | Input array in DgnCoordSystem::Root |
[in] | nPts | Number 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.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | rootPts | Input array in DgnCoordSystem::Root |
[in] | nPts | Number 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.
[out] | viewPts | An array to receive the points in DgnCoordSystem::View. Must be dimensioned to hold nPts points. |
[in] | screenPts | Input array in DgnCoordSystem::Screen |
[in] | nPts | Number 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.
[in] | viewDist | The distance to scroll, in pixels. |
void SetMinimumLOD | ( | double | minLOD | ) |
void SetNeedsRefresh | ( | ) |
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.
[in] | lineColorTBGR | Line color in TBGR (T=0 for opaque) |
[in] | fillColorTBGR | Fill color in TBGR (T=0 for opaque) |
[in] | lineWidth | Line width in pixels (1 or greater) |
[in] | lineCodeIndex | Line 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.
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.
[out] | activePts | An array to receive the points in DgnCoordSystem::Active. Must be dimensioned to hold nPts points. |
[in] | viewPts | Input array in DgnCoordSystem::View |
[in] | nPts | Number 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.
[out] | npcPts | An array to receive the points in DgnCoordSystem::Npc. Must be dimensioned to hold nPts points. |
[in] | viewPts | Input array in DgnCoordSystem::View |
[in] | nPts | Number 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.
[out] | rootPts | An array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points. |
[in] | viewPts | Input array of DPoint4d coordinates in DgnCoordSystem::View |
[in] | nPts | Number 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.
[out] | rootPts | An array to receive the points in DgnCoordSystem::Root. Must be dimensioned to hold nPts points. |
[in] | viewPts | Input array in DgnCoordSystem::View |
[in] | nPts | Number 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.
[out] | screenPts | An array to receive the points in DgnCoordSystem::Screen. Must be dimensioned to hold nPts points. |
[in] | viewPts | Input array in DgnCoordSystem::View |
[in] | nPts | Number 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.
[in] | newCenterRoot | The position, in DgnCoordSystem::Root, for the new center of the frustum. If NULL, center is unchanged. |
[in] | factor | Scale 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] | normalizeCamera | if true, renormalize camera after zoom. |