mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023791: Remove obsolete functionality - animation mode and degeneration presentation mode
This commit is contained in:
@@ -23,10 +23,6 @@
|
||||
-- 0312/99 ; GG : BUC60488 Why the field DistinguishModeActive
|
||||
-- field is not accessible properly ?
|
||||
-- workaround : Move the Material fields at end.
|
||||
-- 26/01/00 ; EUG/GG degeneration management (G003)
|
||||
-- Add SetDegenerateModel() and DegenerateModel() methods
|
||||
-- 29/09/00 ; GG degeneration management (G003)
|
||||
-- Add SetDefaultDegenerateModel() and DefaultDegenerateModel() methods
|
||||
-- 22/03/04 ; OCC4895 SAN High-level interface for controlling polygon offsets
|
||||
|
||||
class AspectFillArea3d from Graphic3d inherits AspectFillArea from Aspect
|
||||
@@ -51,7 +47,6 @@ uses
|
||||
|
||||
TypeOfLine from Aspect,
|
||||
InteriorStyle from Aspect,
|
||||
TypeOfDegenerateModel from Aspect,
|
||||
|
||||
MaterialAspect from Graphic3d,
|
||||
TextureMap from Graphic3d
|
||||
@@ -170,36 +165,6 @@ is
|
||||
SetTextureMapOn(me : mutable);
|
||||
SetTextureMapOff(me : mutable);
|
||||
|
||||
SetDefaultDegenerateModel ( myclass;
|
||||
aModel : TypeOfDegenerateModel from Aspect =
|
||||
Aspect_TDM_WIREFRAME;
|
||||
aRatio : Ratio from Quantity = 0.0);
|
||||
---Level: Public
|
||||
---Purpose: Sets the default model of degeneration for the polygons
|
||||
-- which is taking in account at creation time of any
|
||||
-- graphic structure until the model is change using
|
||||
-- SetDegenerateModel() method.
|
||||
---Category: Methods to manage the structure degeneration
|
||||
|
||||
SetDegenerateModel ( me : mutable;
|
||||
aModel : TypeOfDegenerateModel from Aspect =
|
||||
Aspect_TDM_WIREFRAME;
|
||||
aRatio : Ratio from Quantity = 0.0);
|
||||
---Level: Public
|
||||
---Purpose: Sets the model of degeneration for the polygons
|
||||
-- according to the degenerate ratio >= 0. & <= 1. where :
|
||||
-- <aRatio> = 0. indicate that all polygons of the graphic structure
|
||||
-- are displayed.
|
||||
-- <aRatio> = 1. indicate that nothing is displayed in the graphic
|
||||
-- structure.
|
||||
-- When <ARatio> is > 0 & < 1. the corresponding amount
|
||||
-- of polygons are displayed in the graphic structure with a
|
||||
-- random method.
|
||||
-- Warning: the degenerate structure is shown only when
|
||||
-- the animation and degenerate flags are set to TRUE
|
||||
-- in V3d_View::SetAnimationMode(..)
|
||||
---Category: Methods to manage the structure degeneration
|
||||
|
||||
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
|
||||
SetPolygonOffsets ( me : mutable;
|
||||
aMode : Integer from Standard;
|
||||
@@ -272,22 +237,6 @@ is
|
||||
TextureMapState(me)
|
||||
returns Boolean from Standard;
|
||||
|
||||
DegenerateModel ( me ;
|
||||
aRatio: out Ratio from Quantity )
|
||||
returns TypeOfDegenerateModel from Aspect;
|
||||
---Level: Public
|
||||
---Purpose: returns the current degeneration model and ratio
|
||||
-- for the polygons
|
||||
---Category: Inquire methods
|
||||
|
||||
DefaultDegenerateModel ( myclass ;
|
||||
aRatio: out Ratio from Quantity )
|
||||
returns TypeOfDegenerateModel from Aspect;
|
||||
---Level: Public
|
||||
---Purpose: returns the default degeneration model and ratio
|
||||
-- for the polygons
|
||||
---Category: Inquire methods
|
||||
|
||||
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
|
||||
PolygonOffsets ( me;
|
||||
aMode : out Integer from Standard;
|
||||
@@ -298,7 +247,7 @@ is
|
||||
---Category: Inquire methods
|
||||
|
||||
|
||||
--
|
||||
--
|
||||
|
||||
fields
|
||||
|
||||
@@ -335,10 +284,6 @@ fields
|
||||
MyFrontMaterial : MaterialAspect from Graphic3d;
|
||||
MyBackMaterial : MaterialAspect from Graphic3d;
|
||||
|
||||
-- the degenate model
|
||||
MyDegenerateModel : TypeOfDegenerateModel from Aspect;
|
||||
MyDegenerateRatio : Ratio from Quantity;
|
||||
|
||||
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
|
||||
-- polygon offsets
|
||||
MyPolygonOffsetMode : Integer from Standard;
|
||||
|
@@ -17,17 +17,6 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
// Modified 1/08/97 ; PCT : Ajout texture mapping
|
||||
// 26/01/00 ; EUG/GG degeneration management (G003)
|
||||
// Add SetDegenerateModel() and DegenerateModel() methods
|
||||
// JR 02.01.100 : Initialization order of fields in contructors
|
||||
// 29/09/00 ; GG Add SetDefaultDegerateModel() and
|
||||
// DefaultDegenerateModel() class methods
|
||||
// 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
|
||||
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration of variables specific to the context
|
||||
// of tracing of facets 3D
|
||||
|
||||
@@ -39,57 +28,19 @@
|
||||
// Additionally, it has more than one definition of material
|
||||
// for internal and external faces.
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_AspectFillArea3d.ixx>
|
||||
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
#include <Aspect_PolygonOffsetMode.hxx>
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
//-Aliases
|
||||
|
||||
//-Global data definitions
|
||||
static Aspect_TypeOfDegenerateModel theDefaultDegenerateModel = Aspect_TDM_WIREFRAME;
|
||||
static Quantity_Ratio theDefaultDegenerateRatio = 0.0;
|
||||
|
||||
// -- la matiere
|
||||
// MyFrontMaterial : MaterialAspect;
|
||||
// MyBackMaterial : MaterialAspect;
|
||||
|
||||
// -- flag de distinction entre faces internes et externes
|
||||
// DistinguishModeActive : Standard_Boolean;
|
||||
|
||||
// -- flag de trace des aretes
|
||||
// EdgeModeActive : Standard_Boolean;
|
||||
|
||||
// -- flag d'affichage des polygones tournant le dos
|
||||
// BackFaceRemovalActive : Standard_Boolean;
|
||||
|
||||
//-Constructors
|
||||
|
||||
//-Destructors
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d ():
|
||||
DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False), MyTextureMapState(Standard_False), MyFrontMaterial (), MyBackMaterial () {
|
||||
MyDegenerateModel = theDefaultDegenerateModel;
|
||||
MyDegenerateRatio = theDefaultDegenerateRatio;
|
||||
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False), MyTextureMapState(Standard_False), MyFrontMaterial (), MyBackMaterial ()
|
||||
{
|
||||
// By default, aspect do not change current polygon offset parameters
|
||||
MyPolygonOffsetMode = Aspect_POM_Fill;
|
||||
MyPolygonOffsetFactor = 1.;
|
||||
MyPolygonOffsetUnits = 0.;
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
}
|
||||
|
||||
// (InteriorStyle, InteriorColor, EdgeColor, EdgeLineType, EdgeLineWidth)
|
||||
@@ -99,15 +50,10 @@ DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFac
|
||||
|
||||
Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth, const Graphic3d_MaterialAspect& FrontMaterial, const Graphic3d_MaterialAspect& BackMaterial):
|
||||
Aspect_AspectFillArea (InteriorStyle, InteriorColor, EdgeColor, EdgeLineType, EdgeLineWidth), DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False), MyTextureMap(), MyTextureMapState(Standard_False), MyFrontMaterial (FrontMaterial), MyBackMaterial (BackMaterial) {
|
||||
MyDegenerateModel = theDefaultDegenerateModel;
|
||||
MyDegenerateRatio = theDefaultDegenerateRatio;
|
||||
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
// By default, aspect do not change current polygon offset parameters
|
||||
MyPolygonOffsetMode = Aspect_POM_Fill;
|
||||
MyPolygonOffsetFactor = 1.;
|
||||
MyPolygonOffsetUnits = 0.;
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
}
|
||||
|
||||
void Graphic3d_AspectFillArea3d::SetBackMaterial (const Graphic3d_MaterialAspect& AMaterial) {
|
||||
@@ -219,34 +165,6 @@ Standard_Boolean Graphic3d_AspectFillArea3d::TextureMapState() const
|
||||
return MyTextureMapState;
|
||||
}
|
||||
|
||||
void Graphic3d_AspectFillArea3d::SetDefaultDegenerateModel(
|
||||
const Aspect_TypeOfDegenerateModel aModel,
|
||||
const Quantity_Ratio aRatio) {
|
||||
theDefaultDegenerateModel = aModel;
|
||||
theDefaultDegenerateRatio = aRatio;
|
||||
}
|
||||
|
||||
void Graphic3d_AspectFillArea3d::SetDegenerateModel(
|
||||
const Aspect_TypeOfDegenerateModel aModel,
|
||||
const Quantity_Ratio aRatio) {
|
||||
|
||||
MyDegenerateModel = aModel;
|
||||
MyDegenerateRatio = aRatio;
|
||||
}
|
||||
|
||||
Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DefaultDegenerateModel(
|
||||
Quantity_Ratio& aRatio) {
|
||||
aRatio = theDefaultDegenerateRatio;
|
||||
return theDefaultDegenerateModel;
|
||||
}
|
||||
|
||||
Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DegenerateModel(
|
||||
Quantity_Ratio& aRatio) const {
|
||||
aRatio = MyDegenerateRatio;
|
||||
return MyDegenerateModel;
|
||||
}
|
||||
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer aMode,
|
||||
const Standard_ShortReal aFactor,
|
||||
const Standard_ShortReal aUnits) {
|
||||
@@ -262,4 +180,3 @@ void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer& aMode,
|
||||
aFactor = MyPolygonOffsetFactor;
|
||||
aUnits = MyPolygonOffsetUnits;
|
||||
}
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
|
@@ -39,8 +39,6 @@ public:
|
||||
Distinguish (0),
|
||||
BackFace (0),
|
||||
Edge (0),
|
||||
DegenerationMode (0),
|
||||
SkipRatio (0.0f),
|
||||
PolygonOffsetMode (0),
|
||||
PolygonOffsetFactor (0.0f),
|
||||
PolygonOffsetUnits (0.0f)
|
||||
@@ -76,9 +74,6 @@ public:
|
||||
|
||||
Graphic3d_CTexture Texture;
|
||||
|
||||
int DegenerationMode;
|
||||
float SkipRatio;
|
||||
|
||||
int PolygonOffsetMode;
|
||||
float PolygonOffsetFactor;
|
||||
float PolygonOffsetUnits;
|
||||
|
@@ -93,8 +93,6 @@ public:
|
||||
Active (0),
|
||||
ptrUnderLayer (NULL),
|
||||
ptrOverLayer (NULL),
|
||||
IsDegenerates (0),
|
||||
IsDegeneratesPrev (0),
|
||||
Backfacing (0),
|
||||
GDisplayCB (NULL),
|
||||
GClientData (NULL),
|
||||
@@ -127,8 +125,6 @@ public:
|
||||
void* ptrUnderLayer;
|
||||
void* ptrOverLayer;
|
||||
|
||||
int IsDegenerates;
|
||||
int IsDegeneratesPrev;
|
||||
int Backfacing;
|
||||
|
||||
Aspect_RenderingContext GContext;
|
||||
|
@@ -423,11 +423,6 @@ is
|
||||
is deferred;
|
||||
---Purpose: call_togl_transformstructure
|
||||
|
||||
DegenerateStructure ( me : mutable;
|
||||
ACStructure : CStructure from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_degeneratestructure
|
||||
|
||||
Transparency ( me : mutable;
|
||||
ACView : CView from Graphic3d;
|
||||
AFlag : Boolean from Standard )
|
||||
@@ -618,20 +613,6 @@ is
|
||||
---Purpose: call_togl_graduatedtrihedron_minmaxvalues
|
||||
is deferred;
|
||||
|
||||
---------------------------
|
||||
-- Category: Animation mode
|
||||
---------------------------
|
||||
|
||||
BeginAnimation ( me : mutable;
|
||||
ACView : CView from Graphic3d)
|
||||
is deferred;
|
||||
---Purpose: call_togl_begin_animation
|
||||
|
||||
EndAnimation ( me : mutable;
|
||||
ACView : CView from Graphic3d)
|
||||
is deferred;
|
||||
---Purpose: call_togl_end_animation
|
||||
|
||||
----------------------------------
|
||||
-- Category: Ajout mode methods
|
||||
----------------------------------
|
||||
|
@@ -53,8 +53,6 @@
|
||||
// 30/11/98 ; FMN : S4069. Textes always visible.
|
||||
// 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
|
||||
|
||||
#define G003 //EUG 26/01/00 Degeneration management
|
||||
|
||||
#define BUC60918 //GG 31/05/01 A transparente structure priority must have the
|
||||
// MAX_PRIORITY value so, the highlighted structure must have
|
||||
// MAX_PRIORITY-1 value.
|
||||
@@ -984,13 +982,6 @@ Graphic3d_MATERIAL_PHYSIC : Graphic3d_MATERIAL_ASPECT;
|
||||
{
|
||||
CTXF->SetTextureMapOff();
|
||||
}
|
||||
#ifdef G003
|
||||
Aspect_TypeOfDegenerateModel dMode = Aspect_TypeOfDegenerateModel(
|
||||
MyCStructure.ContextFillArea.DegenerationMode);
|
||||
Quantity_Ratio dRatio =
|
||||
MyCStructure.ContextFillArea.SkipRatio;
|
||||
CTXF->SetDegenerateModel(dMode,dRatio);
|
||||
#endif // G003
|
||||
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
CTXF->SetPolygonOffsets(MyCStructure.ContextFillArea.PolygonOffsetMode,
|
||||
@@ -1081,12 +1072,6 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
|
||||
MyCStructure.ContextFillArea.LineType = int (ALType);
|
||||
MyCStructure.ContextFillArea.Width = float (AWidth);
|
||||
MyCStructure.ContextFillArea.Hatch = int (CTX->HatchStyle ());
|
||||
#ifdef G003
|
||||
Quantity_Ratio ratio;
|
||||
MyCStructure.ContextFillArea.DegenerationMode =
|
||||
int (CTX->DegenerateModel(ratio));
|
||||
MyCStructure.ContextFillArea.SkipRatio = float (ratio);
|
||||
#endif // G003
|
||||
|
||||
/*** Front and Back face ***/
|
||||
MyCStructure.ContextFillArea.Distinguish = CTX->Distinguish () ? 1:0;
|
||||
@@ -1239,9 +1224,6 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
|
||||
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
|
||||
|
||||
MyGraphicDriver->ContextStructure (MyCStructure);
|
||||
#ifdef G003
|
||||
MyGraphicDriver -> DegenerateStructure (MyCStructure);
|
||||
#endif
|
||||
|
||||
// CAL 14/04/95
|
||||
// Attributes are "IsSet" during the first update
|
||||
@@ -2142,13 +2124,6 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
|
||||
MyCStructure.ContextFillArea.LineType = int (ALType);
|
||||
MyCStructure.ContextFillArea.Width = float (AWidth);
|
||||
MyCStructure.ContextFillArea.Hatch = int (CTXF->HatchStyle ());
|
||||
#ifdef G003
|
||||
Quantity_Ratio ratio;
|
||||
MyCStructure.ContextFillArea.DegenerationMode =
|
||||
int (CTXF->DegenerateModel(ratio));
|
||||
MyCStructure.ContextFillArea.SkipRatio = float (ratio);
|
||||
#endif // G003
|
||||
|
||||
|
||||
/*** Front and Back face ***/
|
||||
MyCStructure.ContextFillArea.Distinguish = CTXF->Distinguish () ? 1:0;
|
||||
|
Reference in New Issue
Block a user