Options control structure for fitting views. More...
Classes | |
struct | CameraInfo |
struct | RenderFlags |
The flags that control rendering information. More... | |
struct | Latitude |
The flags that control solar/lighting positions. More... | |
struct | SolarTime |
The flags that control solar/lighting information. More... | |
struct | RenderInfo |
The flags that control rendering information. More... | |
struct | fitViewOptions |
struct | namedViewProperties |
Name, name space and description for saved views. More... | |
struct | asynch_window_event |
The flags that control view information. More... | |
struct | v5RenderInfo |
The flags that control rendering information. More... | |
Typedefs | |
typedef int(* | ViewFunc_Update )(bool isPreUpdate, DgnPlatform::DgnDrawMode eraseMode, DgnModelRefListP modelList, int numRegions, Asynch_update_view regions[], ViewContextP context, int numCovers[], MSDisplayDescr *displayDescr[]) |
Callback that is called before or after each view updates. More... | |
typedef void(* | ViewFunc_Motion )(MSWindowP window, int xCoord, int yCoord) |
Mdl applications typically show the user what is happening as the cursor moves using the dynamic functions (mdlState_dynamicUpdate and StateCallback::SetComplexDynamicsFunction). More... | |
typedef SubstituteElemStatus(* | ViewFunc_SubstituteElem )(MSElementDescrH newElem, ViewportP viewport, DgnPlatform::DrawPurpose purpose, ViewContextP context, ElementHandleCP elem) |
Callback function to modify the display of elements in MicroStation views. More... | |
typedef struct fitViewOptions | FitViewOptions |
typedef int(* | ViewIteratorFunctionP )(int *mayContinueP, UInt32 filePos, MSElementDescrCP eDP, CallbackArgP userDataP) |
UserFunction called when traversing saved views. More... | |
typedef struct namedViewProperties | NamedViewProperties |
Name, name space and description for saved views. More... | |
typedef struct asynch_window_event | Asynch_window_event |
The flags that control view information. More... | |
typedef struct v5RenderInfo | V5RenderInfo |
The flags that control rendering information. More... | |
Functions | |
void | mdlView_defaultCursor () |
Cancel any special cursor behavior for MicroStation views and return to the default crosshair cursor. More... | |
int | mdlView_fit (int viewNumber, DgnModelRefListP modelRefList) |
Scan the list of models indicated by modelRefList to set the display extents of view viewNumber to fit all found elements. More... | |
int | mdlView_fitEx (int viewNumber, DgnModelRefListP modelRefList, bool doRasterRefFit, FitViewOptions const *options) |
Extended version of mdlView_fit. More... | |
bool | mdlView_isModelActive (int viewIndex) |
Determine whether the model displayed in the specified view window is the currently active model. More... | |
bool | mdlView_is3d (int viewNum) |
DgnModelRefP | mdlView_getRootModel (int viewIndex) |
Get the DgnModelRefP of the root model that is currently displayed in a specific view. More... | |
StatusInt | mdlView_setModel (DgnModelRefP modelRef, int viewIndex) |
Set the given view's model ID. More... | |
int | mdlView_getCamera (Dpoint3d *position, Dpoint3d *target, double *angle, double *focalLength, int *lensNumber, int view) |
Get the camera settings for a view. More... | |
int | mdlView_getParameters (Dpoint3d *origin, Dpoint3d *center, Dpoint3d *delta, RotMatrixP rMatrix, double *activeZ, int view) |
Get the view settings for a view. More... | |
int | mdlView_getParametersWithExpandedDepth (Dpoint3d *origin, Dpoint3d *center, Dpoint3d *delta, RotMatrixP rMatrix, double *activeZ, int view, bool expandDepth) |
Identical to mdlView_getParameters, excep that it has an additional argument that will optionally expand the depth for a 3D view with front or back clipping turned off to encompass all of the geometry in the view. More... | |
StatusInt | mdlView_getStandard2 (RotMatrixP rMatrixP, DgnPlatform::StandardView stdViewNum, DgnModelRefP modelRef) |
Get one of the standard rotation matrices, relative to the active coordinate system of the specified model. More... | |
void | mdlView_getStandard (RotMatrixP rMatrixP, DgnPlatform::StandardView stdViewNum) |
Get one of the standard rotation matrices. More... | |
int | mdlView_getStandardCameraLens (double *angle, double *focalLength, int lensNumber) |
Return the camera angle and focal length for the standard camera lenses supported by MicroStation. More... | |
bool | mdlView_isActive (int viewNumber) |
Determine whether a view is "active" (turned on). More... | |
int | mdlView_isVisible (int viewNumber) |
Determine whether a view is visible. More... | |
DgnPlatform::StandardView | mdlView_isStandard (RotMatrixCP trans) |
Determine whether a rotation matrix matches a standard view rotation matrix. More... | |
int | mdlView_rotateToRMatrix (RotMatrixP rMatrix, int view) |
Rotate a view to the rotation matrix given by rMatrix. More... | |
int | mdlView_setActiveDepth (int viewNumber, double depth) |
Change the active depth for a view. More... | |
int | mdlView_setActiveDepthPoint (int viewNumber, Dpoint3d *points) |
Change the active depth for a view using a point on the new active depth plane. More... | |
int | mdlView_setArea (int viewNumber, Dpoint3d const *pt, Dpoint3d const *zOrg, double zDelta, double actZdepth, RotMatrixCP rotMatrix) |
Set the viewing area for a view. More... | |
int | mdlView_setCameraLens (double angle, int view) |
Set the camera lens angle for a view. More... | |
int | mdlView_getDisplayControl (int paramNum, int viewNum) |
Get view display control attributes. More... | |
int | mdlView_setDisplayControl (int paramNum, int viewNum, int value) |
Set view display control attributes. More... | |
int | mdlView_setDisplayDepth (int viewNumber, double frontDepth, double backDepth) |
Change the front and back clipping planes for a view. More... | |
int | mdlView_setDisplayDepthPoints (int viewNumber, Dpoint3d *points) |
Change the front and back clipping planes for a view using two points. More... | |
static ViewFunc_Update | SetUpdatePreFunction (ViewFunc_Update newFunc) |
An MDL application can use this to set a function to be called before a view updates. More... | |
static ViewFunc_Update | SetUpdatePostFunction (ViewFunc_Update newFunc) |
An MDL application can use this to set a function to be called after a view updates. More... | |
static ViewFunc_Motion | SetMotionFunction (ViewFunc_Motion newFunc) |
An MDL application can use this to set a function to be called when the cursor moved in a view. More... | |
static ViewFunc_Motion | SetNoMotionFunction (ViewFunc_Motion newFunc) |
An MDL application can use this to set a function to be called when the cursor is stopped in a view. More... | |
static ViewFunc_SubstituteElem | SetSubstituteElemFunction (ViewFunc_SubstituteElem substFunc) |
Set or clear an "element substitution hook" to modify the display of elements in MicroStation views. More... | |
DItem_PulldownMenu * | mdlView_setPopupMenu (UInt32 menuType, long menuId, MdlDesc *ownerMD) |
Set the menu that pops up when the user presses <shift-reset> inside a MicroStation view. More... | |
void | mdlView_synchWithTCB (int viewNumber) |
Synchronizes the private view information that MicroStation maintains separately for each view with the "public" view information that is maintained in the TCB. More... | |
int | mdlView_turnOff (int viewNumber) |
Turn off a MicroStation view. More... | |
int | mdlView_turnOn (int viewNumber) |
Turn on a MicroStation View using the current view parameters. More... | |
int | mdlView_reopen (int viewNumber) |
Close and reopen the view specified by viewNumber. More... | |
void | mdlView_updateMulti (bool viewDraw[], bool incremental, DgnPlatform::DgnDrawMode drawMode, DgnModelRefListP modelRefList, bool startEndMsg) |
Update one or more views. More... | |
void | mdlView_updateMultiEx (bool viewDraw[], bool incremental, DgnPlatform::DgnDrawMode drawMode, DgnModelRefListP modelRefList, bool startEndMsg, bool updateViewTitle) |
Update one or more views. More... | |
int | mdlView_updateSingle (int viewNumber) |
Update a single view. More... | |
int | mdlView_zoom (int outView, int inView, Dpoint3d const *centerPoint, double zoomFactor) |
Change a view's viewing extents. More... | |
int | mdlView_pointToScreen (Point2dP screenPointP, DPoint3dCP uorPointP, int viewNumber, DgnPlatform::DgnCoordSystem coordinateSystem) |
Calculate a screen position for an input point. More... | |
int | mdlView_screenToPoint (DPoint3dP uorPointP, Point2d *screenPointP, int viewNumber, DgnPlatform::DgnCoordSystem coordSystem) |
Calculates the world coordinates given a point on the screen. More... | |
void | mdlView_getViewRectangle (BSIRect *viewRectP, MSWindow *windowP, DgnPlatform::DgnCoordSystem coordSystem) |
Get the screen area taken up by a view. More... | |
int | mdlView_queuePartialUpdate (int viewNumber, BSIRect *rectsP, int numRects) |
Update one or more subparts of a MicroStation view. More... | |
int | mdlView_newWindowCenter (int viewNumber, DPoint3dCP newCenterP) |
Set a new window center without changing the orientation or scale of the view. More... | |
void | mdlView_pan (Point2d const *distance, int viewNumber, bool doUpdate) |
Move a view by a specified number of pixels, relative to it's current location. More... | |
int | mdlView_indexFromWindow (MSWindow *window) |
Get the view number from a pointer to the MSWindow of the view. More... | |
int | mdlView_setCameraParameters (Dpoint3d *positionP, Dpoint3d *targetP, Dpoint3d *upVectorP, double *angleP, double *aspectRatioP, DRange2dP screenWindowP, double *frontClipDist, double *backClipDist, int view) |
Set the camera parameters for a view. More... | |
double | mdlView_cameraLensLengthFromAngle (double angle) |
Get the length in millimeters of a camera lens that corresponds to the specified field of vision angle in degrees. More... | |
double | mdlView_cameraLensAngleFromLength (double focalLength) |
Get the angle of the field of vision in degrees for a camera lens of the specified focal length in millimeters. More... | |
int | mdlView_computeCameraRotMatrix (RotMatrixP rotMatrix, DPoint3dCP viewZ, DPoint3dCP upVector) |
Compute the rotation matrix of the camera for the view. More... | |
int | mdlView_getCameraParameters (Dpoint3d *positionP, Dpoint3d *targetP, Dpoint3d *upVectorP, double *angleP, DRange2dP screenWindowP, double *frontClipDist, double *backClipDist, int view) |
Get the camera parameters for a view. More... | |
StatusInt | mdlView_getHomogeneousMaps (DPoint4d *worldEye, DPoint4d *viewEye, DMap4d *worldToViewMap, DMap4d *worldToNPCMap, DMatrix4d *worldToFocalPlane, DMatrix4d *viewToFocalPlane, double *focalLength, double *nPCFocalPlaneDepth, int viewNumber) |
Retrieve various homogeneous maps for a MicroStation view transform. More... | |
BitMaskCP | mdlView_getLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, DgnPlatform::ViewLevelDisplayType levelDisplayType) |
Get the level-mask for a model and view number. More... | |
int | mdlView_setLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, BitMaskCP pViewLevelMask, bool doUpdate) |
Set the level display mask for the specified model and view. More... | |
int | mdlView_changeLevelDisplayMask (DgnModelRefP modelRef, int iViewNum, BitMaskCP levelMask, LevelMaskOperation operation, bool doUpdate) |
Change the level display for specified model and view. More... | |
int | mdlView_setLevelDisplayMaskMulti (DgnModelRefP modelRef, bool *viewList, BitMaskCP viewLevelMask, bool doUpdate) |
Set the level mask for multiple views from the given level mask. More... | |
int | mdlView_changeLevelDisplayMaskMulti (DgnModelRefP modelRef, bool *viewList, BitMaskCP levelMask, LevelMaskOperation operation, bool doUpdate) |
Change the display flag. More... | |
int | mdlView_getLevelDisplay (bool *viewLevelDisplay, DgnModelRefP modelRef, int iViewNum, DgnPlatform::LevelId iLevelId, DgnPlatform::ViewLevelDisplayType levelDisplayType) |
Determine whether a level is displayed in a view. More... | |
int | mdlView_setLevelDisplay (DgnModelRefP modelRef, int iViewNum, DgnPlatform::LevelId iLevelId, bool levelDisplay) |
Set the display of a level in a view. More... | |
int | mdlView_getLevels (short *v7LevelMask, int iViewNumIn) |
Get information about the levels that are on for the master design file for a view. More... | |
StatusInt | mdlView_updateViewInfo (ViewInfoCP viewInfoP) |
Update the global view information to match the data passed to this function. More... | |
int | mdlView_getMaxCount () |
Get the maximum number of views that can be opened by MicroStation. More... | |
bool | mdlView_isValidIndex (int index) |
Test whether a value is a valid view index value. More... | |
StatusInt | mdlView_getFlags (DgnPlatform::ViewFlags *viewFlags, int viewIndex) |
Get the view settings flags for a view. More... | |
StatusInt | mdlView_setFlags (DgnPlatform::ViewFlags *viewFlags, int viewIndex) |
Set the view settings flags for a view. More... | |
StatusInt | mdlView_copyCamera (DgnPlatform::CameraInfo *cameraInfo, int index) |
Retrieve a copy of the current camera information from the specified view. More... | |
StatusInt | mdlView_attachNamed (WCharCP inName, WCharCP inNameSpace, int viewNumber) |
Search for a named view by its name and, if found, attach the view to the indicated view. More... | |
void | mdlView_setUpApplyOpts (Bentley::DgnPlatform::ApplyViewOptions *applyOptsP, int type) |
Set initial values for viewport info options. More... | |
StatusInt | mdlView_attachNamedWithOptions (WCharCP inName, WCharCP inNameSpace, int viewNumber, Bentley::DgnPlatform::ApplyViewOptions const *applyOptsP) |
Search for a named view by its name and, if found, attach the view to the indicated view using the given options. More... | |
StatusInt | mdlView_saveNamed (WCharCP viewNameP, WCharCP descriptionP, WCharCP viewNameSpace, int view) |
Save the current settings for one of the view windows to a named view element using the given name and description. More... | |
StatusInt | mdlView_deleteNamed (WCharCP inName, WCharCP inNameSpace) |
Find a named view element with the specified name and, if found, delete it. More... | |
StatusInt | mdlView_findNamed (DgnPlatform::ViewInfoPtr *viewInfoP, DgnPlatform::ViewPortInfoPtr *viewPortInfoP, WCharCP viewName, WCharCP viewNameSpace) |
Search for a named view of the specified name and, if found, retrieve the view and viewport information from the view element. More... | |
void | mdlView_getDefaultFlags (DgnPlatform::ViewFlags *viewFlagsP) |
Set the flags in the given DgnPlatform::ViewFlags structure to their default setting. More... | |
StatusInt | mdlView_fitToFence (Dpoint2d *fencePtsP, int viewIndex, long numPoints) |
Fit the contents of the current fence in the specified view. More... | |
StatusInt | mdlView_fitViewToRange (DPoint3dCP minP, DPoint3dCP maxP, FitViewOptions const *optionsP, int viewIndex) |
Fit the contents of the specified range in the given view. More... | |
bool | mdlView_treatAs3D (int viewIndex) |
Determine whether the specified view should be treated as 3D. More... | |
StatusInt | mdlView_setClipBoundaryElement (int viewIndex, DgnPlatform::ElementId elementID) |
Set the view's clip volume. More... | |
StatusInt | mdlView_getClipBoundaryElement (DgnPlatform::ElementId *pElementId, int viewIndex) |
Get the view's clip volume. More... | |
StatusInt | mdlView_setClipMaskElement (int viewIndex, DgnPlatform::ElementId elementID) |
Set the view's clip mask. More... | |
StatusInt | mdlView_getClipMaskElement (DgnPlatform::ElementId *pElementId, int viewIndex) |
Get the view's clip volume. More... | |
ViewportP | mdlView_getViewport (int viewIndex) |
Get an DgnPlatform::Viewport by view index. More... | |
WCharCP | mdlView_getToolBoxPath (int viewIndex, int toolBoxIndex, bool b3D) |
Get a path to the view toolbox by view index and toolbox index. More... | |
void | mdlView_setToolBoxPath (int viewIndex, int toolBoxIndex, bool b3D, WCharCP pToolBoxPath) |
Set the view toolbox based on path by view index and toolbox index. More... | |
WCharCP | mdlView_getToolBoxName (int viewIndex, int toolBoxIndex, bool b3D) |
Get a name to the view toolbox by view index and toolbox index. More... | |
void | mdlView_setToolBoxName (int viewIndex, int toolBoxIndex, bool b3D, WCharCP pToolBoxName) |
Set the view toolbox based on name by view index and toolbox index. More... | |
RscId | mdlView_getToolBoxId (int viewIndex, int toolBoxIndex, bool b3D) |
Get a id to the view toolbox by view index and toolbox index. More... | |
void | mdlView_setToolBoxId (int viewIndex, int toolBoxIndex, bool b3D, RscId toolBoxId) |
Set the view toolbox based on id by view index and toolbox index. More... | |
void | mdlView_reloadToolBoxes (int viewIndex) |
Reload the toolboxes for a given view based on view index. More... | |
bool | mdlView_getViewToolsDisplay (int viewIndex) |
Get whether the view toolboxes are displayed for a given view index. More... | |
void | mdlView_setViewToolsDisplay (int viewIndex, bool display) |
Set whether the view toolboxes are displayed for a given view index. More... | |
DgnPlatform::ISprite * | mdlViewManager_loadSpriteFromRsrc (int rsrcId, HINSTANCE *hInstancePtr) |
Create a sprite from a resource . More... | |
DgnPlatform::ISprite * | mdlViewManager_createSpriteFromIcon (HICON *icon, bool useAlpha) |
Create a sprite from an icon . More... | |
ADD_BENTLEY_ENUM_TYPEDEF (MstnPlatform::Element, ElementTemplateStatus, ElementTemplateStatusEnum) typedef struct asynch_update_view | |
The flags that control view information. More... | |
Options control structure for fitting views.
typedef struct asynch_window_event Asynch_window_event |
The flags that control view information.
typedef struct fitViewOptions FitViewOptions |
typedef struct namedViewProperties NamedViewProperties |
Name, name space and description for saved views.
typedef struct v5RenderInfo V5RenderInfo |
The flags that control rendering information.
typedef void(* ViewFunc_Motion)(MSWindowP window, int xCoord, int yCoord) |
Mdl applications typically show the user what is happening as the cursor moves using the dynamic functions (mdlState_dynamicUpdate and StateCallback::SetComplexDynamicsFunction).
However, applications that need to show another indicator can use the cursor motion and no-motion functions.
[in] | MSWindowP | points to the window containing the cursor. |
[in] | xCoord | cursor location x |
[in] | yCoord | cursor location y |
typedef SubstituteElemStatus(* ViewFunc_SubstituteElem)(MSElementDescrH newElem,ViewportP viewport, DgnPlatform::DrawPurpose purpose, ViewContextP context, ElementHandleCP elem) |
Callback function to modify the display of elements in MicroStation views.
This callback replaces the previous UPDATE_EACH_ELEMENT hook from mdlView_setFunction.
[out] | newElem | an element descriptor that will be used in place of the input element. To change a property of an element, implementers should duplicate the DgnPlatform::MSElementDescr from elem, modifiy the duplicate, and return it as *newElem. |
[in] | viewport | the viewport in which the element is being displayed. |
[in] | purpose | the purpose for which the element is being displayed. |
[in] | context | the "context" that is performing the display. (NOTE: this value is currently not useful for application callers and is provided for future compatibility). |
[in] | elem | the element being displayed. |
typedef int(* ViewFunc_Update)(bool isPreUpdate, DgnPlatform::DgnDrawMode eraseMode, DgnModelRefListP modelList, int numRegions, Asynch_update_view regions[], ViewContextP context, int numCovers[], MSDisplayDescr *displayDescr[]) |
Callback that is called before or after each view updates.
[in] | isPreUpdate | true if the view has not been updated yet. |
[in] | eraseMode,indicates | the mode with which MicroStation is drawing elements on the screen. |
[in] | modelList,a | list of models involved in the update. |
[in] | numRegions,gives | the number of regions being updated. The regions being updated to not necessarily correspond to the views, although they will all be contained in views. |
[in] | regions,an | array of structures describing the regions being updated. The elements of this array give all view-related information required for each region. |
[in] | context,The | view context. |
[in] | numCovers | param[in] displayDescr an array of pointers to structures of display descriptors. With one descriptor for each region to be updated. |
typedef int(* ViewIteratorFunctionP)(int *mayContinueP, UInt32 filePos, MSElementDescrCP eDP, CallbackArgP userDataP) |
UserFunction called when traversing saved views.
[out] | mayContinueP | true means keep going, false means stop now. |
[in] | filePos | file position of current element. |
[in] | eDP | pointer to the element descr holding the element, do not free this. |
[in] | userDataP | user argument that specified in the mdlView_traverseNamedViews function. |
ADD_BENTLEY_ENUM_TYPEDEF | ( | MstnPlatform::Element | , |
ElementTemplateStatus | , | ||
ElementTemplateStatusEnum | |||
) |
The flags that control view information.
StatusInt mdlView_attachNamed | ( | WCharCP | inName, |
WCharCP | inNameSpace, | ||
int | viewNumber | ||
) |
Search for a named view by its name and, if found, attach the view to the indicated view.
[in] | inName | the name of the named view element to be searched for. |
[in] | inNameSpace | the name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to attach named views not available to the user via the saved views application. |
[in] | viewNumber | the view number to which the found view will be attached. |
StatusInt mdlView_attachNamedWithOptions | ( | WCharCP | inName, |
WCharCP | inNameSpace, | ||
int | viewNumber, | ||
Bentley::DgnPlatform::ApplyViewOptions const * | applyOptsP | ||
) |
Search for a named view by its name and, if found, attach the view to the indicated view using the given options.
[in] | inName | the name of the named view element to be searched for. |
[in] | inNameSpace | the name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to attach named views not available to the user via the saved views application. |
[in] | viewNumber | the view number to which the found view will be attached. |
[in] | applyOptsP | NULL for default or the options to use for the attach process. |
double mdlView_cameraLensAngleFromLength | ( | double | focalLength | ) |
Get the angle of the field of vision in degrees for a camera lens of the specified focal length in millimeters.
[in] | focalLength | length (mm) |
double mdlView_cameraLensLengthFromAngle | ( | double | angle | ) |
Get the length in millimeters of a camera lens that corresponds to the specified field of vision angle in degrees.
This length is useful to users who relate to lens lengths rather than angles.
[in] | angle | angle (degrees) |
int mdlView_changeLevelDisplayMask | ( | DgnModelRefP | modelRef, |
int | iViewNum, | ||
BitMaskCP | levelMask, | ||
LevelMaskOperation | operation, | ||
bool | doUpdate | ||
) |
Change the level display for specified model and view.
The levels that are to be turned On, Off, or Toggled are specified in the form of a bit-mask.
[in] | modelRef | model |
[in] | iViewNum | view number. |
[in] | levelMask | bit-mask of levels whose display mode is to be changed as per operation. |
[in] | operation | indicates whether levels specifed in levelMask are to be turned on, off, or toggled. |
[in] | doUpdate | If ON, then redraw the view. |
int mdlView_changeLevelDisplayMaskMulti | ( | DgnModelRefP | modelRef, |
bool * | viewList, | ||
BitMaskCP | levelMask, | ||
LevelMaskOperation | operation, | ||
bool | doUpdate | ||
) |
Change the display flag.
This functions similar to mdlView_changeLevelDisplayMask, except that it applies the operation to the levels of the list of specified views.
[in] | modelRef | model |
[in] | viewList | is an array of DgnPlatform::MAX_VIEWS bool each representing a view. A non-zero value indicates that view is to be updated from the BitMask given by "pLevelMask". |
[in] | levelMask | bit-mask of levels whose display mode is to be changed as per operation |
[in] | operation | indicates whether levels specifed in levelMask are to be turned on, off, or toggled. |
[in] | doUpdate | if ON, then redraw the view. |
int mdlView_computeCameraRotMatrix | ( | RotMatrixP | rotMatrix, |
DPoint3dCP | viewZ, | ||
DPoint3dCP | upVector | ||
) |
Compute the rotation matrix of the camera for the view.
[out] | rotMatrix | the computed rotation matrix |
[in] | viewZ | the Z axis of the view |
[in] | upVector | the up vector for the camera |
StatusInt mdlView_copyCamera | ( | DgnPlatform::CameraInfo * | cameraInfo, |
int | index | ||
) |
Retrieve a copy of the current camera information from the specified view.
[out] | cameraInfo | the copied camera information. |
[in] | index | the view number from which the camera information is copied. |
void mdlView_defaultCursor | ( | ) |
Cancel any special cursor behavior for MicroStation views and return to the default crosshair cursor.
StatusInt mdlView_deleteNamed | ( | WCharCP | inName, |
WCharCP | inNameSpace | ||
) |
Find a named view element with the specified name and, if found, delete it.
[in] | inName | the name of the view element to be deleted. |
[in] | inNameSpace | the name space of the named view element to be searched for, using NULL will cause the search to go against the user managed named views. Using a value other than NULL allows applications to delete named views not available to the user via the saved views application. |
StatusInt mdlView_findNamed | ( | DgnPlatform::ViewInfoPtr * | viewInfoP, |
DgnPlatform::ViewPortInfoPtr * | viewPortInfoP, | ||
WCharCP | viewName, | ||
WCharCP | viewNameSpace | ||
) |
Search for a named view of the specified name and, if found, retrieve the view and viewport information from the view element.
[out] | viewInfoP | the view information returned in a DgnPlatform::ViewInfo structure. If this information is not needed, pass NULL to the function in this argument. |
[out] | viewPortInfoP | the view port information returned in a DgnPlatform::ViewPortInfo structure. |
[in] | viewName | the name of the view to search for in the master design file. |
[in] | viewNameSpace | saved view name space, NULL means public, user managed save views. |
int mdlView_fit | ( | int | viewNumber, |
DgnModelRefListP | modelRefList | ||
) |
Scan the list of models indicated by modelRefList to set the display extents of view viewNumber to fit all found elements.
[in] | viewNumber | designates which view to fit (starting with 0 for the view labeled View 1). |
[in] | modelRefList | contains the list of models to include in the view. |
int mdlView_fitEx | ( | int | viewNumber, |
DgnModelRefListP | modelRefList, | ||
bool | doRasterRefFit, | ||
FitViewOptions const * | options | ||
) |
Extended version of mdlView_fit.
[in] | viewNumber | designates which view to fit (starting with 0 for the view labeled View 1). |
[in] | modelRefList | contains the list of models to include in the view. |
[in] | doRasterRefFit | if true, include raster references in fit calculations. |
[in] | options | the FitViewOptions to apply to the view |
StatusInt mdlView_fitToFence | ( | Dpoint2d * | fencePtsP, |
int | viewIndex, | ||
long | numPoints | ||
) |
Fit the contents of the current fence in the specified view.
[in] | fencePtsP | the array of points that are vertices of the fence |
[in] | viewIndex | the view in which the fence contents are fit |
[in] | numPoints | the number of points in the fence |
StatusInt mdlView_fitViewToRange | ( | DPoint3dCP | minP, |
DPoint3dCP | maxP, | ||
FitViewOptions const * | optionsP, | ||
int | viewIndex | ||
) |
Fit the contents of the specified range in the given view.
[in] | minP | the minimum X Y and Z values of the range |
[in] | maxP | the maximum X Y and Z values of the range |
[in] | optionsP | the FitViewOptions to apply to the view when it is redrawn |
[in] | viewIndex | the index of the view to fit the specified range block in |
int mdlView_getCamera | ( | Dpoint3d * | position, |
Dpoint3d * | target, | ||
double * | angle, | ||
double * | focalLength, | ||
int * | lensNumber, | ||
int | view | ||
) |
Get the camera settings for a view.
All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.
[out] | position | a Dpoint3d to receive the camera position. |
[out] | target | a Dpoint3d to receive the camera target. |
[out] | angle | a double to contain the camera field of vision angle in degrees. |
[out] | focalLength | alternative way to express the camera angle in parameters that correspond to the standard 35 millimeter camera. focalLength points to a double to contain the focal length in millimeters. |
[out] | lensNumber | an integer specifying standard 35 mm lense |
[in] | view | index of view |
Obviously, it is not possible to display items that are behind the camera,and items that are very close to the camera also cause problems as they end up being magnified excessively. MicroStation therefore truncates views at a fixed fraction of the focal length (approximately 1/50), effectively ignoring the tip of the viewing pyramid.
int mdlView_getCameraParameters | ( | Dpoint3d * | positionP, |
Dpoint3d * | targetP, | ||
Dpoint3d * | upVectorP, | ||
double * | angleP, | ||
DRange2dP | screenWindowP, | ||
double * | frontClipDist, | ||
double * | backClipDist, | ||
int | view | ||
) |
Get the camera parameters for a view.
If any of the parameters are not required, NULL may be specified for the parameter pointer.
[out] | positionP | the camera position. |
[out] | targetP | the target position. |
[out] | upVectorP | is always perpendicular to the camera axis. |
[out] | angleP | camera field of view angle (in radians). |
[out] | screenWindowP | portion of the image plane that is displayed. |
[out] | frontClipDist | distance from the camera to the front of the clipping plane |
[out] | backClipDist | distance from the camera to the back of the clipping plane |
[in] | view | view number |
StatusInt mdlView_getClipBoundaryElement | ( | DgnPlatform::ElementId * | pElementId, |
int | viewIndex | ||
) |
Get the view's clip volume.
[out] | pElementId | the element ID of the clip volume |
[in] | viewIndex | the index of the view |
StatusInt mdlView_getClipMaskElement | ( | DgnPlatform::ElementId * | pElementId, |
int | viewIndex | ||
) |
Get the view's clip volume.
[out] | pElementId | the element ID of the clip mask |
[in] | viewIndex | the index of the view |
void mdlView_getDefaultFlags | ( | DgnPlatform::ViewFlags * | viewFlagsP | ) |
Set the flags in the given DgnPlatform::ViewFlags structure to their default setting.
[out] | viewFlagsP | a DgnPlatform::ViewFlags structure in which the flags will be set to their default setting. |
int mdlView_getDisplayControl | ( | int | paramNum, |
int | viewNum | ||
) |
Get view display control attributes.
[in] | paramNum | specifies the view attribute is get. Any of the VIEWCONTROL_ values in mdl.h |
[in] | viewNum | specifies the view. |
StatusInt mdlView_getFlags | ( | DgnPlatform::ViewFlags * | viewFlags, |
int | viewIndex | ||
) |
Get the view settings flags for a view.
[out] | viewFlags | a copy of the DgnPlatform::ViewFlags structure for the indicated view. |
[in] | viewIndex | the view number for which the flags information is retrieved. |
StatusInt mdlView_getHomogeneousMaps | ( | DPoint4d * | worldEye, |
DPoint4d * | viewEye, | ||
DMap4d * | worldToViewMap, | ||
DMap4d * | worldToNPCMap, | ||
DMatrix4d * | worldToFocalPlane, | ||
DMatrix4d * | viewToFocalPlane, | ||
double * | focalLength, | ||
double * | nPCFocalPlaneDepth, | ||
int | viewNumber | ||
) |
Retrieve various homogeneous maps for a MicroStation view transform.
Any combination of the return parameters may be NULL.
[out] | worldEye | the eyepoint as a homogeneous point in world coordinates, i.e. 0 weight if flat view. |
[out] | viewEye | the eyepoint as a homogeneous point in the view frame. |
[out] | worldToViewMap | an invertible map from world coordinates to the local frame on the view plane. |
[out] | worldToNPCMap | an invertible map from world coordinates to the 01 cube of the view. |
[out] | worldToFocalPlane | a (singular) matrix which collapses geometry from world coordinates to the focal plane. |
[out] | viewToFocalPlane | a (singular) matrix which collapses geometry in the viewplane coordinate frame onto the view plane. |
[out] | focalLength | the focal length. Its value is 0 if the view is flat. |
[out] | nPCFocalPlaneDepth | the depth of the focal plane within the NPC box. |
[in] | viewNumber | view the information is retrieved from. |
int mdlView_getLevelDisplay | ( | bool * | viewLevelDisplay, |
DgnModelRefP | modelRef, | ||
int | iViewNum, | ||
DgnPlatform::LevelId | iLevelId, | ||
DgnPlatform::ViewLevelDisplayType | levelDisplayType | ||
) |
Determine whether a level is displayed in a view.
[out] | viewLevelDisplay | true if the level display is on for the given level in the given view, otherwise false. |
[in] | modelRef | the model containing the level. |
[in] | iViewNum | the view number. |
[in] | iLevelId | the id of the level in question. |
[in] | levelDisplayType | one of VIEW_LEVEL_DISPLAY_TYPE_... (defined in msdefs.h) |
BitMaskCP mdlView_getLevelDisplayMask | ( | DgnModelRefP | modelRef, |
int | iViewNum, | ||
DgnPlatform::ViewLevelDisplayType | levelDisplayType | ||
) |
Get the level-mask for a model and view number.
The level-mask is returned in the form of a bit-mask. It represents if a level is ON/OFF in the specified view.
[in] | modelRef | model |
[in] | iViewNum | view number |
[in] | levelDisplayType | one of VIEW_LEVEL_DISPLAY_TYPE_... (defined in msdefs.h) |
int mdlView_getLevels | ( | short * | v7LevelMask, |
int | iViewNumIn | ||
) |
Get information about the levels that are on for the master design file for a view.
[out] | v7LevelMask | An array of short integers with one bit for each level and dimensioned to 4. The lowest bit of v7LevelMask[0] is set to 1 if level 1 is on in the given view and to 0 if level 1 is off. Similarly, bit 1 of v7LevelMask[0] is set to the state of level 2. The highest bit (15) of v7LevelMask[3] represents the state of the special level reserved for cell headers. This bit is always on. |
[in] | iViewNumIn | view to get information from |
int mdlView_getMaxCount | ( | ) |
Get the maximum number of views that can be opened by MicroStation.
int mdlView_getParameters | ( | Dpoint3d * | origin, |
Dpoint3d * | center, | ||
Dpoint3d * | delta, | ||
RotMatrixP | rMatrix, | ||
double * | activeZ, | ||
int | view | ||
) |
Get the view settings for a view.
All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.
[out] | origin | a Dpoint3d to receive the view's origin. The view origin is the point on the back clipping plane's lower left corner. |
[out] | center | a Dpoint3d to receive the view's center, which is the center of the volume contained by the front and back clipping planes. |
[out] | delta | a Dpoint3d to receive the size of the view in the view's X, Y and Z directions. |
[out] | rMatrix | a RotMatrix to receive the view's rotation matrix. |
[out] | activeZ | a double to receive the active depth. Active depth is defined as the positive distance from the back clipping plane to the active depth plane. |
[in] | view | view number of interest. |
int mdlView_getParametersWithExpandedDepth | ( | Dpoint3d * | origin, |
Dpoint3d * | center, | ||
Dpoint3d * | delta, | ||
RotMatrixP | rMatrix, | ||
double * | activeZ, | ||
int | view, | ||
bool | expandDepth | ||
) |
Identical to mdlView_getParameters, excep that it has an additional argument that will optionally expand the depth for a 3D view with front or back clipping turned off to encompass all of the geometry in the view.
All settings other than viewNumber are returned in the current coordinate system. If any settings are NULL, MicroStation does not fill them in.
[out] | origin | a Dpoint3d to receive the view's origin. The view origin is the point on the back clipping plane's lower left corner. |
[out] | center | a Dpoint3d to receive the view's center, which is the center of the volume contained by the front and back clipping planes. |
[out] | delta | a Dpoint3d to receive the size of the view in the view's X, Y and Z directions. |
[out] | rMatrix | a RotMatrix to receive the view's rotation matrix. |
[out] | activeZ | a double to receive the active depth. Active depth is defined as the positive distance from the back clipping plane to the active depth plane. |
[in] | view | view number of interest. |
[in] | expandDepth | if true and the the front and back clipping is disabled, then the origin and delta are expanded to include the geometry. |
DgnModelRefP mdlView_getRootModel | ( | int | viewIndex | ) |
Get the DgnModelRefP of the root model that is currently displayed in a specific view.
[in] | viewIndex | the view number for which the model number is returned. |
void mdlView_getStandard | ( | RotMatrixP | rMatrixP, |
DgnPlatform::StandardView | stdViewNum | ||
) |
Get one of the standard rotation matrices.
[out] | rMatrixP | rotation matrix for given view |
[in] | stdViewNum | standard view number. Possible values are defined in msdefs.h. For example, StandardView::Top, StandardView::Bottom, etc. |
StatusInt mdlView_getStandard2 | ( | RotMatrixP | rMatrixP, |
DgnPlatform::StandardView | stdViewNum, | ||
DgnModelRefP | modelRef | ||
) |
Get one of the standard rotation matrices, relative to the active coordinate system of the specified model.
[out] | rMatrixP | rotation matrix for given view |
[in] | stdViewNum | standard view number. Possible values are defined in msdefs.h. For example, StandardView::Top, StandardView::Bottom, etc. |
modelRef | in model from which to get the ACS |
int mdlView_getStandardCameraLens | ( | double * | angle, |
double * | focalLength, | ||
int | lensNumber | ||
) |
Return the camera angle and focal length for the standard camera lenses supported by MicroStation.
The standard lens is specified by lensNumber in the following manner:
[out] | angle | lens angle in radians. |
[out] | focalLength | focal length of lens (mm). |
[in] | lensNumber | standard lens number. |
RscId mdlView_getToolBoxId | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D | ||
) |
Get a id to the view toolbox by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to retrieve info about the 2D or 3D toolbox |
WCharCP mdlView_getToolBoxName | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D | ||
) |
Get a name to the view toolbox by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to retrieve info about the 2D or 3D toolbox |
WCharCP mdlView_getToolBoxPath | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D | ||
) |
Get a path to the view toolbox by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to retrieve info about the 2D or 3D toolbox |
ViewportP mdlView_getViewport | ( | int | viewIndex | ) |
Get an DgnPlatform::Viewport by view index.
[in] | viewIndex | the index of the view |
void mdlView_getViewRectangle | ( | BSIRect * | viewRectP, |
MSWindow * | windowP, | ||
DgnPlatform::DgnCoordSystem | coordSystem | ||
) |
Get the screen area taken up by a view.
This does not include the area used for scrollbars and view control icons. Use mdlWindow_contentRectGetLocal to get the size of the entire view window.
[out] | viewRectP | view rectangle. |
[in] | windowP | view window. To get an MSWindow from a view number, use mdlWindow_viewWindowGet. |
[in] | coordSystem | Currently, the only valid argument is VIEW_GLOBALCOORDS. |
bool mdlView_getViewToolsDisplay | ( | int | viewIndex | ) |
Get whether the view toolboxes are displayed for a given view index.
[in] | viewIndex | the index of the view |
int mdlView_indexFromWindow | ( | MSWindow * | window | ) |
Get the view number from a pointer to the MSWindow of the view.
[in] | window | pointer to a view of type MSWindow. |
bool mdlView_is3d | ( | int | viewNum | ) |
[in] | viewNum | view to test. |
bool mdlView_isActive | ( | int | viewNumber | ) |
Determine whether a view is "active" (turned on).
[in] | viewNumber | view to check |
bool mdlView_isModelActive | ( | int | viewIndex | ) |
Determine whether the model displayed in the specified view window is the currently active model.
[in] | viewIndex | the view number for which the displayed model is found and tested against the currently active model. |
DgnPlatform::StandardView mdlView_isStandard | ( | RotMatrixCP | trans | ) |
Determine whether a rotation matrix matches a standard view rotation matrix.
This function helps identify whether a view is currently displaying a standard view.
[in] | trans | rotation matrix to test |
bool mdlView_isValidIndex | ( | int | index | ) |
Test whether a value is a valid view index value.
[in] | index | the index value to test for validity as a view index. |
int mdlView_isVisible | ( | int | viewNumber | ) |
Determine whether a view is visible.
Views will always be "visible" if they are turned on, so this function and mdlView_isActive will always return the same value. The distinction is historical, and they are both maintained for compatibility.
[in] | viewNumber | view to check |
int mdlView_newWindowCenter | ( | int | viewNumber, |
DPoint3dCP | newCenterP | ||
) |
Set a new window center without changing the orientation or scale of the view.
[in] | viewNumber | view for which the new view center is to be applied. |
[in] | newCenterP | new view center (in current coordinate system). |
void mdlView_pan | ( | Point2d const * | distance, |
int | viewNumber, | ||
bool | doUpdate | ||
) |
Move a view by a specified number of pixels, relative to it's current location.
[in] | distance | distance to pan, in pixels. |
[in] | viewNumber | view to pan |
[in] | doUpdate | if true, update the view after pan. |
int mdlView_pointToScreen | ( | Point2dP | screenPointP, |
DPoint3dCP | uorPointP, | ||
int | viewNumber, | ||
DgnPlatform::DgnCoordSystem | coordinateSystem | ||
) |
Calculate a screen position for an input point.
[out] | screenPointP | a Point2d structure that will hold the output point on return from the function. (Note: The point returned may be outside the range that can be displayed in the indicated view, depending on the input point and the area visible in the view.) |
[in] | uorPointP | the point (in the current coordinate system) for which screen coordinates are desired. |
[in] | viewNumber | view for screenPointP |
[in] | coordinateSystem | must be set to either DgnCoordSystem::Screen (local) or DgnCoordSystem::View (global). If DgnCoordSystem::View, screenPointP is relative to the upper left corner of the window, and if DgnCoordSystem::Screen, screenPointP is relative to the upper left corner of the screen. In both cases x increases to the right and y increases down the window. |
int mdlView_queuePartialUpdate | ( | int | viewNumber, |
BSIRect * | rectsP, | ||
int | numRects | ||
) |
Update one or more subparts of a MicroStation view.
[in] | viewNumber | view for which portions are to be updated. |
[in] | rectsP | array of rectangles for which updates are to be performed. They must be in global coordinates (i.e., relative to the upper left of the screen). |
[in] | numRects | the number of rectangles in the rectsP array. The maximum number of rectangles is 15. |
void mdlView_reloadToolBoxes | ( | int | viewIndex | ) |
Reload the toolboxes for a given view based on view index.
[in] | viewIndex | the index of the view |
int mdlView_reopen | ( | int | viewNumber | ) |
Close and reopen the view specified by viewNumber.
This function is equivalent to calling mdlView_turnOff followed by mdlView_turnOn, except that the stacking order of views maintained.
[in] | viewNumber | view to reopen |
int mdlView_rotateToRMatrix | ( | RotMatrixP | rMatrix, |
int | view | ||
) |
Rotate a view to the rotation matrix given by rMatrix.
[in] | rMatrix | rotation matrix |
[in] | view | view to rotate |
StatusInt mdlView_saveNamed | ( | WCharCP | viewNameP, |
WCharCP | descriptionP, | ||
WCharCP | viewNameSpace, | ||
int | view | ||
) |
Save the current settings for one of the view windows to a named view element using the given name and description.
[in] | viewNameP | the name to be given to the named view element when it is saved. |
[in] | descriptionP | the description to be given to the named view element when it is saved. |
[in] | viewNameSpace | the name space of the named view element. Using NULL will make this named view available to management by the end user via the save views application. Using a non-null value has the effect of making it a protected named view, which is only accessed by the API. |
[in] | view | the view number to be saved as a named view element. |
int mdlView_screenToPoint | ( | DPoint3dP | uorPointP, |
Point2d * | screenPointP, | ||
int | viewNumber, | ||
DgnPlatform::DgnCoordSystem | coordSystem | ||
) |
Calculates the world coordinates given a point on the screen.
The output is in the current coordinate system.
[out] | uorPointP | output point (in the current coordinate system) |
[in] | screenPointP | point for in screen coordinates |
[in] | viewNumber | view for screenPointP |
[in] | coordSystem | either DgnCoordSystem::View or DgnCoordSystem::Screen. If DgnCoordSystem::View, screenPointP is relative to the upper left corner of the window, with x increasing to the right and y increasing down the window. If VIEW_INGLOBALCOORDS, screenPointP is relative to the upper left corner of the screen. |
int mdlView_setActiveDepth | ( | int | viewNumber, |
double | depth | ||
) |
Change the active depth for a view.
The parameters are given in the current coordinate system.
[in] | viewNumber | view to set active depth |
[in] | depth | active depth distance. This value is a distance from the back clipping plane. It must be greater than zero and less than the current display depth. |
int mdlView_setActiveDepthPoint | ( | int | viewNumber, |
Dpoint3d * | points | ||
) |
Change the active depth for a view using a point on the new active depth plane.
[in] | viewNumber | view to set active depth |
[in] | points | point on active depth plane. |
int mdlView_setArea | ( | int | viewNumber, |
Dpoint3d const * | pt, | ||
Dpoint3d const * | zOrg, | ||
double | zDelta, | ||
double | actZdepth, | ||
RotMatrixCP | rotMatrix | ||
) |
Set the viewing area for a view.
All parameters are in the current coordinate system.
[in] | viewNumber | the view number to change. |
[in] | pt | an array of two points that, combined with the rotation matrix rMatrix, define the viewing rectangle. MicroStation adjusts the rectangle to match the view's actual aspect ratio. |
[in] | zOrg | a point that lies on the view's back clipping plane. If zOrigin is NULL, MicroStation uses (0, 0, 0) in the current coordinate system. |
[in] | zDelta | the distance from the back clipping plane to the front clipping plane. zDelta must be greater than zero. |
[in] | actZdepth | the distance from the back clipping plane to the view's active depth. actZDepth must be greater than zero and less than zDelta. |
[in] | rotMatrix | the view's rotation. If rMatrix is NULL, MicroStation uses the identity matrix (top view). |
int mdlView_setCameraLens | ( | double | angle, |
int | view | ||
) |
Set the camera lens angle for a view.
[in] | angle | lens angle in radians. |
[in] | view | view number. |
int mdlView_setCameraParameters | ( | Dpoint3d * | positionP, |
Dpoint3d * | targetP, | ||
Dpoint3d * | upVectorP, | ||
double * | angleP, | ||
double * | aspectRatioP, | ||
DRange2dP | screenWindowP, | ||
double * | frontClipDist, | ||
double * | backClipDist, | ||
int | view | ||
) |
Set the camera parameters for a view.
Since the camera parameters are not independent, it is possible to omit many of the camera parameter arguments. If NULL is passed for an argument, it is defaulted to the existing value or calculated from the other parameters as described below.
[in] | positionP | the position of the camera. |
[in] | targetP | the point at which the camera is aimed |
[in] | upVectorP | a vector that sets the y-axis for the camera view |
[in] | angleP | the camera field of view angle. The camera angle can be derived from the maximum of the view width and height and the distance from the camera to the image plane. If NULL is passed, the camera angle is unchanged. |
[in] | aspectRatioP | the view aspect ratio. This represents the view height divided by the view width. If NULL is passed, the aspect ratio of the view window is used. |
[in] | screenWindowP | defines the portion of the image plane that is displayed. The screen window coordinates are defined in an image plane coordinate system with an origin at the camera target. For a centered view, the screen window coordinates will be (-width/2, -height/2) (width/2, height/2). This corresponds the design of most modern cameras as the viewing direction is perpendicular to the camera plane. In an uncentered window, the image plane is tilted in relation to the viewing direction. This corresponds to a view, or bellows camera. If NULL is passed a centered window is calculated with the size derived from the view angle and distance to the image plane. |
[in] | frontClipDist | the distance from the camera to the front clipping plane. If NULL is passed for frontClipDist, the front clipping distance is arbitrarily set to the target distance divided by 300. |
[in] | backClipDist | The distance from the camera to the back clipping plane. If NULL is passed for backClipDist, the back clipping distance is set to the ten times the target distance. |
[in] | view | the index of the view for which the camera is being set. |
StatusInt mdlView_setClipBoundaryElement | ( | int | viewIndex, |
DgnPlatform::ElementId | elementID | ||
) |
Set the view's clip volume.
[in] | viewIndex | the index of the view |
[in] | elementID | the element ID of the clip volume, use 0 to clear the clip volume |
StatusInt mdlView_setClipMaskElement | ( | int | viewIndex, |
DgnPlatform::ElementId | elementID | ||
) |
Set the view's clip mask.
[in] | viewIndex | the index of the view |
[in] | elementID | the element ID of the clip volume, use 0 to clear the clip volume |
int mdlView_setDisplayControl | ( | int | paramNum, |
int | viewNum, | ||
int | value | ||
) |
Set view display control attributes.
[in] | paramNum | number of attribute to set. Any of the VIEWCONTROL_ values in mdl.h |
[in] | viewNum | view number |
[in] | value | new value to set view attribute to. |
int mdlView_setDisplayDepth | ( | int | viewNumber, |
double | frontDepth, | ||
double | backDepth | ||
) |
Change the front and back clipping planes for a view.
All parameters are given in the current coordinate system.
[in] | viewNumber | view to set display depth. |
[in] | frontDepth | front display depth |
[in] | backDepth | back display depth |
frontDepth
and backDepth
to define the positions of the front and back clipping planes. These values are signed distances from the current front clipping plane. int mdlView_setDisplayDepthPoints | ( | int | viewNumber, |
Dpoint3d * | points | ||
) |
Change the front and back clipping planes for a view using two points.
[in] | viewNumber | the index of the view being changed. |
[in] | points | an array of two points that define the clipping planes. |
StatusInt mdlView_setFlags | ( | DgnPlatform::ViewFlags * | viewFlags, |
int | viewIndex | ||
) |
Set the view settings flags for a view.
[in] | viewFlags | the DgnPlatform::ViewFlags structure holding the view flags information from which the indicated view's settings will be updated. |
[in] | viewIndex | the view number indicating the view to set. |
int mdlView_setLevelDisplay | ( | DgnModelRefP | modelRef, |
int | iViewNum, | ||
DgnPlatform::LevelId | iLevelId, | ||
bool | levelDisplay | ||
) |
Set the display of a level in a view.
[in] | modelRef | the model containing the level. |
[in] | iViewNum | the view number. |
[in] | iLevelId | the id of the level. |
[in] | levelDisplay | true if level display is to be turned on, otherwise false. |
int mdlView_setLevelDisplayMask | ( | DgnModelRefP | modelRef, |
int | iViewNum, | ||
BitMaskCP | pViewLevelMask, | ||
bool | doUpdate | ||
) |
Set the level display mask for the specified model and view.
The level display mask is specified in the form of a bit-mask. An ON value indicates that the corresponding level is to be turned on in the view. An OFF value indicates that the corresponding level is to be turned off in the view. Even if the bit-value is ON, that is no guarentee that elements on the level will be displayed. Refer to discussion in function mdlView_getLevelDisplayMask for more details.
[in] | modelRef | model |
[in] | iViewNum | view number |
[in] | pViewLevelMask | the view level bit-mask to be set. |
[in] | doUpdate | if ON, then redraw the view |
int mdlView_setLevelDisplayMaskMulti | ( | DgnModelRefP | modelRef, |
bool * | viewList, | ||
BitMaskCP | viewLevelMask, | ||
bool | doUpdate | ||
) |
Set the level mask for multiple views from the given level mask.
This function works similar to mdlView_setLevelDisplayMask, except that it applies the specified level-mask to the list of specified views.
[in] | modelRef | model |
[in] | viewList | an array of DgnPlatform::MAX_VIEWS bool, each representing a view. A non-zero value indicates that view is to be updated from the BitMask given by pViewLevelMask. |
[in] | viewLevelMask | view level bit-mask to set. |
[in] | doUpdate | IF ON, then redraw the views. |
StatusInt mdlView_setModel | ( | DgnModelRefP | modelRef, |
int | viewIndex | ||
) |
Set the given view's model ID.
[in] | modelRef | model ref to apply |
[in] | viewIndex | index of view |
DItem_PulldownMenu* mdlView_setPopupMenu | ( | UInt32 | menuType, |
long | menuId, | ||
MdlDesc * | ownerMD | ||
) |
Set the menu that pops up when the user presses <shift-reset> inside a MicroStation view.
The view popup can be used for quick access to command-specific options or parameters. The view popup is automatically reset to the default MicroStation popup whenever mdlState_startPrimitive is called.
[in] | menuType | the resource type for the menu. If menuType is 0 it defaults to RTYPE_PulldownMenu. |
[in] | menuId | the resource ID for the popup menu. |
[in] | ownerMD | MDL taskid of the owner of the menu. This parameter is usually NULL, meaning the the current task. |
void mdlView_setToolBoxId | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D, | ||
RscId | toolBoxId | ||
) |
Set the view toolbox based on id by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to set info about the 2D or 3D toolbox |
[in] | toolBoxId | the id of the toolbox |
void mdlView_setToolBoxName | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D, | ||
WCharCP | pToolBoxName | ||
) |
Set the view toolbox based on name by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to set info about the 2D or 3D toolbox |
[in] | pToolBoxName | the name of the toolbox |
void mdlView_setToolBoxPath | ( | int | viewIndex, |
int | toolBoxIndex, | ||
bool | b3D, | ||
WCharCP | pToolBoxPath | ||
) |
Set the view toolbox based on path by view index and toolbox index.
[in] | viewIndex | the index of the view |
[in] | toolBoxIndex | the index of the toolbox |
[in] | b3D | whether to set info about the 2D or 3D toolbox |
[in] | pToolBoxPath | the path of the toolbox |
void mdlView_setUpApplyOpts | ( | Bentley::DgnPlatform::ApplyViewOptions * | applyOptsP, |
int | type | ||
) |
Set initial values for viewport info options.
[in] | applyOptsP | the ApplyViewOptions structure in which the value is set |
[in] | type | the type of the value to set (see view.h for VIEW_APPLY_OPTS_* constants that can be used in this function) |
void mdlView_setViewToolsDisplay | ( | int | viewIndex, |
bool | display | ||
) |
Set whether the view toolboxes are displayed for a given view index.
[in] | viewIndex | the index of the view |
[in] | display | indicates whether the view toolboxes should display |
void mdlView_synchWithTCB | ( | int | viewNumber | ) |
Synchronizes the private view information that MicroStation maintains separately for each view with the "public" view information that is maintained in the TCB.
The reason that the private information is separated from the TCB information is that the private information reflects what is currently drawn on the screen. Elements will be undrawn in the same mode in which they were originally drawn, regardless of the current drawing mode.
For example, suppose that the state of the Fast Text Display is on when an element is originally drawn, and the user subsequently turns Fast Text Display off for a particular view and does not immediately update. Those text elements will be undrawn in Fast display mode until the next update. An application can override this normal behavior using mdlView_synchWithTCB. This allows an application to specify a draw mode in the TCB, and force MicroStation to immediately adopt this draw mode for the given view.
[in] | viewNumber | view to synchronize with the TCB. |
bool mdlView_treatAs3D | ( | int | viewIndex | ) |
Determine whether the specified view should be treated as 3D.
[in] | viewIndex | the index of the view to query |
int mdlView_turnOff | ( | int | viewNumber | ) |
Turn off a MicroStation view.
[in] | viewNumber | view to turn off |
int mdlView_turnOn | ( | int | viewNumber | ) |
Turn on a MicroStation View using the current view parameters.
The function does not return until the view is initially painted.
[in] | viewNumber | view to turn on |
void mdlView_updateMulti | ( | bool | viewDraw[], |
bool | incremental, | ||
DgnPlatform::DgnDrawMode | drawMode, | ||
DgnModelRefListP | modelRefList, | ||
bool | startEndMsg | ||
) |
Update one or more views.
[in] | viewDraw | views to update. Should be dimensioned to DgnPlatform::MAX_VIEWS, and viewDraw[i] controls whether view i is drawn. |
[in] | incremental | incremental update (meaning, don't erase before drawing). |
[in] | drawMode | possible values are DRAW_MODE_Normal, ERASE and HILITE. These values draw the elements normally, erase elements from the screen, and highlight elements, respectively. |
[in] | modelRefList | a list of the models to include in the view(s). If modelRefList is NULL, the master and all references are included. |
[in] | startEndMsg | if true, MicroStation displays the "Update in progress" and "Display complete" messages before and after the update. |
void mdlView_updateMultiEx | ( | bool | viewDraw[], |
bool | incremental, | ||
DgnPlatform::DgnDrawMode | drawMode, | ||
DgnModelRefListP | modelRefList, | ||
bool | startEndMsg, | ||
bool | updateViewTitle | ||
) |
Update one or more views.
[in] | viewDraw | views to update. Should be dimensioned to DgnPlatform::MAX_VIEWS, and viewDraw[i] controls whether view i is drawn. |
[in] | incremental | incremental update (meaning, don't erase before drawing). |
[in] | drawMode | possible values are DRAW_MODE_Normal, ERASE and HILITE. These values draw the elements normally, erase elements from the screen, and highlight elements, respectively. |
[in] | modelRefList | a list of the models to include in the view(s). If modelRefList is NULL, the master and all references are included. |
[in] | startEndMsg | if true, MicroStation displays the "Update in progress" and "Display complete" messages before and after the update. |
[in] | updateTitle | if true, will update window title |
int mdlView_updateSingle | ( | int | viewNumber | ) |
Update a single view.
[in] | viewNumber | the view number to update. |
StatusInt mdlView_updateViewInfo | ( | ViewInfoCP | viewInfoP | ) |
Update the global view information to match the data passed to this function.
[in] | viewInfoP | the view information with which the global view information will be updated. The view number is contained within the view info information. |
int mdlView_zoom | ( | int | outView, |
int | inView, | ||
Dpoint3d const * | centerPoint, | ||
double | zoomFactor | ||
) |
Change a view's viewing extents.
[in] | outView | view to change parameters |
[in] | inView | view to get parameters from (can be the same as outView). |
[in] | centerPoint | point to zoom about |
[in] | zoomFactor | zoom ratio; if it is greater than 1.0, the effect is to zoom out. If zoomFactor is less than 1.0, the effect is to zoom in. A zoomFactor of 1.0 can be used to center the window. |
DgnPlatform::ISprite* mdlViewManager_createSpriteFromIcon | ( | HICON * | icon, |
bool | useAlpha | ||
) |
Create a sprite from an icon .
[in] | icon | the windows icon |
[in] | useAlpha | use the alpha in the icon |
DgnPlatform::ISprite* mdlViewManager_loadSpriteFromRsrc | ( | int | rsrcId, |
HINSTANCE * | hInstancePtr | ||
) |
Create a sprite from a resource .
[in] | rsrcId | the resource id |
[in] | hInstancePtr | the instance to associate with the sprite |
|
static |
An MDL application can use this to set a function to be called when the cursor moved in a view.
[in] | newFunc | The new function to call, or NULL. |
|
static |
An MDL application can use this to set a function to be called when the cursor is stopped in a view.
[in] | newFunc | The new function to call, or NULL. |
|
static |
Set or clear an "element substitution hook" to modify the display of elements in MicroStation views.
[in] | substFunc | function to become the new element substituion hook for this application. If NULL, then any previous substituion hook is cleared. |
|
static |
An MDL application can use this to set a function to be called after a view updates.
[in] | newFunc | The new function to call, or NULL. |
|
static |
An MDL application can use this to set a function to be called before a view updates.
[in] | newFunc | The new function to call, or NULL. |