#include "OCCViewer_ClippingDlg.h"
#include <QtxDoubleSpinBox.h>
#include <QtxDoubleSpinSlider.h>
#include <QtxIntSpinSlider.h>
#include <QtxAction.h>
#include "SUIT_Session.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_ViewManager.h"
#include "OCCViewer_ClipPlane.h"
#include "OCCViewer_ViewWindow.h"
#include "OCCViewer_ViewPort3d.h"
#include "OCCViewer_ViewModel.h"
#include "OCCViewer_ViewManager.h"
#include "OCCViewer_ClipPlaneInteractor.h"
#include <Basics_OCCTVersion.hxx>
#include <V3d_View.hxx>
#include <Geom_Plane.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Drawer.hxx>
#include <IntAna_IntConicQuad.hxx>
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
#include <math.h>
#include <QApplication>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QLabel>
#include <QPushButton>
#include <QComboBox>
#include <QCheckBox>
#include <QStackedLayout>
#include <QSlider>
#include <QMenu>
Functions | |
void | getMinMaxFromContext (Handle(AIS_InteractiveContext) ic, double theDefaultSize, double &theXMin, double &theYMin, double &theZMin, double &theXMax, double &theYMax, double &theZMax) |
void | ComputeBoundsParam (const double theBounds[6], const double theDirection[3], double theMinPnt[3], double &theMaxBoundPrj, double &theMinBoundPrj) |
void | DistanceToPosition (const double theBounds[6], const double theDirection[3], const double theDist, double thePos[3]) |
bool | ComputeClippingPlaneParameters (const Handle(AIS_InteractiveContext)&theIC, const double theDefaultSize, const double theNormal[3], const double theDist, double theOrigin[3]) |
bool | DistanceToXYZ (const Handle(AIS_InteractiveContext)&theIC, const double theDefaultSize, const double theDistance, const double theDX, const double theDY, const double theDZ, double &theX, double &theY, double &theZ) |
Converts relative plane parameters to absolute. More... | |
void | XYZToDistance (const Handle(AIS_InteractiveContext)&theIC, const double theDefaultSize, const double theX, const double theY, const double theZ, const double theDX, const double theDY, const double theDZ, double &theDistance) |
Converts absolute position and direction to bounding box distance. More... | |
void | clipPlaneParams (OCCViewer_ClipPlane &theClipPlane, Handle(AIS_InteractiveContext) theContext, double &theSize, gp_Pnt &theBasePnt, gp_Dir &theNormal, double defaultSize) |
void clipPlaneParams | ( | OCCViewer_ClipPlane & | theClipPlane, |
Handle(AIS_InteractiveContext) | theContext, | ||
double & | theSize, | ||
gp_Pnt & | theBasePnt, | ||
gp_Dir & | theNormal, | ||
double | defaultSize | ||
) |
Compute clipping plane size base point and normal
References getMinMaxFromContext(), OCCViewer_ClipPlane::OrientationToXYZ(), OCCViewer_ClipPlane::X, OCCViewer_ClipPlane::Y, and OCCViewer_ClipPlane::Z.
void ComputeBoundsParam | ( | const double | theBounds[6], |
const double | theDirection[3], | ||
double | theMinPnt[3], | ||
double & | theMaxBoundPrj, | ||
double & | theMinBoundPrj | ||
) |
Compute the point of bounding box and current clipping plane
References EPS.
bool ComputeClippingPlaneParameters | ( | const Handle(AIS_InteractiveContext)& | theIC, |
const double | theDefaultSize, | ||
const double | theNormal[3], | ||
const double | theDist, | ||
double | theOrigin[3] | ||
) |
Compute the parameters of clipping plane
References DistanceToPosition(), and getMinMaxFromContext().
void DistanceToPosition | ( | const double | theBounds[6], |
const double | theDirection[3], | ||
const double | theDist, | ||
double | thePos[3] | ||
) |
Compute the position of current plane by distance
References ComputeBoundsParam().
bool DistanceToXYZ | ( | const Handle(AIS_InteractiveContext)& | theIC, |
const double | theDefaultSize, | ||
const double | theDistance, | ||
const double | theDX, | ||
const double | theDY, | ||
const double | theDZ, | ||
double & | theX, | ||
double & | theY, | ||
double & | theZ | ||
) |
theIC | [in] the interactive context. |
theDefaultSize | [in] the default trihedron size. |
theDistance | [in] the plane distance relative to minimum corner of model boundaries. |
theDX | [in] x component of plane direction. |
theDY | [in] y component of plane direction. |
theDZ | [in] z component of plane direction. |
theX | [out] x coordinate of plane origin. |
theY | [out] y coordinate of plane origin. |
theZ | [out] z coordinate of plane origin. |
References ComputeClippingPlaneParameters().
void getMinMaxFromContext | ( | Handle(AIS_InteractiveContext) | ic, |
double | theDefaultSize, | ||
double & | theXMin, | ||
double & | theYMin, | ||
double & | theZMin, | ||
double & | theXMax, | ||
double & | theYMax, | ||
double & | theZMax | ||
) |
void XYZToDistance | ( | const Handle(AIS_InteractiveContext)& | theIC, |
const double | theDefaultSize, | ||
const double | theX, | ||
const double | theY, | ||
const double | theZ, | ||
const double | theDX, | ||
const double | theDY, | ||
const double | theDZ, | ||
double & | theDistance | ||
) |
theIC | [in] the interactive context. |
theDefaultSize | [in] the default trihedron size. |
theX | [in] x coordinate of plane origin. |
theY | [in] y coordinate of plane origin. |
theZ | [in] z coordinate of plane origin. |
theDX | [in] x component of plane direction. |
theDY | [in] y component of plane direction. |
theDZ | [in] z component of plane direction. |
theDistance | [out] the plane distance relative to minimum corner of model boundaries. |
References getMinMaxFromContext().