/// \param theX the X projection value
/// \param theY the Y projection value
/// \param theZ the Z projection value
- virtual void setViewProjection(double theX, double theY, double theZ) = 0;
+ /// \param theTwist the twist angle in radians
+ virtual void setViewProjection( double theX, double theY, double theZ,
+ double theTwist ) = 0;
/// Add selection filter to the viewer
/// \param theFilter a selection filter
}
//**********************************************
-void NewGeom_SalomeViewer::setViewProjection(double theX, double theY, double theZ)
+void NewGeom_SalomeViewer::setViewProjection(double theX, double theY, double theZ, double theTwist)
{
if (!mySelector)
return;
Handle(V3d_View) aView3d = aVFrame->getViewPort()->getView();
if (!aView3d.IsNull()) {
aView3d->SetProj(theX, theY, theZ);
+ aView3d->SetTwist( theTwist );
aView3d->FitAll(0.01, true);
aView3d->SetZSize(0.);
}
/// \param theX the X projection value
/// \param theY the Y projection value
/// \param theZ the Z projection value
- virtual void setViewProjection(double theX, double theY, double theZ);
+ /// \param theTwist the twist angle in radians
+ virtual void setViewProjection( double theX, double theY, double theZ,
+ double theTwist );
/// Set selector
/// \param theSel a selector instance
std::shared_ptr<GeomAPI_Pln> aPlane = GeomAlgoAPI_FaceBuilder::plane(aGShape);
std::shared_ptr<GeomAPI_Dir> aDir = aPlane->direction();
gp_XYZ aXYZ = aDir->impl<gp_Dir>().XYZ();
+ double aTwist = 0.0;
// orienting projection
if(aBaseShape.get() != NULL) {
}
}
- myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z());
+ myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist);
}
// 3. Clear text in the label
myLabel->setText("");
}
}
-void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ)
+void XGUI_ViewerProxy::setViewProjection(double theX, double theY, double theZ, double theTwist)
{
Handle(V3d_View) aView3d = activeView();
if (!aView3d.IsNull()) {
aView3d->SetProj(theX, theY, theZ);
+ aView3d->SetTwist( theTwist );
aView3d->FitAll(0.01, true);
aView3d->SetZSize(0.);
}
/// \param theX the X projection value
/// \param theY the Y projection value
/// \param theZ the Z projection value
- virtual void setViewProjection(double theX, double theY, double theZ);
+ /// \param theTwist the twist angle in radians
+ virtual void setViewProjection( double theX, double theY, double theZ,
+ double theTwist );
//! Sets the view fitted all
virtual void fitAll();