mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
This commit is contained in:
@@ -70,7 +70,7 @@ void TexturesExt_Presentation::Init()
|
||||
{
|
||||
// initialize v3d_view so it displays TexturesExt well
|
||||
getViewer()->InitActiveViews();
|
||||
Handle_V3d_View aView = getViewer()->ActiveView();
|
||||
Handle(V3d_View) aView = getViewer()->ActiveView();
|
||||
aView->SetSurfaceDetail(V3d_TEX_ALL);
|
||||
aView->SetSize(ZVIEW_SIZE);
|
||||
|
||||
@@ -82,7 +82,7 @@ void TexturesExt_Presentation::Init()
|
||||
" // aShape = ..." EOL
|
||||
"" EOL
|
||||
" // create a textured presentation object for aShape" EOL
|
||||
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
|
||||
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
|
||||
"" EOL
|
||||
" TCollection_AsciiString aTFileName;" EOL
|
||||
"" EOL
|
||||
@@ -124,7 +124,7 @@ void TexturesExt_Presentation::Init()
|
||||
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
|
||||
// is loaded.
|
||||
//================================================================
|
||||
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
|
||||
Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
|
||||
TCollection_AsciiString aTFileName,
|
||||
Standard_Real toScaleU,
|
||||
Standard_Real toScaleV,
|
||||
@@ -134,7 +134,7 @@ Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape&
|
||||
Standard_Real originV)
|
||||
{
|
||||
// create a textured presentation object for aShape
|
||||
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
|
||||
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
|
||||
|
||||
// load texture from file if it is not an integer value
|
||||
// integer value indicates a number of texture in predefined TexturesExt enumeration
|
||||
@@ -190,12 +190,12 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
|
||||
//================================================================
|
||||
void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn)
|
||||
{
|
||||
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
|
||||
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
|
||||
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
|
||||
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
|
||||
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
|
||||
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
|
||||
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
|
||||
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
|
||||
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
|
||||
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
|
||||
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
|
||||
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
|
||||
|
||||
if (isOn)
|
||||
{
|
||||
@@ -238,14 +238,14 @@ void TexturesExt_Presentation::sampleBottle()
|
||||
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
|
||||
|
||||
// display original shape in shaded display mode
|
||||
Handle_AIS_Shape aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
|
||||
Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
|
||||
getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False);
|
||||
DISP(aShapeIO);
|
||||
|
||||
Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
|
||||
Handle(AIS_TexturedShape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
|
||||
DISP(aTFace1);
|
||||
|
||||
Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
|
||||
Handle(AIS_TexturedShape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
|
||||
DISP(aTFace2);
|
||||
|
||||
getViewer()->Update();
|
||||
@@ -267,7 +267,7 @@ void TexturesExt_Presentation::sampleTerrain()
|
||||
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
|
||||
|
||||
// TopLoc_Location aLoc;
|
||||
// Handle_Geom_Surface aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
|
||||
// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
|
||||
// Standard_Real u1,u2,v1,v2;
|
||||
// aSur->Bounds(u1,u2,v1,v2);
|
||||
// gp_Pnt aPnt = aSur->Value(u1, v1);
|
||||
|
Reference in New Issue
Block a user