mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0031458: Visualization - refine classes across Prs3d and StdPrs packages
Prs3d::GetDeflection() has been moved to StdPrs_ToolTriangulatedShape::GetDeflection(). Prs3d_ShapeTool has been moved to StdPrs_ShapeTool. Code collecting free edges on Poly_Triangulation has been moved out from StdPrs_WFShape to Prs3d::AddFreeEdges(). StdPrs_BndBox has been moved to Prs3d_BndBox. Geom_Transformation has been replaced by TopLoc_Datum3D within visualization classes. Select3D_SensitiveCircle constructor now takes gp_Circ instead of Geom_Circle. StdSelect_ViewerSelector3d has been moved to SelectMgr_ViewerSelector3d. Methods ::GetPoint3d() and ::ArrayBounds() has been moved from subclass Select3D_SensitiveCircle to the base class Select3D_SensitiveCurve. StdSelect_ViewerSelector3d::computeSensitivePrs() has been moved to SelectMgr::ComputeSensitivePrs(). Removed unused declarations StdSelect_Prs, StdSelect_DisplayMode, StdSelect_SensitivityMode, StdSelect_TypeOfResult, SelectMgr_SOPtr, TColQuantity. Package Graphic3d has been moved from TKV3d to TKService.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include <Graphic3d_TransformPers.hxx>
|
||||
#include <Graphic3d_Vec3.hxx>
|
||||
#include <Graphic3d_ZLayerId.hxx>
|
||||
#include <Geom_Transformation.hxx>
|
||||
#include <TopLoc_Datum3D.hxx>
|
||||
#include <NCollection_IndexedMap.hxx>
|
||||
|
||||
class Graphic3d_GraphicDriver;
|
||||
@@ -79,10 +79,10 @@ public:
|
||||
}
|
||||
|
||||
//! Return transformation.
|
||||
const Handle(Geom_Transformation)& Transformation() const { return myTrsf; }
|
||||
const Handle(TopLoc_Datum3D)& Transformation() const { return myTrsf; }
|
||||
|
||||
//! Assign transformation.
|
||||
virtual void SetTransformation (const Handle(Geom_Transformation)& theTrsf) { myTrsf = theTrsf; }
|
||||
virtual void SetTransformation (const Handle(TopLoc_Datum3D)& theTrsf) { myTrsf = theTrsf; }
|
||||
|
||||
//! Return transformation persistence.
|
||||
const Handle(Graphic3d_TransformPers)& TransformPersistence() const { return myTrsfPers; }
|
||||
@@ -227,7 +227,7 @@ protected:
|
||||
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
|
||||
Graphic3d_SequenceOfGroup myGroups;
|
||||
Graphic3d_BndBox3d myBndBox;
|
||||
Handle(Geom_Transformation) myTrsf;
|
||||
Handle(TopLoc_Datum3D) myTrsf;
|
||||
Handle(Graphic3d_TransformPers) myTrsfPers;
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes;
|
||||
Handle(Graphic3d_PresentationAttributes) myHighlightStyle; //! Current highlight style; is set only if highlight flag is true
|
||||
|
@@ -298,7 +298,7 @@ void Graphic3d_CView::ReCompute (const Handle(Graphic3d_Structure)& theStruct)
|
||||
// compute + validation
|
||||
Handle(Graphic3d_Structure) aCompStructOld = myStructsComputed.ChangeValue (anIndex);
|
||||
Handle(Graphic3d_Structure) aCompStruct = aCompStructOld;
|
||||
aCompStruct->SetTransformation (Handle(Geom_Transformation)());
|
||||
aCompStruct->SetTransformation (Handle(TopLoc_Datum3D)());
|
||||
theStruct->computeHLR (myCamera, aCompStruct);
|
||||
aCompStruct->SetHLRValidation (Standard_True);
|
||||
aCompStruct->CalculateBoundBox();
|
||||
@@ -768,7 +768,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
|
||||
if (anIndex != 0)
|
||||
{
|
||||
aStruct = myStructsComputed.Value (anIndex);
|
||||
aStruct->SetTransformation (Handle(Geom_Transformation)());
|
||||
aStruct->SetTransformation (Handle(TopLoc_Datum3D)());
|
||||
}
|
||||
theStructure->computeHLR (myCamera, aStruct);
|
||||
|
||||
@@ -871,7 +871,7 @@ void Graphic3d_CView::Highlight (const Handle(Graphic3d_Structure)& theStructure
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Graphic3d_CView::SetTransform (const Handle(Graphic3d_Structure)& theStructure,
|
||||
const Handle(Geom_Transformation)& theTrsf)
|
||||
const Handle(TopLoc_Datum3D)& theTrsf)
|
||||
{
|
||||
const Standard_Integer anIndex = IsComputed (theStructure);
|
||||
if (anIndex != 0)
|
||||
|
@@ -193,7 +193,7 @@ private:
|
||||
|
||||
//! Transforms the structure in the view.
|
||||
Standard_EXPORT void SetTransform (const Handle(Graphic3d_Structure)& theStructure,
|
||||
const Handle(Geom_Transformation)& theTrsf);
|
||||
const Handle(TopLoc_Datum3D)& theTrsf);
|
||||
|
||||
//! Suppress the highlighting on the structure <AStructure>
|
||||
//! in the view <me>.
|
||||
|
@@ -669,7 +669,7 @@ void Graphic3d_Structure::DisconnectAll (const Graphic3d_TypeOfConnection theTyp
|
||||
//function : SetTransform
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
void Graphic3d_Structure::SetTransformation (const Handle(Geom_Transformation)& theTrsf)
|
||||
void Graphic3d_Structure::SetTransformation (const Handle(TopLoc_Datum3D)& theTrsf)
|
||||
{
|
||||
if (IsDeleted()) return;
|
||||
|
||||
@@ -678,7 +678,7 @@ void Graphic3d_Structure::SetTransformation (const Handle(Geom_Transformation)&
|
||||
if (!theTrsf.IsNull()
|
||||
&& theTrsf->Trsf().Form() == gp_Identity)
|
||||
{
|
||||
myCStructure->SetTransformation (Handle(Geom_Transformation)());
|
||||
myCStructure->SetTransformation (Handle(TopLoc_Datum3D)());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -344,13 +344,13 @@ public:
|
||||
}
|
||||
|
||||
//! Return local transformation.
|
||||
const Handle(Geom_Transformation)& Transformation() const { return myCStructure->Transformation(); }
|
||||
const Handle(TopLoc_Datum3D)& Transformation() const { return myCStructure->Transformation(); }
|
||||
|
||||
//! Modifies the current local transformation
|
||||
Standard_EXPORT void SetTransformation (const Handle(Geom_Transformation)& theTrsf);
|
||||
Standard_EXPORT void SetTransformation (const Handle(TopLoc_Datum3D)& theTrsf);
|
||||
|
||||
Standard_DEPRECATED("This method is deprecated - SetTransformation() should be called instead")
|
||||
void Transform (const Handle(Geom_Transformation)& theTrsf) { SetTransformation (theTrsf); }
|
||||
void Transform (const Handle(TopLoc_Datum3D)& theTrsf) { SetTransformation (theTrsf); }
|
||||
|
||||
//! Modifies the current transform persistence (pan, zoom or rotate)
|
||||
Standard_EXPORT void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers);
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
void GraphicDisconnect (const Handle(Graphic3d_Structure)& theDaughter) { myCStructure->Disconnect (*theDaughter->myCStructure); }
|
||||
|
||||
//! Internal method which sets new transformation without calling graphic manager callbacks.
|
||||
void GraphicTransform (const Handle(Geom_Transformation)& theTrsf) { myCStructure->SetTransformation (theTrsf); }
|
||||
void GraphicTransform (const Handle(TopLoc_Datum3D)& theTrsf) { myCStructure->SetTransformation (theTrsf); }
|
||||
|
||||
//! Returns the identification number of this structure.
|
||||
Standard_Integer Identification() const { return myCStructure->Id; }
|
||||
|
@@ -407,7 +407,7 @@ void Graphic3d_StructureManager::UnHighlight()
|
||||
// purpose :
|
||||
// ========================================================================
|
||||
void Graphic3d_StructureManager::SetTransform (const Handle(Graphic3d_Structure)& theStructure,
|
||||
const Handle(Geom_Transformation)& theTrsf)
|
||||
const Handle(TopLoc_Datum3D)& theTrsf)
|
||||
{
|
||||
for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next())
|
||||
{
|
||||
|
@@ -109,7 +109,7 @@ public:
|
||||
Standard_EXPORT virtual void Highlight (const Handle(Graphic3d_Structure)& theStructure);
|
||||
|
||||
//! Transforms the structure.
|
||||
Standard_EXPORT virtual void SetTransform (const Handle(Graphic3d_Structure)& theStructure, const Handle(Geom_Transformation)& theTrsf);
|
||||
Standard_EXPORT virtual void SetTransform (const Handle(Graphic3d_Structure)& theStructure, const Handle(TopLoc_Datum3D)& theTrsf);
|
||||
|
||||
//! Changes the display priority of the structure <AStructure>.
|
||||
Standard_EXPORT virtual void ChangeDisplayPriority (const Handle(Graphic3d_Structure)& theStructure, const Standard_Integer theOldPriority, const Standard_Integer theNewPriority);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#define _Graphic3d_ZLayerSettings_HeaderFile
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Geom_Transformation.hxx>
|
||||
#include <TopLoc_Datum3D.hxx>
|
||||
#include <Graphic3d_LightSet.hxx>
|
||||
#include <Graphic3d_PolygonOffset.hxx>
|
||||
#include <Precision.hxx>
|
||||
@@ -63,7 +63,7 @@ struct Graphic3d_ZLayerSettings
|
||||
const gp_XYZ& Origin() const { return myOrigin; }
|
||||
|
||||
//! Return the transformation to the origin.
|
||||
const Handle(Geom_Transformation)& OriginTransformation() const { return myOriginTrsf; }
|
||||
const Handle(TopLoc_Datum3D)& OriginTransformation() const { return myOriginTrsf; }
|
||||
|
||||
//! Set the origin of all objects within the layer.
|
||||
void SetOrigin (const gp_XYZ& theOrigin)
|
||||
@@ -72,8 +72,9 @@ struct Graphic3d_ZLayerSettings
|
||||
myOriginTrsf.Nullify();
|
||||
if (!theOrigin.IsEqual (gp_XYZ(0.0, 0.0, 0.0), gp::Resolution()))
|
||||
{
|
||||
myOriginTrsf = new Geom_Transformation();
|
||||
myOriginTrsf->SetTranslation (theOrigin);
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTranslation (theOrigin);
|
||||
myOriginTrsf = new TopLoc_Datum3D (aTrsf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +237,7 @@ protected:
|
||||
|
||||
TCollection_AsciiString myName; //!< user-provided name
|
||||
Handle(Graphic3d_LightSet) myLights; //!< lights list
|
||||
Handle(Geom_Transformation) myOriginTrsf; //!< transformation to the origin
|
||||
Handle(TopLoc_Datum3D) myOriginTrsf; //!< transformation to the origin
|
||||
gp_XYZ myOrigin; //!< the origin of all objects within the layer
|
||||
Standard_Real myCullingDistance; //!< distance to discard objects
|
||||
Standard_Real myCullingSize; //!< size to discard objects
|
||||
|
Reference in New Issue
Block a user