1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0026885: Visualization - drop redundant aspects from structure level

Graphic3d_CStructure and OpenGl_Structure do not store structure aspects anymore.
Graphic3d_Structure, Prs3d_Presentation - structure aspect methods have been removed.

AIS_InteractiveObject::SetAspect() - globalChange argument has been removed.

Undocumented test methods V3d::DrawSphere(), ::SetPlane(), ::PickGrid() have been removed.
This commit is contained in:
kgv
2016-06-20 19:10:51 +03:00
committed by bugmaster
parent a47d34efa9
commit 2831708b17
29 changed files with 75 additions and 1207 deletions

View File

@@ -12,6 +12,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <PrsMgr_Presentation.hxx>
#include <Geom_Transformation.hxx>
#include <Graphic3d_DataStructureManager.hxx>
@@ -19,10 +20,8 @@
#include <Precision.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_Presentation.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_Prs.hxx>
#include <Quantity_Color.hxx>
@@ -266,15 +265,6 @@ void PrsMgr_Presentation::Move (const Quantity_Length theX,
myStructure->Move (theX, theY, theZ);
}
//=======================================================================
//function : SetShadingAspect
//purpose :
//=======================================================================
void PrsMgr_Presentation::SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theShadingAspect) const
{
myStructure->SetShadingAspect (theShadingAspect);
}
//=======================================================================
//function : Compute
//purpose : Methods for hidden parts...

View File

@@ -31,7 +31,6 @@ class PrsMgr_Prs;
class PrsMgr_PresentableObject;
class Quantity_Color;
class Geom_Transformation;
class Prs3d_ShadingAspect;
class Prs3d_Presentation;
class Graphic3d_Structure;
class Graphic3d_DataStructureManager;
@@ -117,9 +116,7 @@ private:
Standard_EXPORT void Multiply (const Handle(Geom_Transformation)& theTrsf) const;
Standard_EXPORT void Move (const Quantity_Length theX, const Quantity_Length theY, const Quantity_Length theZ) const;
Standard_EXPORT void SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theShadingAspect) const;
Standard_EXPORT void Compute (const Handle(Graphic3d_Structure)& theStructure);
Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector);
@@ -132,6 +129,8 @@ private:
Standard_EXPORT static Handle(Prs3d_Projector) Projector (const Handle(Graphic3d_DataStructureManager)& theProjector);
protected:
Handle(PrsMgr_PresentationManager) myPresentationManager;
Handle(Prs3d_Presentation) myStructure;
PrsMgr_PresentableObjectPointer myPresentableObject;

View File

@@ -17,7 +17,6 @@
#include <Graphic3d_GraphicDriver.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_PresentationShadow.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_Presentation.hxx>
@@ -641,36 +640,6 @@ void PrsMgr_PresentationManager::BoundBox (const Handle(PrsMgr_PresentableObject
aPrs->Highlight (Aspect_TOHM_BOUNDBOX, mySelectionColor);
}
// =======================================================================
// function : SetShadingAspect
// purpose :
// =======================================================================
void PrsMgr_PresentationManager::SetShadingAspect (const Handle(PrsMgr_PresentableObject)& thePrsObject,
const Quantity_NameOfColor theColor,
const Graphic3d_NameOfMaterial theMaterial,
const Standard_Integer theMode)
{
Handle(Prs3d_ShadingAspect) anAspect = new Prs3d_ShadingAspect();
anAspect->SetColor (theColor);
anAspect->SetMaterial (theMaterial);
SetShadingAspect (thePrsObject, anAspect, theMode);
}
// =======================================================================
// function : SetShadingAspect
// purpose :
// =======================================================================
void PrsMgr_PresentationManager::SetShadingAspect (const Handle(PrsMgr_PresentableObject)& thePrsObj,
const Handle(Prs3d_ShadingAspect)& theShadingAspect,
const Standard_Integer theMode)
{
const Handle(PrsMgr_Presentation) aPrs = Presentation (thePrsObj, theMode);
if (!aPrs.IsNull())
{
aPrs->SetShadingAspect (theShadingAspect);
}
}
namespace
{
// =======================================================================

View File

@@ -31,7 +31,6 @@
class Geom_Transformation;
class Prs3d_Presentation;
class Prs3d_ShadingAspect;
class PrsMgr_PresentableObject;
class PrsMgr_Presentation;
class Standard_NoSuchObject;
@@ -145,14 +144,8 @@ public:
Standard_EXPORT void Transform (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Handle(Geom_Transformation)& theTransformation, const Standard_Integer theMode = 0);
//! Returns the structure manager.
const Handle(Graphic3d_StructureManager)& StructureManager() const;
//! this method will change the color and the aspect of the presentations containing shaded structures.
Standard_EXPORT void SetShadingAspect (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Quantity_NameOfColor theColor, const Graphic3d_NameOfMaterial theMaterial, const Standard_Integer theMode = 0);
//! this method will change the color and the aspect of the presentations containing shaded structures.
Standard_EXPORT void SetShadingAspect (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Handle(Prs3d_ShadingAspect)& theShadingAspect, const Standard_Integer theMode = 0);
const Handle(Graphic3d_StructureManager)& StructureManager() const;
//! Returns true if there is a presentation of the
//! presentable object thePrsObject in this framework, thePrsObject having the display mode theMode.
Standard_EXPORT Standard_Boolean HasPresentation (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;