Classes | Typedefs | Enumerations | Functions
ViewInfo

The ViewInfo class holds information needed to display the contents of a view. More...

Classes

struct  ViewGeomInfo
 ViewGeomInfo contains the description of the portion of the model that is visible within a view. More...
 
struct  ViewInfo
 This is what the parameters to the camera methods, and the values stored by ViewInfo mean. More...
 
struct  ViewPortInfo
 The ViewPortInfo class holds information about the positioning of a window that displays a view on the screen, including the window extent, aspect ratio, and the logical screen it is on. More...
 

Typedefs

typedef RefCountedPtr< ViewInfo > ViewInfoPtr
 A reference counted pointer to a ViewInfo. More...
 
typedef RefCountedPtr
< ViewPortInfo > 
ViewPortInfoPtr
 A reference counted pointer to a ViewGroupInfo. More...
 

Enumerations

enum  ViewCategory {
  Default = 0, Drafting, Modeling, Visualization,
  Sheet
}
 
enum  ViewInfoStatus { VI_Success = 0, VI_BadModelRef = VIEW_INFO_ERROR_BASE + 1, VI_CameraNotInUse = VIEW_INFO_ERROR_BASE + 2 }
 Possible status values returned from ViewInfo methods. More...
 
enum  ViewChangeType {
  None = 0, Geometry = 1 << 0, RootModel = 1 << 1, Levels = 1 << 2,
  BGColor = 1 << 3, DisplayFlags = 1 << 4, DynamicView = 1 << 5, ACS = 1 << 6,
  BackgroundMap = 1 << 7, All = 0xffff
}
 Enumeration describing the difference between two ViewInfo's. More...
 

Functions

ViewChangeType operator| (ViewChangeType a, ViewChangeType b)
 
ViewChangeType operator& (ViewChangeType a, ViewChangeType b)
 
ViewChangeType operator~ (ViewChangeType a)
 
bool operator! (ViewChangeType a)
 
int mdlVec_projectPointToLineInView (DPoint3dP projectedPoint, DPoint3dCP pointOnLine, DPoint3dCP lineNormal, DPoint3dCP pointP, int view, bool useConstruction)
 Projects pointP to a line given by a point and direction, as seen in a view. More...
 
int mdlVec_projectPointToPlaneInView (DPoint3dP projectedPoint, DPoint3dCP pointOnPlane, DPoint3dCP planeNormal, DPoint3dCP pointP, int view, bool useConstruction)
 Projects pointP to the plane specified by pointOnPlane and planeNormal in the view specified by view. More...
 
bool mdlViewPortInfo_areEquivalent (ViewPortInfoCP viewPortInfo1P, ViewPortInfoCP viewPortInfo2P)
 
The mdlViewPortInfo_areEquivalent function indicates whether or not the view port info objects

are equivalent. More...

 
bool mdlViewInfo_areEquivalent (ViewInfoCP viewInfo1P, ViewInfoCP viewInfo2P)
 
The mdlViewInfo_areEquivalent function indicates whether or not the view info objects

are equivalent. More...

 
StatusInt mdlViewInfo_getViewFlag (int *valueP, int paramNum, ViewInfoCP viewInfoP)
 mdlViewInfo_getViewFlag returns information about a view attribute. More...
 
StatusInt mdlViewInfo_setViewFlag (int paramNum, ViewInfoP viewInfoP, int value)
 
The mdlViewInfo_setViewFlag function sets any view attribute listed

above. More...

 
StatusInt mdlViewInfo_getOrigin (Dpoint3d *originP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getOrigin function gets the origin of the view info. More...
 
StatusInt mdlViewInfo_getDelta (Dpoint3d *deltaP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getDelta function gets the origin of the view info. More...
 
StatusInt mdlViewInfo_getRotation (RotMatrixP rotationP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getRotation function gets the rotation of the view info. More...
 
StatusInt mdlViewInfo_getActiveZ (double *activeZP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getActiveZ function gets the activeZ of the view info. More...
 
StatusInt mdlViewInfo_getCamera (DgnPlatform::CameraInfo *cameraP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getCamera function gets the camera info of the view info. More...
 
StatusInt mdlViewInfo_setOrigin (ViewInfoP viewInfoP, Dpoint3d const *originP)
 The mdlViewInfo_setOrigin function sets the origin of the view info. More...
 
StatusInt mdlViewInfo_setDelta (ViewInfoP viewInfoP, Dpoint3d const *deltaP)
 The mdlViewInfo_setDelta function sets the delta of the view info. More...
 
StatusInt mdlViewInfo_setRotation (ViewInfoP viewInfoP, RotMatrixCP rotationP)
 The mdlViewInfo_setRotation function sets the rotation of the view info. More...
 
StatusInt mdlViewInfo_setActiveZ (ViewInfoP viewInfoP, double activeZ)
 The mdlViewInfo_setActiveZ function sets the active Z of the view info. More...
 
StatusInt mdlViewInfo_setCamera (ViewInfoP viewInfoP, DgnPlatform::CameraInfo const *cameraP)
 The mdlViewInfo_setCamera function sets the camera of the view info. More...
 
StatusInt mdlViewInfo_getViewIndex (Int16 *viewNumberP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getViewIndex function gets the index of the view info. More...
 
StatusInt mdlViewInfo_setViewIndex (ViewInfoP viewInfoP, Int16 viewNumber)
 The mdlViewInfo_setViewIndex function sets the index of the view info. More...
 
StatusInt mdlViewInfo_getModelRef (DgnModelRefP *modelRefPP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getModelRef function gets the model ref of the view info. More...
 
StatusInt mdlViewInfo_setModelRef (ViewInfoP viewInfoP, DgnModelRefP modelRefP)
 The mdlViewInfo_setModelRef function sets the model ref of the view info. More...
 
void mdlViewInfo_computeDefaultRange (DPoint3dP minP, DPoint3dP maxP, bool includeRefs, DgnModelRefP modelRef)
 The mdlViewInfo_computeDefaultRange function is used to determine the range points for the given model. More...
 
StatusInt mdlViewInfo_getBackGroundColor (RgbColorDef *colorDefP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getBackGroundColor function gets the background color of the view info. More...
 
StatusInt mdlViewInfo_setBackGroundColor (ViewInfoP viewInfoP, RgbColorDef const *colorDefP)
 The mdlViewInfo_setBackGroundColor function sets the background color of the view info. More...
 
StatusInt mdlViewInfo_getClipBoundElementId (DgnPlatform::ElementId *elementIDP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getClipBoundElementId function gets the clip bound element ID of the view info. More...
 
StatusInt mdlViewInfo_setClipBoundElementId (ViewInfoP viewInfoP, DgnPlatform::ElementId elementID)
 The mdlViewInfo_setClipBoundElementId function sets the clip bound element ID of the view info. More...
 
StatusInt mdlViewInfo_getClipMaskElementId (DgnPlatform::ElementId *elementIDP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getClipMaskElementId function gets the clip Mask element ID of the view info. More...
 
StatusInt mdlViewInfo_setClipMaskElementId (ViewInfoP viewInfoP, DgnPlatform::ElementId elementID)
 The mdlViewInfo_setClipMaskElementId function sets the clip Mask element ID of the view info. More...
 
bool mdlViewInfo_haveSameLevels (ViewInfoCP viewInfo1P, ViewInfoCP viewInfo2P)
 
The mdlViewInfo_haveSameLevels function indicates if both viewinfo objects specify the

same level display settings. More...

 
bool mdlViewInfo_haveSameModels (ViewInfoCP viewInfo1P, ViewInfoCP viewInfo2P)
 
The mdlViewInfo_haveSameModels function indicates if both viewinfo objects reference the

same model. More...

 
StatusInt mdlViewInfo_getModelID (DgnPlatform::ModelId *modelIDP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getModelID function gets the model ID of the view info. More...
 
StatusInt mdlViewInfo_getFlags (DgnPlatform::ViewFlags *flagsP, ViewInfoCP viewInfoP)
 The mdlViewInfo_getFlags function gets the flags of the view info. More...
 
StatusInt mdlViewInfo_setFlags (ViewInfoP viewInfoP, DgnPlatform::ViewFlags const *flagsP)
 The mdlViewInfo_setFlags function sets the flags of the view info. More...
 
StatusInt mdlViewPortInfo_getWasDefined (Int16 *wasDefinedP, ViewPortInfoCP viewPortInfoP)
 The mdlViewPortInfo_getWasDefined function gets the was defined flag of the viewport info. More...
 
StatusInt mdlViewPortInfo_getScreenNumber (Int16 *screenNumberP, ViewPortInfoCP viewPortInfoP)
 The mdlViewPortInfo_getScreenNumber function gets the screen of the viewport info. More...
 
StatusInt mdlViewPortInfo_setWasDefined (ViewPortInfoP viewPortInfoP, Int16 wasDefined)
 The mdlViewPortInfo_setWasDefined function sets the wasDefined flag of the viewport info. More...
 
StatusInt mdlViewPortInfo_setScreenNumber (ViewPortInfoP viewPortInfoP, Int16 screenNumber)
 The mdlViewPortInfo_setScreenNumber function sets the was screen of the viewport info. More...
 
StatusInt mdlViewPortInfo_getViewAspectRatio (double *viewAspectRatioP, ViewPortInfoCP viewPortInfoP)
 The mdlViewPortInfo_getViewAspectRatio function gets the aspect ratio of the viewport info. More...
 
BitMaskP mdlViewInfo_getLevelDisplayMask (DgnModelRefP modelRefIn, ViewInfoP pViewInfoIn)
 The mdlViewInfo_getLevelDisplayMask function gets the level display mask for the given model ref from the view info. More...
 
int mdlViewInfo_setLevelDisplayMask (DgnModelRefP modelRefIn, ViewInfoP pViewInfoIn, BitMaskCP pViewLevelMaskIn)
 The mdlViewInfo_setLevelDisplayMask function sets the level display mask for the given model reference in the view info. More...
 

Detailed Description

The ViewInfo class holds information needed to display the contents of a view.

ViewInfo contains information about the portion of the model that is visible in the view, the level masks that determine the per-view on/off state of every level, the background color, the auxiliary coordinate system; and the dynamic view settings for the view.

ViewInfo's are components of ViewGroup, where there is a ViewInfo for each of the numbered views, and of NamedView, which store a dictionary of user-defined views.

ViewInfo is a reference counted class, and uses the lifecyle semantics of the templated Bentley::RefCountedPtr class.

The ViewPortInfo class holds information about the positioning of a window that contains a view, including the window size, aspect ratio, and the logical screen it is on.

ViewPortInfo is a reference counted class, and uses the lifecyle semantics of the templated Bentley::RefCountedPtr class.

Typedef Documentation

typedef RefCountedPtr<ViewInfo> ViewInfoPtr

A reference counted pointer to a ViewInfo.

typedef RefCountedPtr<ViewPortInfo> ViewPortInfoPtr

A reference counted pointer to a ViewGroupInfo.

Enumeration Type Documentation

enum ViewCategory
strong
Enumerator
Default 
Drafting 
Modeling 
Visualization 
Sheet 
enum ViewChangeType
strong

Enumeration describing the difference between two ViewInfo's.

Enumerator
None 
Geometry 
RootModel 
Levels 
BGColor 
DisplayFlags 
DynamicView 
ACS 
BackgroundMap 
All 
enum ViewInfoStatus

Possible status values returned from ViewInfo methods.

Enumerator
VI_Success 

The method succeeded.

VI_BadModelRef 
VI_CameraNotInUse 

Function Documentation

int mdlVec_projectPointToLineInView ( DPoint3dP  projectedPoint,
DPoint3dCP  pointOnLine,
DPoint3dCP  lineNormal,
DPoint3dCP  pointP,
int  view,
bool  useConstruction 
)

Projects pointP to a line given by a point and direction, as seen in a view.

Parameters
[out]projectedPointprojected point
[in]pointOnLinepoint on line
[in]lineNormalnormal vector to line
[in]pointPpoint to project
[in]viewview number
[in]useConstructionuse ACS if constr. lock on
Returns
SUCCESS unless uable to access view information.
Remarks
If useConstruction is non-zero, the projection direction is determined by the current ACS, otherwise the orientation of view is used.
Required Library: mdlbltin.lib
int mdlVec_projectPointToPlaneInView ( DPoint3dP  projectedPoint,
DPoint3dCP  pointOnPlane,
DPoint3dCP  planeNormal,
DPoint3dCP  pointP,
int  view,
bool  useConstruction 
)

Projects pointP to the plane specified by pointOnPlane and planeNormal in the view specified by view.

Parameters
[out]projectedPointprojected point
[in]pointOnPlanepoint on plane
[in]planeNormalnormal vector to plane
[in]pointPpoint to project
[in]viewview number
[in]useConstructionuse ACS if constr. lock on
Remarks
If useConstruction is non-zero and ACS lock is enabled, the auxiliary coordinate system is used to determine the boresite vector rather than view. The projection direction in camera views is along a line from the camera position to point, for non-camera views it is the Z axis of the view. If the plane is parallel to the projection direction, the point is projected to the nearest point on the plane.
Returns
SUCCESS unless unable to obtain view information.
Remarks
Required Library: mdlbltin.lib
bool mdlViewInfo_areEquivalent ( ViewInfoCP  viewInfo1P,
ViewInfoCP  viewInfo2P 
)

The mdlViewInfo_areEquivalent function indicates whether or not the view info objects

are equivalent.

Parameters
[in]viewInfo1Pfirst view info to compare.
[in]viewInfo2Psecond view info to compare.
Returns
true if both pointers are NULL, both point to the same object, or the fields of both objects have equivalent values. Otherwise false is returned.
Remarks
Since this operation involves several comparisons of data, it is best to avoid this test in tightly bound loops or high volume critical paths.
Required Library: mdlbltin.lib
void mdlViewInfo_computeDefaultRange ( DPoint3dP  minP,
DPoint3dP  maxP,
bool  includeRefs,
DgnModelRefP  modelRef 
)

The mdlViewInfo_computeDefaultRange function is used to determine the range points for the given model.

Parameters
[out]minPthe minimum range corner.
[out]maxPthe maximum range corner.
[in]includeRefsinclude the references or not.
[in]modelRefmodel which must be processed.
Returns
This function is of type void, it does not return a value.
Remarks
No matter what, some kind of range will be returned. In the case where an invalid model is given, some minimal default will be devised. If the model has no elements, the range returned will produce a view that doesn't properly fit elements added to the model after calling this function.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getActiveZ ( double *  activeZP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getActiveZ function gets the activeZ of the view info.

above.

Parameters
[out]activeZPthe location to write the activeZ.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the activeZP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The double returned is the distance along the delta from the origin to the active plane/depth in the View Coordinate System. In 2D modes this value should never be altered from its original value since this would make elements on the prior plane inaccessible until the active Z was reset to make that plane the Active Depth.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getBackGroundColor ( RgbColorDef *  colorDefP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getBackGroundColor function gets the background color of the view info.

above.

Parameters
[out]colorDefPthe location to write the color definition.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the colorDefP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getCamera ( DgnPlatform::CameraInfo *  cameraP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getCamera function gets the camera info of the view info.

above.

Parameters
[out]cameraPthe location to write the camera info.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the cameraP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Generally speaking the camera is of no value to 2D models, but we do not constrain use of camera info within this API. However, when this view info is applied to a view, it will be the case that since the view is of a 2D model that the camera will be coerced to be off when the view info is applied.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getClipBoundElementId ( DgnPlatform::ElementId *  elementIDP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getClipBoundElementId function gets the clip bound element ID of the view info.

Parameters
[out]elementIDPthe location to write the element ID.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the elementIDP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
It is possible for the id to be invalid if the view info was obtained from a view element, since the element referenced may be deleted from the model to which the view points. For view's with no clip element, this value will be zero (0).
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getClipMaskElementId ( DgnPlatform::ElementId *  elementIDP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getClipMaskElementId function gets the clip Mask element ID of the view info.

Parameters
[out]elementIDPthe location to write the element ID.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the elementIDP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
It is possible for the id to be invalid if the view info was obtained from a view element, since the element referenced may be deleted from the model to which the view points. For view's with no clip element, this value will be zero (0).
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getDelta ( Dpoint3d deltaP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getDelta function gets the origin of the view info.

above.

Parameters
[out]deltaPthe location to write the delta.
[in]viewInfoPthe view info object
Returns
SUCCESS if the deltaP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The delta returned is a vector (or direction if you prefer) in the View Coordinate System from the lower left (back) corner of the view volume/plane to where the right (front) corner is located.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getFlags ( DgnPlatform::ViewFlags *  flagsP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getFlags function gets the flags of the view info.

Parameters
[out]flagsPthe location to write the flags.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the flagsP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
BitMaskP mdlViewInfo_getLevelDisplayMask ( DgnModelRefP  modelRefIn,
ViewInfoP  pViewInfoIn 
)

The mdlViewInfo_getLevelDisplayMask function gets the level display mask for the given model ref from the view info.

Parameters
[in]modelRefInthe model reference for which we need to search.
[in]pViewInfoInthe view info object.
Returns
NULL if pViewInfoIn is NULL or has no level mask list, if the model reference is to an invalid reference, or if the model reference does not have an entry in the view info's level mask list .
Remarks
If the model reference points to a reference file, the search is made for a level display mask by the attachment id. Otherwise, the search is made for the MASTERFILE_UNIQUEID. The BitMask returned must be freed by the caller when they are finished with it.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getModelID ( DgnPlatform::ModelId *  modelIDP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getModelID function gets the model ID of the view info.

Parameters
[out]modelIDPthe location to write the model ID.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the modelIDP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Initially a newly created view info has a model ID of 0 which should not be taken as being a valid model ID, use model APIs to test and process these ID values.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getModelRef ( DgnModelRefP *  modelRefPP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getModelRef function gets the model ref of the view info.

above.

Parameters
[out]modelRefPPthe location to write the model ref.
[in]viewInfoPthe view info object.
Returns
MDLERR_BADARG if the modelRefPP is NULL or viewInfoP is not valid; ERROR if the model ref could not be resolved; or SUCCESS.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getOrigin ( Dpoint3d originP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getOrigin function gets the origin of the view info.

above.

Parameters
[out]originPthe location to write the origin.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the originP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The origin returned is a point in Model Coordinates where the lower left corner of the view volume/plane is located.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getRotation ( RotMatrixP  rotationP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getRotation function gets the rotation of the view info.

above.

Parameters
[out]rotationPthe location to write the rotation.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the rotationP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The rotation returned is an orthogonal, rotation matrix which represents the transformation needed to transform model points (such as the origin) into the View Coordinate System.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getViewFlag ( int *  valueP,
int  paramNum,
ViewInfoCP  viewInfoP 
)

mdlViewInfo_getViewFlag returns information about a view attribute.

Parameters
[in]valuePthe location to put the value.
[in]paramNumwhich view attribute is required.
[in]viewInfoPthe view info object. Possible values for paramNum are defined in mdl.h and are provided with an explanation in the following table: For the VIEWCONTROL_RENDERMODE parameter, possible values are defined in mdl.h. These values include VIEWMODE_WIREFRAME, VIEWMODE_CROSSSECTION, VIEWMODE_WIREMESH, VIEWMODE_HIDDENLINE, VIEWMODE_FILLEDHLINE, VIEWMODE_CONSTANTSHADE, VIEWMODE_SMOOTHSHADE and VIEWMODE_PHONGSHADE.
Returns
SUCCESS if paramNum is in [0..MAX_VIEWCONTROL], viewInfoP is valid and valueP is not NULL; MDLERR_BADARG if not. Also, other non-SUCCESS may be returned if processing the value leads to a processing error.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_getViewIndex ( Int16 viewNumberP,
ViewInfoCP  viewInfoP 
)

The mdlViewInfo_getViewIndex function gets the index of the view info.

above.

Parameters
[out]viewNumberPthe location to write the index.
[in]viewInfoPthe view info object.
Returns
SUCCESS if the viewNumberP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
If the view info is for a named view, then VIEW_NON_INDEX will be returned.
Required Library: mdlbltin.lib
bool mdlViewInfo_haveSameLevels ( ViewInfoCP  viewInfo1P,
ViewInfoCP  viewInfo2P 
)

The mdlViewInfo_haveSameLevels function indicates if both viewinfo objects specify the

same level display settings.

Parameters
[in]viewInfo1Pthe view info object to compare.
[in]viewInfo2Pthe view info object to compare.
Returns
true if the objects compare to be the same or have the same level display settings, false if not.
Remarks
The case where both pointers are NULL is treated as both pointers being the same, and returns true.
Required Library: mdlbltin.lib
bool mdlViewInfo_haveSameModels ( ViewInfoCP  viewInfo1P,
ViewInfoCP  viewInfo2P 
)

The mdlViewInfo_haveSameModels function indicates if both viewinfo objects reference the

same model.

Parameters
[in]viewInfo1Pthe view info object to compare.
[in]viewInfo2Pthe view info object to compare.
Returns
true if the objects compare to be the same or reference the same model , false if not.
Remarks
The case where both pointers are NULL is treated as both pointers being the same, and returns true. Also, this test does not make the distinction between valid and invalid model identificaton data, it merely tests for equality.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setActiveZ ( ViewInfoP  viewInfoP,
double  activeZ 
)

The mdlViewInfo_setActiveZ function sets the active Z of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]activeZthe new active Z.
Returns
SUCCESS if viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The active Z represents where in the View System the active plane is located as the distance from origin to the corner. The active Z may be stored to be out of range (outside of [0..delta.z]), but it will not be applied as-is to live view data since the runtime will clamp the value to be within the valid range.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setBackGroundColor ( ViewInfoP  viewInfoP,
RgbColorDef const *  colorDefP 
)

The mdlViewInfo_setBackGroundColor function sets the background color of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]colorDefPthe new color definition to copy.
Returns
SUCCESS if the colorDefP is not NULL, and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setCamera ( ViewInfoP  viewInfoP,
DgnPlatform::CameraInfo const *  cameraP 
)

The mdlViewInfo_setCamera function sets the camera of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]cameraPthe new camera.
Returns
SUCCESS if the cameraP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Currently, few restrictions are placed on the camera data, invalid camera data is detected when applying the camera and forced to be valid then. Also, it is the case that the camera may be forced to be invalid to provoke the camera to be recalculated. A focal length of -1.0 and a position of 0.0 for x, y, and z will put the camera in such a state.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setClipBoundElementId ( ViewInfoP  viewInfoP,
DgnPlatform::ElementId  elementID 
)

The mdlViewInfo_setClipBoundElementId function sets the clip bound element ID of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]elementIDthe id of the clip bound element.
Returns
SUCCESS if viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setClipMaskElementId ( ViewInfoP  viewInfoP,
DgnPlatform::ElementId  elementID 
)

The mdlViewInfo_setClipMaskElementId function sets the clip Mask element ID of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]elementIDthe id of the clip Mask element.
Returns
SUCCESS if viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setDelta ( ViewInfoP  viewInfoP,
Dpoint3d const *  deltaP 
)

The mdlViewInfo_setDelta function sets the delta of the view info.

above.

Parameters
[in]viewInfoPthe view info object to update.
[in]deltaPthe new origin.
Returns
SUCCESS if the deltaP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The delta is a vector (or direction if you prefer) in the View Coordinate System from the lower left (back) corner of the view volume/plane to where the right (front) corner is located.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setFlags ( ViewInfoP  viewInfoP,
DgnPlatform::ViewFlags const *  flagsP 
)

The mdlViewInfo_setFlags function sets the flags of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]flagsPthe flags to copy.
Returns
SUCCESS if flagsP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The process of setting the flags will have some side effects when set will change the value of the isNamed flag. In this case the view info will have its index and named view data set up to be in concert with the new flag value. For example, if the view info has the isNamed flag ON and the new flags have it OFF, the name data will be freed and the index will be set to VIEW_NON_INDEX.
Required Library: mdlbltin.lib
int mdlViewInfo_setLevelDisplayMask ( DgnModelRefP  modelRefIn,
ViewInfoP  pViewInfoIn,
BitMaskCP  pViewLevelMaskIn 
)

The mdlViewInfo_setLevelDisplayMask function sets the level display mask for the given model reference in the view info.

Parameters
[in]modelRefInthe model reference to key the bit mask.
[in]pViewInfoInthe view info object.
[in]pViewLevelMaskInthe bit mask object.
Returns
SUCCESS if the new bitmask can be added; MDLERR_BADARG if pViewInfoIn is invalid; MDLERR_INVALIDREF if the model reference is to an invalid reference or nested reference; ERROR if pViewLevelMaskIn is NULL; NON-SUCCESS for other types of failure.
Remarks
If the model reference points to a reference file, the search is made for a level display mask by the attachment id. Otherwise, the search is made for the MASTERFILE_UNIQUEID.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setModelRef ( ViewInfoP  viewInfoP,
DgnModelRefP  modelRefP 
)

The mdlViewInfo_setModelRef function sets the model ref of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]modelRefPthe new model ref.
Returns
SUCCESS if the modelRefP is not NULL, modelRefP is a valid model ref and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setOrigin ( ViewInfoP  viewInfoP,
Dpoint3d const *  originP 
)

The mdlViewInfo_setOrigin function sets the origin of the view info.

above.

Parameters
[in]viewInfoPthe view info object to update.
[in]originPthe new origin.
Returns
SUCCESS if the originP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The origin is a point in the Model Coordinate System representing the lower left (back) corner of the view volume/plane.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setRotation ( ViewInfoP  viewInfoP,
RotMatrixCP  rotationP 
)

The mdlViewInfo_setRotation function sets the rotation of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]rotationPthe new rotation.
Returns
SUCCESS if the rotationP is not NULL and viewInfoP is valid; MDLERR_BADARG if not.
Remarks
The rotation is a matrix which represents the transfrom from the Model Coordinate System to View Coordinate System, of course this is in combination with the origin which is the translation into the View Coordinate System.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setViewFlag ( int  paramNum,
ViewInfoP  viewInfoP,
int  value 
)

The mdlViewInfo_setViewFlag function sets any view attribute listed

above.

Parameters
[in]paramNumwhich view attribute is being set.
[in]viewInfoPthe view info object.
[in]valuethe value to use.
Returns
SUCCESS if paramNum is in [0..MAX_VIEWCONTROL], viewInfoP is valid and value is valid; MDLERR_BADARG if not. Also, other non-SUCCESS may be returned if processing the value leads to a processing error.
Remarks
There are cases, such as setting the VIEWCONTROL_NAMED flag, where the rest of the object must be adjusted to be consistent with this setting.
Required Library: mdlbltin.lib
StatusInt mdlViewInfo_setViewIndex ( ViewInfoP  viewInfoP,
Int16  viewNumber 
)

The mdlViewInfo_setViewIndex function sets the index of the view info.

Parameters
[in]viewInfoPthe view info object to update.
[in]viewNumberthe new index.
Returns
SUCCESS if viewInfoP is valid; MDLERR_BADARG if not.
Remarks
If any index other than VIEW_NON_INDEX is given, then if the view info was for a saved view, it will have its name info freed and have its isNamed flag set to false;
Required Library: mdlbltin.lib
bool mdlViewPortInfo_areEquivalent ( ViewPortInfoCP  viewPortInfo1P,
ViewPortInfoCP  viewPortInfo2P 
)

The mdlViewPortInfo_areEquivalent function indicates whether or not the view port info objects

are equivalent.

Parameters
[in]viewPortInfo1Pfirst view port info to compare.
[in]viewPortInfo2Psecond view port info to compare.
Returns
true if both pointers are NULL, both point to the same object, or the fields of both objects have equivalent values. Otherwise false is returned.
Remarks
Since this operation involves several comparisons of data, it is best to avoid this test in tightly bound loops or high volume critical paths.
Required Library: mdlbltin.lib
StatusInt mdlViewPortInfo_getScreenNumber ( Int16 screenNumberP,
ViewPortInfoCP  viewPortInfoP 
)

The mdlViewPortInfo_getScreenNumber function gets the screen of the viewport info.

Parameters
[out]screenNumberPthe location to write the screen number.
[in]viewPortInfoPthe viewport info object.
Returns
SUCCESS if the screenNumberP is not NULL and viewPortInfoP is valid; MDLERR_BADARG if not.
Remarks
Generally, this value should not be used from viewport info's derived from view elements which do not have the was defined flag set to true. In the cases where the viewport info is defined, this value is taken to be a hint to the system to open this view on the given screen if it is available.
Required Library: mdlbltin.lib
StatusInt mdlViewPortInfo_getViewAspectRatio ( double *  viewAspectRatioP,
ViewPortInfoCP  viewPortInfoP 
)

The mdlViewPortInfo_getViewAspectRatio function gets the aspect ratio of the viewport info.

Parameters
[out]viewAspectRatioPthe location to write the aspect ratio.
[in]viewPortInfoPthe view info object.
Returns
SUCCESS if the viewAspectRatioP is not NULL and viewPortInfoP is valid; MDLERR_BADARG if not.
Remarks
Generally, this value should not be used from viewport info's derived from view elements which do not have the was defined flag set to true. In the cases where the viewport info is defined, this value may still be not valid (equals 0.0). This is the case for all pre-V8 files. However, once a save settings is done against a pre-V8 file which is converted to V8, the data will be present. This value is tied to the value of the pixel rectangle (which is used to derive the aspect ratio) and so cannot be obtained without the pixel rectangle using the view port info. However, MicroStation will be able to derive the same information using the view's delta. In either case, the aspect ratio is dervied as width/heigth (or dx/dy).
Required Library: mdlbltin.lib
StatusInt mdlViewPortInfo_getWasDefined ( Int16 wasDefinedP,
ViewPortInfoCP  viewPortInfoP 
)

The mdlViewPortInfo_getWasDefined function gets the was defined flag of the viewport info.

Parameters
[out]wasDefinedPthe location to write the flag.
[in]viewPortInfoPthe viewport info object
Returns
SUCCESS if the wasDefinedP is not NULL and viewPortInfoP is valid; MDLERR_BADARG if not.
Remarks
This allows views to be saved without saving their viewport (view window) information being defined, but the fields will still be present, though unused, in the viewport info and elements derived from the viewport info. This flag is present for the sake of earlier files where the data for the viewport was not always present.
Required Library: mdlbltin.lib
StatusInt mdlViewPortInfo_setScreenNumber ( ViewPortInfoP  viewPortInfoP,
Int16  screenNumber 
)

The mdlViewPortInfo_setScreenNumber function sets the was screen of the viewport info.

Parameters
[in]viewPortInfoPthe viewport info object to update.
[in]screenNumberthe screen number.
Returns
SUCCESS if viewPortInfoP is valid; MDLERR_BADARG if not.
Remarks
The screen number is mostly a hint since, if this viewport info is used to open a view where the screen does not exist or under an instance of MicroStation where the multiple screens are not turned on, the view may be turned off or opened on an existing screen based on what type of processing is opening the view.
Required Library: mdlbltin.lib
StatusInt mdlViewPortInfo_setWasDefined ( ViewPortInfoP  viewPortInfoP,
Int16  wasDefined 
)

The mdlViewPortInfo_setWasDefined function sets the wasDefined flag of the viewport info.

Parameters
[in]viewPortInfoPthe viewport info object to update.
[in]wasDefinedthe flags.
Returns
SUCCESS if viewPortInfoP is valid; MDLERR_BADARG if not.
Remarks
Setting this flag to true should be done after you have established the other values, but there is nothing here to enforce that approach.
Required Library: mdlbltin.lib
bool Bentley::DgnPlatform::operator! ( ViewChangeType  a)
ViewChangeType Bentley::DgnPlatform::operator& ( ViewChangeType  a,
ViewChangeType  b 
)
ViewChangeType Bentley::DgnPlatform::operator| ( ViewChangeType  a,
ViewChangeType  b 
)
ViewChangeType Bentley::DgnPlatform::operator~ ( ViewChangeType  a)

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