mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024023: Revamp the OCCT Handle -- general
Missing headers added; includes of headers "Handle_...hxx" removed. Misuses of macro Handle() and its use in typedefs corrected. Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly. Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx) Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle) Fixed reference-type local variable pointing to temporary object Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
This commit is contained in:
@@ -29,8 +29,7 @@ public:
|
||||
: IsDef (0),
|
||||
IsSet (0),
|
||||
MarkerType (Aspect_TOM_POINT),
|
||||
Scale (0),
|
||||
MarkerImage (NULL)
|
||||
Scale (0)
|
||||
{
|
||||
memset (&Color, 0, sizeof(Color));
|
||||
}
|
||||
|
@@ -21,12 +21,11 @@
|
||||
#include <Graphic3d_SequenceOfHClipPlane.hxx>
|
||||
#include <Graphic3d_TypeOfComposition.hxx>
|
||||
#include <Graphic3d_ViewAffinity.hxx>
|
||||
#include <Graphic3d_StructureManager.hxx>
|
||||
#include <Graphic3d_Vec3.hxx>
|
||||
#include <Graphic3d_ZLayerId.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
//! Forward declaration.
|
||||
class Graphic3d_GraphicDriver;
|
||||
class Graphic3d_StructureManager;
|
||||
|
||||
//! Low-level graphic structure interface
|
||||
class Graphic3d_CStructure : public Standard_Transient
|
||||
|
@@ -33,7 +33,6 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane()
|
||||
myIsOn (Standard_True),
|
||||
myIsCapping (Standard_False),
|
||||
myMaterial (Graphic3d_NOM_DEFAULT),
|
||||
myTexture (NULL),
|
||||
myHatch (Aspect_HS_HORIZONTAL),
|
||||
myHatchOn (Standard_False),
|
||||
myId(),
|
||||
@@ -52,7 +51,6 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Equation& theEquation)
|
||||
myIsOn (Standard_True),
|
||||
myIsCapping (Standard_False),
|
||||
myMaterial (Graphic3d_NOM_DEFAULT),
|
||||
myTexture (NULL),
|
||||
myHatch (Aspect_HS_HORIZONTAL),
|
||||
myHatchOn (Standard_False),
|
||||
myId(),
|
||||
@@ -91,7 +89,6 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const gp_Pln& thePlane)
|
||||
myIsOn (Standard_True),
|
||||
myIsCapping (Standard_False),
|
||||
myMaterial (Graphic3d_NOM_DEFAULT),
|
||||
myTexture (NULL),
|
||||
myHatch (Aspect_HS_HORIZONTAL),
|
||||
myHatchOn (Standard_False),
|
||||
myId(),
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <NCollection_Map.hxx>
|
||||
|
||||
class Graphic3d_Structure;
|
||||
typedef NCollection_Map<Handle(Graphic3d_Structure)> Graphic3d_MapOfStructure;
|
||||
|
||||
#endif // _Graphic3d_MapOfStructure
|
||||
|
@@ -30,9 +30,7 @@ namespace
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_MarkerImage::Graphic3d_MarkerImage (const Handle(Image_PixMap)& theImage)
|
||||
: myBitMap (NULL),
|
||||
myImage (theImage),
|
||||
myImageAlpha (NULL),
|
||||
: myImage (theImage),
|
||||
myMargin (1),
|
||||
myWidth ((Standard_Integer )theImage->Width()),
|
||||
myHeight ((Standard_Integer )theImage->Height())
|
||||
@@ -52,8 +50,6 @@ Graphic3d_MarkerImage::Graphic3d_MarkerImage (const Handle(TColStd_HArray1OfByte
|
||||
const Standard_Integer& theWidth,
|
||||
const Standard_Integer& theHeight)
|
||||
: myBitMap (theBitMap),
|
||||
myImage (NULL),
|
||||
myImageAlpha (NULL),
|
||||
myMargin (1),
|
||||
myWidth (theWidth),
|
||||
myHeight (theHeight)
|
||||
|
@@ -17,10 +17,11 @@
|
||||
#define _Graphic3d_MarkerImage_H__
|
||||
|
||||
#include <TColStd_HArray1OfByte.hxx>
|
||||
#include <Image_PixMap_Handle.hxx>
|
||||
#include <Quantity_Parameter.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
class Image_PixMap;
|
||||
|
||||
//! This class is used to store bitmaps and images for markers rendering.
|
||||
//! It can convert bitmap texture stored in TColStd_HArray1OfByte to Image_PixMap and vice versa.
|
||||
class Graphic3d_MarkerImage : public Standard_Transient
|
||||
|
@@ -17,9 +17,8 @@
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <NCollection_Map.hxx>
|
||||
#include <NCollection_Handle.hxx>
|
||||
#include <NCollection_Shared.hxx>
|
||||
|
||||
typedef NCollection_Map<const Standard_Transient* > Graphic3d_NMapOfTransient;
|
||||
typedef NCollection_Handle<Graphic3d_NMapOfTransient> Handle(Graphic3d_NMapOfTransient);
|
||||
typedef NCollection_Shared< NCollection_Map<const Standard_Transient* > > Graphic3d_NMapOfTransient;
|
||||
|
||||
#endif // _Graphic3d_NMapOfTransient_HeaderFile
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <Graphic3d_ShaderObject.hxx>
|
||||
#include <Graphic3d_ShaderVariable.hxx>
|
||||
#include <Graphic3d_TextureParams.hxx>
|
||||
#include <NCollection_Sequence.hxx>
|
||||
|
||||
//! List of shader objects.
|
||||
|
Reference in New Issue
Block a user