SectionClip holds information associated with the clip volume tool which inturn is used to limit the displayed volume for a view to the region within a clipping element. More...
Classes | |
struct | IViewClipObject |
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... | |
struct | IHasViewClipObject |
An IHasViewClipObject is a clip element that can return an IViewClipObject. More... | |
struct | SectionClipElementHandler |
Section View Clipper Element Handler (used by section, elevation views and plane clips) More... | |
Typedefs | |
typedef bvector< DPoint3d > | DPoint3dVector |
A reference counted pointer to a vector of 3D points. More... | |
typedef RefCountedPtr < IViewClipObject > | IViewClipObjectPtr |
A reference counted Pointer to IViewClipObject. More... | |
Enumerations | |
enum | ClipVolumeSizeProp { Invalid = -1, TopHeight = 0, BottomHeight = 1, FrontDepth = 2, BackDepth = 3 } |
Possible options to define sizes of the clipped element from the clipped part. More... | |
enum | ClipVolumeCropProp { Invalid = -1, StartSide = 0, EndSide = 1, Front = 2, Back = 3, Bottom = 4, Top = 5 } |
Possible options to define the clipped sides of the clip volume. More... | |
SectionClip holds information associated with the clip volume tool which inturn is used to limit the displayed volume for a view to the region within a clipping element.
Using the APIs here, one can perform various functions like decide the clip volume dimensions, set the points along which clipping can take place and define and set the rotation matrix of the clip element.
void example() { EditElementHandle clipEEH; IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&clipEEH.GetHandler ()); IViewClipObjectPtr clipObjPtr = hasViewClipObject->GetClipObject (clipEEH) ; double frontSize = clipObjPtr->GetSize (CLIPVOLUME_SIZE_FrontDepth) ; clipObjPtr->SetSize (CLIPVOLUME_SIZE_FrontDepth, true); bool cropFlag = clipObjPtr->GetCrop (ClipVolumeCropProp::Front); clipObjPtr->SetCrop (ClipVolumeCropProp::Front, true); RotMatrix rMatrix; rMatrix = clipobjptr->GetRotationMatrix (); clipobjptr->SetRotationMatrix (rMatrix); int numPoints = clipObjPtr->GetNumPoints () ; int iFromPoint=0; DPoint3d points; for(int i = iFromPoint; i < numPoints; i++) { int indexPoint = clipObjPtr->GetPoints (points, iFromPoint, numPoints) ; DPoint3d setPoints = clipobjptr->SetPoints (numPoints,points.data()) ; } IHasViewClipObject* hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&sourceClipEEH.GetHandler ()); IViewClipObjectPtr sourceClipObjPtr = hasViewClipObject->GetClipObject (sourceClipEEH) ; hasViewClipObject = dynamic_cast <IHasViewClipObject*> (&destinationClipEEH1.GetHandler ()); IViewClipObjectPtr destinationClipObjPtr = hasViewClipObject->GetClipObject (destinationClipEEH1) ; destinationClipObjPtr->CopyCrops (sourceClipObjPtr.get()) ; clipObjPtr->SetPreserveUp (true) ; bool getFlag = clipObjPtr->GetPreserveUp (); }
typedef bvector<DPoint3d> DPoint3dVector |
A reference counted pointer to a vector of 3D points.
typedef RefCountedPtr<IViewClipObject> IViewClipObjectPtr |
A reference counted Pointer to IViewClipObject.
|
strong |