Public Member Functions | List of all members
IViewClipObject Struct Reference

An IViewClipObject is an interface that can be adopted to access the data which describes a clip volume and perform certain manipulations on the same. More...

#include <SectionClip.h>

Inheritance diagram for IViewClipObject:
RefCountedBase RefCounted< IRefCounted > IRefCounted

Public Member Functions

DGNPLATFORM_EXPORT double GetSize (ClipVolumeSizeProp clipVolumeCropProp) const
 Gets the size of the clipped volume corresponding to the value of the enumerated variable clipVolumeSizeProp. More...
 
DGNPLATFORM_EXPORT void SetSize (ClipVolumeSizeProp clipVolumeSizeProp, double size)
 Assigns the user defined value to the size of the clip element. More...
 
DGNPLATFORM_EXPORT bool GetCrop (ClipVolumeCropProp clipVolumeCropProp) const
 Check if a given side of the clip volume is cropped. More...
 
DGNPLATFORM_EXPORT void SetCrop (ClipVolumeCropProp clipVolumeCropProp, bool crop)
 Sets the particular side to either of the two conditions : to be cropped or not to be cropped using a boolean variable. More...
 
DGNPLATFORM_EXPORT RotMatrixCR GetRotationMatrix () const
 Gets the rotation matrix that describes how the element is oriented in 3D space. More...
 
DGNPLATFORM_EXPORT void SetRotationMatrix (RotMatrixCR rMatrix)
 Sets the rotation matrix of the element to a defined matrix and set the orientation in the 3D space. More...
 
DGNPLATFORM_EXPORT void SetPoints (size_t numPoints, DPoint3dCP points)
 Sets the points of the clip element. More...
 
DGNPLATFORM_EXPORT size_t GetNumPoints () const
 Obtains the number of data points of the clipped volume. More...
 
DGNPLATFORM_EXPORT StatusInt GetPoints (DPoint3dVector &points, size_t iFromPoint, size_t numPoints) const
 Obtains the data points of the clipped volume. More...
 
DGNPLATFORM_EXPORT StatusInt FromElement (ElementHandleCR elem)
 Reads the clip data from a clip element More...
 
DGNPLATFORM_EXPORT void CopyCrops (IViewClipObject const *from)
 Makes a copy of the clip details of a given clip object. More...
 
DGNPLATFORM_EXPORT StatusInt ToElement (EditElementHandleR eeh, ElementHandleCP templateEH, DgnModelRefP modelRef) const
 Creates and modifies an element from the clip data. More...
 
DGNPLATFORM_EXPORT void SetPreserveUp (bool flag)
 Sets preserve up flag to indicate that the resulting view of this clip volume should be displayed 'up right'. More...
 
DGNPLATFORM_EXPORT bool GetPreserveUp () const
 Gets preserve up flag to indicate that the resulting view of this clip volume should be displayed 'up right'. More...
 
DGNPLATFORM_EXPORT double GetWidth () const
 Gets width of the clip element. More...
 
DGNPLATFORM_EXPORT void SetWidth (double newWidth)
 Set the width of the clip element to a user defined value newWidth. More...
 
DGNPLATFORM_EXPORT double GetPointCloudTolerance () const
 Gets tolerance use by Point Cloud. More...
 
DGNPLATFORM_EXPORT void SetPointCloudTolerance (double newTolerance)
 Set the tolerance use by Point Cloud to a user defined value newTolerance. More...
 
DGNPLATFORM_EXPORT bool GetPointCloudProjectPoints () const
 Gets project points flag to indicate that the PointCloud will project the points. More...
 
DGNPLATFORM_EXPORT void SetPointCloudProjectPoints (bool projectPoints)
 Sets project points flag to indicate that the PointCloud will project the points. More...
 
- Public Member Functions inherited from RefCounted< IRefCounted >
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 
UInt32 AddRef () const
 
UInt32 Release () const
 
 RefCounted ()
 
 RefCounted (RefCounted const &rhs)
 
RefCountedoperator= (RefCounted const &rhs)
 
UInt32 GetRefCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted< IRefCounted >
virtual ~RefCounted ()
 
- Protected Member Functions inherited from IRefCounted
virtual ~IRefCounted ()
 
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 

Detailed Description

An IViewClipObject is an interface that can be adopted to access the data which describes a clip volume and perform certain manipulations on the same.

Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Member Function Documentation

DGNPLATFORM_EXPORT void CopyCrops ( IViewClipObject const *  from)

Makes a copy of the clip details of a given clip object.

Parameters
[in]froma const pointer to IViewClipObject .
Returns
a copy of the clip details of a given clip object.
EditElementHandle sourceClipEEH;
EditElementHandle destinationClipEEH;
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&sourceClipEEH.GetHandler ());
IViewClipObjectPtr sourceClipObjPtr = hasViewClipObject->GetClipObject (sourceClipEEH) ;
hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&destinationClipEEH.GetHandler ());
IViewClipObjectPtr destinationClipObjPtr = hasViewClipObject->GetClipObject (destinationClipEEH) ;
destinationClipObjPtr->CopyCrops (sourceClipObjPtr.get()) ;

Reads the clip data from a clip element

Parameters
[in]elemretrieves the clip data from clip element to control the element actions.
Returns
the clip data from a clip element.
DGNPLATFORM_EXPORT bool GetCrop ( ClipVolumeCropProp  clipVolumeCropProp) const

Check if a given side of the clip volume is cropped.

Parameters
[in]clipVolumeCropPropcontains the information as to which particular side should be clipped.
Returns
the boolean value against the desired side of the clip element.
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
bool cropFlag = clipObjPtr->GetCrop (CLIPVOLUME_CROP_Front) ;
DGNPLATFORM_EXPORT size_t GetNumPoints ( ) const

Obtains the number of data points of the clipped volume.

Returns
the number of data points of the clipped volume.
See also
SetPoints.
DGNPLATFORM_EXPORT bool GetPointCloudProjectPoints ( ) const

Gets project points flag to indicate that the PointCloud will project the points.

Returns
the project points flag.
DGNPLATFORM_EXPORT double GetPointCloudTolerance ( ) const

Gets tolerance use by Point Cloud.

Returns
the tolerance for PointCloud.
DGNPLATFORM_EXPORT StatusInt GetPoints ( DPoint3dVector points,
size_t  iFromPoint,
size_t  numPoints 
) const

Obtains the data points of the clipped volume.

Parameters
[out]pointsreference to the vector containing the 3D points.
[in]iFromPointinitial index point of the clip volume.
[in]numPointsnumber of index points of the clip volume.
Returns
the data points of the clipped volume.
See also
SetPoints.
DGNPLATFORM_EXPORT bool GetPreserveUp ( ) const

Gets preserve up flag to indicate that the resulting view of this clip volume should be displayed 'up right'.

Returns
the resulting view of this clip volume which should be displayed 'up right'.
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
bool getFlag = clipObjPtr->GetPreserveUp () ;
DGNPLATFORM_EXPORT RotMatrixCR GetRotationMatrix ( ) const

Gets the rotation matrix that describes how the element is oriented in 3D space.

Returns
the orientation details in the 3D space of the element to be clipped, in the form of a matrix.
 IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
 IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
 RotMatrix rMatrix;
 rMatrix = clipObjPtr->GetRotationMatrix ();
 clipObjPtr->SetRotationMatrix (rMatrix);
double GetSize ( ClipVolumeSizeProp  clipVolumeCropProp) const

Gets the size of the clipped volume corresponding to the value of the enumerated variable clipVolumeSizeProp.

 IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ());
 IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
 double frontSize = clipObjPtr->GetSize (CLIPVOLUME_SIZE_FrontDepth) ;
Parameters
[in]clipVolumeCropPropthe specific size to be querried.
Returns
the dimension of the side to be clipped.
DGNPLATFORM_EXPORT double GetWidth ( ) const

Gets width of the clip element.

Returns
the width of the clip element.
DGNPLATFORM_EXPORT void SetCrop ( ClipVolumeCropProp  clipVolumeCropProp,
bool  crop 
)

Sets the particular side to either of the two conditions : to be cropped or not to be cropped using a boolean variable.

Parameters
[in]clipVolumeCropPropcontains the particular side and its clip details.
[in]croptrue would mean clipped and false would mean unclipped.
Returns
the particular side and its clip details
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
clipObjPtr->SetCrop (CLIPVOLUME_CROP_Front, true) ;
DGNPLATFORM_EXPORT void SetPointCloudProjectPoints ( bool  projectPoints)

Sets project points flag to indicate that the PointCloud will project the points.

param[in] flag pass 1 for project and zero for unproject.

DGNPLATFORM_EXPORT void SetPointCloudTolerance ( double  newTolerance)

Set the tolerance use by Point Cloud to a user defined value newTolerance.

Parameters
[in]newTolerancethe value to be assigned to the tolerance use by Point Cloud
DGNPLATFORM_EXPORT void SetPoints ( size_t  numPoints,
DPoint3dCP  points 
)

Sets the points of the clip element.

Parameters
[in]numPointsunsigned integer that contains the number of index points of the clip element.
[in]pointsthe 3D point coordinates of the clip element.
Returns
data points of the clip element.
See also
GetNumPoints
GetPoints.
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
size_t numPoints = clipObjPtr->GetNumPoints () ;
DPoint3dVector clipPoints;
clipObjPtr->GetPoints (clipPoints, 0, numPoints) ;
clipObjPtr->SetPoints (numPoints,clipPoints.data()) ;
DGNPLATFORM_EXPORT void SetPreserveUp ( bool  flag)

Sets preserve up flag to indicate that the resulting view of this clip volume should be displayed 'up right'.

param[in] flag pass 1 for clipped and zero for unclipped.

Returns
the resulting view of this clip volume which should be displayed 'up right'.
IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
clipObjPtr->SetPreserveUp (true) ;
DGNPLATFORM_EXPORT void SetRotationMatrix ( RotMatrixCR  rMatrix)

Sets the rotation matrix of the element to a defined matrix and set the orientation in the 3D space.

Returns
the orientation details in the 3D space of the element to be clipped, in the form of the defined matrix.
See also
GetRotationMatrix .
DGNPLATFORM_EXPORT void SetSize ( ClipVolumeSizeProp  clipVolumeSizeProp,
double  size 
)

Assigns the user defined value to the size of the clip element.

Parameters
[in]clipVolumeSizePropthe specific size to be querried.
[in]sizecontains the desired value to be clipped to.
Returns
the dimension of the side to be clipped.
 IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()) ;
 IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ;
 clipObjPtr->SetSize (CLIPVOLUME_SIZE_FrontDepth, true) ;
DGNPLATFORM_EXPORT void SetWidth ( double  newWidth)

Set the width of the clip element to a user defined value newWidth.

Parameters
[in]newWidththe value to be assigned to the width of the clip element.
Returns
width of the clip element to a user defined value newWidth.
DGNPLATFORM_EXPORT StatusInt ToElement ( EditElementHandleR  eeh,
ElementHandleCP  templateEH,
DgnModelRefP  modelRef 
) const

Creates and modifies an element from the clip data.

Parameters
[out]eehto edit the clip data of the clip element.
[in]templateEHconst pointer to a clip element previously created and points to null if the element is getting created for the first time.
[in]modelRefinstance of DgnModelRef,that provides access to a model in Bentley::DgnPlatform::DgnFile.
Returns
the new created or modified element from the clip data.

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

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