0031866: Documentation - add description to Graphic3d_NameOfMaterial enumeration...
authorkgv <kgv@opencascade.com>
Wed, 21 Oct 2020 07:28:12 +0000 (10:28 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 22 Oct 2020 14:40:42 +0000 (17:40 +0300)
Enumeration values have been renamed to use complete prefix Graphic3d_NOM_ -> Graphic3d_NameOfMaterial_
and to match string names (with old values preserved as aliases).

47 files changed:
dox/user_guides/visualization/visualization.md
samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp
samples/ios/UIKitSample/UIKitSample/OcctViewer.mm
samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp
samples/mfc/standard/01_Geometry/src/GeometryDoc.h
samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h
samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp
samples/mfc/standard/05_ImportExport/src/StdAfx.h
samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h
samples/mfc/standard/08_HLR/src/StdAfx.h
samples/mfc/standard/09_Animation/src/AnimationDoc.cpp
samples/mfc/standard/09_Animation/src/StdAfx.h
samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h
samples/qt/Tutorial/src/DocumentTut.cxx
samples/webgl/main.cpp
src/AIS/AIS_CameraFrustum.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_Plane.cxx
src/AIS/AIS_PointCloud.cxx
src/AIS/AIS_RubberBand.cxx
src/AIS/AIS_Shape.cxx
src/AIS/AIS_ViewCube.cxx
src/AIS/AIS_ViewCube.hxx
src/AIS/AIS_XRTrackedDevice.cxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_ClipPlane.hxx
src/Graphic3d/Graphic3d_MaterialAspect.cxx
src/Graphic3d/Graphic3d_MaterialAspect.hxx
src/Graphic3d/Graphic3d_NameOfMaterial.hxx
src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/MeshVS/MeshVS_Tool.cxx
src/Prs3d/Prs3d_Drawer.hxx
src/Prs3d/Prs3d_ShadingAspect.cxx
src/PrsDim/PrsDim_Dimension.cxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_17.cxx
src/QABugs/QABugs_3.cxx
src/V3d/V3d_Plane.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XCAFDoc/XCAFDoc_VisMaterial.cxx
src/XCAFPrs/XCAFPrs_AISObject.cxx
src/XDEDRAW/XDEDRAW.cxx

index df6545e..b557ed2 100644 (file)
@@ -1556,7 +1556,7 @@ aTriangles->AddVertex ( 100./2.,  100./2., 0.0);
 
 Handle(Graphic3d_AspectFillArea3d) anAspects = new Graphic3d_AspectFillArea3d (Aspect_IS_SOLID, Quantity_NOC_RED,
                                                                                Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0f,
-                                                                               Graphic3d_NOM_GOLD, Graphic3d_NOM_GOLD);
+                                                                               Graphic3d_NameOfMaterial_Gold, Graphic3d_NameOfMaterial_Gold);
 aPrsGroup->SetGroupPrimitivesAspect (anAspects);
 aPrsGroup->AddPrimitiveArray (aTriangles);
 
@@ -2018,8 +2018,8 @@ aFirebrickMarker->SetMarkerImage (theImage)
 Create facet attributes.
 ~~~~~{.cpp}
 Handle(Graphic3d_AspectFillArea3d) aFaceAspect = new Graphic3d_AspectFillArea3d();
-Graphic3d_MaterialAspect aBrassMaterial (Graphic3d_NOM_BRASS);
-Graphic3d_MaterialAspect aGoldMaterial  (Graphic3d_NOM_GOLD);
+Graphic3d_MaterialAspect aBrassMaterial (Graphic3d_NameOfMaterial_Brass);
+Graphic3d_MaterialAspect aGoldMaterial  (Graphic3d_NameOfMaterial_Gold);
 aFaceAspect->SetInteriorStyle (Aspect_IS_SOLID_WIREFRAME);
 aFaceAspect->SetInteriorColor (aMyColor);
 aFaceAspect->SetDistinguishOn ();
index a2dc64c..3ea7ef9 100644 (file)
@@ -748,7 +748,7 @@ public:
     }
 
     Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
-    myAISContext()->SetMaterial   (aPrs, Graphic3d_NOM_GOLD, Standard_False);
+    myAISContext()->SetMaterial   (aPrs, Graphic3d_NameOfMaterial_Gold, Standard_False);
     myAISContext()->SetDisplayMode(aPrs, AIS_Shaded, Standard_False);
     myAISContext()->Display (aPrs, Standard_True);
     return true;
index c2c4fe8..277646a 100644 (file)
@@ -316,7 +316,7 @@ void OcctViewer::displayWithChildren (XCAFDoc_ShapeTool&             theShapeToo
     Handle(AIS_InteractiveObject) anAis;
     if (!theMapOfShapes.Find (aRefLabel, anAis))
     {
-      anAis = new CafShapePrs (aRefLabel, theParentStyle, Graphic3d_NOM_SHINY_PLASTIC);
+      anAis = new CafShapePrs (aRefLabel, theParentStyle, Graphic3d_NameOfMaterial_ShinyPlastified);
       theMapOfShapes.Bind (aRefLabel, anAis);
     }
     
index 16933e4..968d346 100755 (executable)
@@ -1532,7 +1532,7 @@ Handle(AIS_InteractiveObject) CGeometryDoc::drawSurface
   Handle(AIS_Shape) aGraphicSurface = 
     new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion()));
 
-  myAISContext->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
+  myAISContext->SetMaterial(aGraphicSurface, Graphic3d_NameOfMaterial_Plastified, toDisplay);
   myAISContext->SetColor(aGraphicSurface, theColor, toDisplay);
   if (toDisplay)
   {
index bd8f39a..1c3ff8c 100755 (executable)
@@ -76,7 +76,7 @@ public:
   // and displays it in the viewer if toDisplay = Standard_True
 
   Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
-                              const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
+                              const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass,
                               const Standard_Boolean toDisplay = Standard_True);
   // creates a presentation of the given shape with the given material
   // (color is default for a given material)
index bafd2c9..1fa66aa 100755 (executable)
@@ -114,7 +114,7 @@ protected:
   // and displays it in the viewer if toDisplay = Standard_True
 
   Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
-         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
+         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass,
          const Standard_Boolean toDisplay = Standard_True);
   // creates a presentation of the given shape with the given material
   // (color is default for a given material)
index ce2f4c7..71b0752 100755 (executable)
@@ -46,7 +46,7 @@ void CColoredShapes::Display(Handle(AIS_InteractiveContext)& anAIScontext)
        {
                Handle(AIS_Shape) ais = new AIS_Shape(iter.Value());
                anAIScontext->SetColor(ais, (Quantity_NameOfColor)m_colorMap.Find(iter.Value()), Standard_False);
-    anAIScontext->SetMaterial(ais, Graphic3d_NOM_GOLD, Standard_False);
+    anAIScontext->SetMaterial(ais, Graphic3d_NameOfMaterial_Gold, Standard_False);
                anAIScontext->Display(ais, Standard_False);
        }
   anAIScontext->UpdateCurrentViewer();
index c9db7cc..d303cfc 100755 (executable)
@@ -25,7 +25,7 @@
 #define DEFAULT_DCSMALL 0.0002
 #define DEFAULT_DCVSMALL 0.00004
 #define DEFAULT_COLOR Quantity_NOC_CYAN1
-#define DEFAULT_MATERIAL Graphic3d_NOM_PLASTER
+#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered
 #define DEFAULT_BACKGROUNDCOLOR Quantity_NOC_MATRAGRAY
 #define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW
 
index 2ee4cae..4b6c3fa 100755 (executable)
@@ -114,7 +114,7 @@ protected:
   // and displays it in the viewer if toDisplay = Standard_True
 
   Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
-         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
+         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass,
          const Standard_Boolean toDisplay = Standard_True);
   // creates a presentation of the given shape with the given material
   // (color is default for a given material)
index d9704f5..bb23af5 100755 (executable)
@@ -29,7 +29,7 @@
 #define DEFAULT_DCSMALL 0.0002
 #define DEFAULT_DCVSMALL 0.00004
 #define DEFAULT_COLOR Quantity_NOC_CYAN1
-#define DEFAULT_MATERIAL Graphic3d_NOM_PLASTER
+#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered
 #define DEFAULT_BACKGROUNDCOLOR Quantity_NOC_MATRAGRAY
 #define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW
 
index ecb0f0b..1828576 100755 (executable)
@@ -12,7 +12,7 @@
 #include "Fonc.hxx"
 
 #define DEFAULT_COLOR Quantity_NOC_CYAN1
-#define DEFAULT_MATERIAL Graphic3d_NOM_PLASTER
+#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered
 #define DEFAULT_DEVIATIONCOEFFICIENT 0.001
 #define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW
 
@@ -123,23 +123,23 @@ CAnimationDoc::CAnimationDoc()
 
        myAisCylinderHead = new AIS_Shape (CylinderHead);
        myAISContext->SetColor    (myAisCylinderHead, Quantity_NOC_WHITE, Standard_False);
-       myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NOM_PLASTIC, Standard_False);
+       myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NameOfMaterial_Plastified, Standard_False);
        myAisEngineBlock  = new AIS_Shape (EngineBlock);
        myAISContext->SetColor(myAisEngineBlock,   Quantity_NOC_WHITE, Standard_False);
-       myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NOM_PLASTIC, Standard_False);
+       myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NameOfMaterial_Plastified, Standard_False);
 
        myAISContext->Display(myAisCylinderHead ,1,-1,Standard_False);
        myAISContext->Display(myAisEngineBlock  ,1,-1,Standard_False);
 
        myAisCrankArm     = new AIS_Shape (CrankArm);
        myAISContext->SetColor   (myAisCrankArm, Quantity_NOC_HOTPINK, Standard_False);
-       myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NOM_PLASTIC, Standard_False);
+       myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NameOfMaterial_Plastified, Standard_False);
        myAisPiston       = new AIS_Shape (Piston);
        myAISContext->SetColor   (myAisPiston  , Quantity_NOC_WHITE, Standard_False);
-       myAISContext->SetMaterial(myAisPiston  , Graphic3d_NOM_PLASTIC, Standard_False);
+       myAISContext->SetMaterial(myAisPiston  , Graphic3d_NameOfMaterial_Plastified, Standard_False);
        myAisPropeller    = new AIS_Shape (Propeller);
        myAISContext->SetColor   (myAisPropeller, Quantity_NOC_RED, Standard_False);
-       myAISContext->SetMaterial(myAisPropeller, Graphic3d_NOM_PLASTIC, Standard_False);
+       myAISContext->SetMaterial(myAisPropeller, Graphic3d_NameOfMaterial_Plastified, Standard_False);
 
        myAISContext->Display(myAisCrankArm,  1,-1,Standard_False);
        myAISContext->Display(myAisPropeller, 1,-1,Standard_False);
@@ -316,7 +316,7 @@ void CAnimationDoc::OnFileLoadgrid()
          myAISContext->Display(myAISSurface, Standard_False);
          myAISContext->Deactivate(myAISSurface,Standard_False);
          myAISContext->SetColor (myAISSurface,Quantity_NOC_WHITE,Standard_False);
-         myAISContext->SetMaterial (myAISSurface,Graphic3d_NOM_STONE,Standard_False);
+         myAISContext->SetMaterial (myAISSurface,Graphic3d_NameOfMaterial_Stone,Standard_False);
          myAISContext->SetDisplayMode (myAISSurface,1,Standard_False);
          myAISContext->SetDeviationCoefficient (0.001);
        CMDIFrameWnd *pFrame =  (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
index 762f520..a10eb15 100755 (executable)
@@ -39,7 +39,7 @@ enum CurrentAction3d {
 #define DEFAULT_DCSMALL 0.0002
 #define DEFAULT_DCVSMALL 0.00004
 #define DEFAULT_COLOR Quantity_NOC_CYAN1
-#define DEFAULT_MATERIAL Graphic3d_NOM_PLASTER
+#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered
 #define DEFAULT_BACKGROUNDCOLOR Quantity_NOC_MATRAGRAY
 #define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW
 
index 4164b86..5cf9390 100755 (executable)
@@ -113,7 +113,7 @@ protected:
   // and displays it in the viewer if toDisplay = Standard_True
 
   Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
-         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
+         const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass,
          const Standard_Boolean toDisplay = Standard_True);
   // creates a presentation of the given shape with the given material
   // (color is default for a given material)
index 8a579a8..e8f7502 100755 (executable)
@@ -26,7 +26,7 @@ void DocumentTut::onMakeBottle()
     QApplication::setOverrideCursor( Qt::WaitCursor );
     TopoDS_Shape aBottle=MakeBottle(50,70,30);
     Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle);
-    getContext()->SetMaterial (AISBottle, Graphic3d_NOM_GOLD, Standard_False);
+    getContext()->SetMaterial (AISBottle, Graphic3d_NameOfMaterial_Gold, Standard_False);
     getContext()->SetDisplayMode(AISBottle, 1, Standard_False);
     getContext()->Display(AISBottle, Standard_False);  
     const Handle(AIS_InteractiveObject)& anIOAISBottle = AISBottle;
index fd7b94d..306a42f 100644 (file)
@@ -46,7 +46,7 @@ extern "C" void onFileDataRead (void* theOpaque, void* theBuffer, int theDataLen
   BRepTools::Read (aShape, aStream, aBuilder);
 
   Handle(AIS_Shape) aShapePrs = new AIS_Shape (aShape);
-  aShapePrs->SetMaterial (Graphic3d_NOM_SILVER);
+  aShapePrs->SetMaterial (Graphic3d_NameOfMaterial_Silver);
   aViewer.Context()->Display (aShapePrs, AIS_Shaded, 0, false);
   aViewer.View()->FitAll (0.01, false);
   aViewer.View()->Redraw();
index a9131c0..fffcbea 100644 (file)
@@ -43,7 +43,7 @@ AIS_CameraFrustum::AIS_CameraFrustum()
   myDrawer->SetLineAspect (new Prs3d_LineAspect (THE_DEFAULT_COLOR, Aspect_TOL_SOLID, 1.0));
 
   Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect();
-  aShadingAspect->SetMaterial (Graphic3d_NOM_PLASTIC);
+  aShadingAspect->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
   aShadingAspect->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
   aShadingAspect->SetTransparency (THE_DEFAULT_TRANSPARENCY);
   aShadingAspect->SetColor (THE_DEFAULT_COLOR);
index 67fece1..fe54d23 100644 (file)
@@ -2180,7 +2180,7 @@ void AIS_InteractiveContext::SetSelectionSensitivity (const Handle(AIS_Interacti
 //=======================================================================
 void AIS_InteractiveContext::InitAttributes()
 {
-  Graphic3d_MaterialAspect aMat (Graphic3d_NOM_BRASS);
+  Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_Brass);
   myDefaultDrawer->ShadingAspect()->SetMaterial (aMat);
 
 //  myDefaultDrawer->ShadingAspect()->SetColor(Quantity_NOC_GRAY70);
index fabb54d..0c63024 100644 (file)
@@ -588,7 +588,7 @@ void AIS_Plane::ComputeFields()
 void AIS_Plane::InitDrawerAttributes()
 {
   Handle(Prs3d_ShadingAspect) shasp = new Prs3d_ShadingAspect();
-  shasp->SetMaterial(Graphic3d_NOM_PLASTIC);
+  shasp->SetMaterial(Graphic3d_NameOfMaterial_Plastified);
   shasp->SetColor(Quantity_NOC_GRAY40);
   myDrawer->SetShadingAspect(shasp);
   Handle(Graphic3d_AspectFillArea3d) asf = shasp->Aspect();
index c2d8a73..4590faa 100644 (file)
@@ -297,7 +297,7 @@ void AIS_PointCloud::UnsetColor()
 
   AIS_InteractiveObject::UnsetColor();
   {
-    Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NOM_BRASS);
+    Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NameOfMaterial_Brass);
     Graphic3d_MaterialAspect aMat = aDefaultMat;
     Quantity_Color aColor = aDefaultMat.Color();
     if (myDrawer->HasLink())
@@ -353,7 +353,7 @@ void AIS_PointCloud::UnsetMaterial()
   }
 
   {
-    Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NOM_BRASS);
+    Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NameOfMaterial_Brass);
     myDrawer->ShadingAspect()->SetMaterial (myDrawer->HasLink() ?
                                             myDrawer->Link()->ShadingAspect()->Material (myCurrentFacingModel) :
                                             aDefaultMat,
index 94fbbff..8e5360d 100644 (file)
@@ -42,7 +42,7 @@ AIS_RubberBand::AIS_RubberBand()
 {
   myDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0));
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
-  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
+  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
   myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
   myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
@@ -65,7 +65,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor,
 {
   myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theWidth));
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
-  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
+  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
   myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
   myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend);
@@ -90,7 +90,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor,
 {
   myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theLineWidth));
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
-  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
+  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
   myDrawer->ShadingAspect()->SetColor (theFillColor);
   myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);
   myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_SOLID);
index 0dee3f3..f4add42 100644 (file)
@@ -489,7 +489,7 @@ void AIS_Shape::UnsetColor()
         || IsTransparent()
         || myDrawer->ShadingAspect()->Aspect()->ToMapTexture())
   {
-    const Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NOM_BRASS);
+    const Graphic3d_MaterialAspect aDefaultMat (Graphic3d_NameOfMaterial_Brass);
     Graphic3d_MaterialAspect mat = aDefaultMat;
     Quantity_Color anInteriorColors[2] = {Quantity_NOC_CYAN1, Quantity_NOC_CYAN1};
     if (myDrawer->HasLink())
index bb95443..76a23a6 100644 (file)
@@ -200,7 +200,7 @@ void AIS_ViewCube::setDefaultAttributes()
   // this should be forced back-face culling regardless Closed flag
   myDrawer->TextAspect()->Aspect()->SetSuppressBackFaces (true);
 
-  Graphic3d_MaterialAspect aMat (Graphic3d_NOM_UserDefined);
+  Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_UserDefined);
   aMat.SetColor (Quantity_NOC_WHITE);
   aMat.SetAmbientColor (Quantity_NOC_GRAY60);
 
index 4667d19..f1b65ed 100644 (file)
@@ -451,7 +451,7 @@ public:
   //! Sets the material for the interactive object.
   virtual void UnsetMaterial() Standard_OVERRIDE
   {
-    Graphic3d_MaterialAspect aMat (Graphic3d_NOM_UserDefined);
+    Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_UserDefined);
     aMat.SetColor (Quantity_NOC_WHITE);
     aMat.SetAmbientColor (Quantity_NOC_GRAY60);
     myDrawer->ShadingAspect()->SetMaterial (aMat);
index 345d63a..2a4c899 100644 (file)
@@ -68,7 +68,7 @@ AIS_XRTrackedDevice::AIS_XRTrackedDevice (const Handle(Graphic3d_ArrayOfTriangle
   myToShowAxes (false)
 {
   myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
-  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_DEFAULT);
+  myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_DEFAULT);
   myDrawer->ShadingAspect()->SetColor (Quantity_NOC_WHITE);
   if (!theTexture.IsNull())
   {
index f248f4c..15911bb 100755 (executable)
@@ -27,7 +27,7 @@ namespace
 
   static Handle(Graphic3d_AspectFillArea3d) defaultAspect()
   {
-    Graphic3d_MaterialAspect aMaterial (Graphic3d_NOM_DEFAULT);
+    Graphic3d_MaterialAspect aMaterial (Graphic3d_NameOfMaterial_DEFAULT);
     Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d();
     anAspect->SetDistinguishOff();
     anAspect->SetFrontMaterial (aMaterial);
index cf692d1..5d168aa 100755 (executable)
@@ -53,7 +53,7 @@ public:
   //! - Equation (0.0, 0.0, 1.0, 0)
   //! - IsOn (True),
   //! - IsCapping (False),
-  //! - Material (Graphic3d_NOM_DEFAULT),
+  //! - Material (Graphic3d_NameOfMaterial_DEFAULT),
   //! - Texture (NULL),
   //! - HatchStyle (Aspect_HS_HORIZONTAL),
   //! - IsHatchOn (False)
index bc06a7c..7bb778b 100644 (file)
@@ -42,32 +42,32 @@ namespace
   //! Name list of standard materials (defined within enumeration).
   static const RawMaterial THE_MATERIALS[] =
   {
-    RawMaterial (Graphic3d_NOM_BRASS,       "Brass"),
-    RawMaterial (Graphic3d_NOM_BRONZE,      "Bronze"),
-    RawMaterial (Graphic3d_NOM_COPPER,      "Copper"),
-    RawMaterial (Graphic3d_NOM_GOLD,        "Gold"),
-    RawMaterial (Graphic3d_NOM_PEWTER,      "Pewter"),
-    RawMaterial (Graphic3d_NOM_PLASTER,     "Plastered"),
-    RawMaterial (Graphic3d_NOM_PLASTIC,     "Plastified"),
-    RawMaterial (Graphic3d_NOM_SILVER,      "Silver"),
-    RawMaterial (Graphic3d_NOM_STEEL,       "Steel"),
-    RawMaterial (Graphic3d_NOM_STONE,       "Stone"),
-    RawMaterial (Graphic3d_NOM_SHINY_PLASTIC, "Shiny_plastified"),
-    RawMaterial (Graphic3d_NOM_SATIN,       "Satined"),
-    RawMaterial (Graphic3d_NOM_METALIZED,   "Metalized"),
-    RawMaterial (Graphic3d_NOM_NEON_GNC,    "Ionized"),
-    RawMaterial (Graphic3d_NOM_CHROME,      "Chrome"),
-    RawMaterial (Graphic3d_NOM_ALUMINIUM,   "Aluminium"),
-    RawMaterial (Graphic3d_NOM_OBSIDIAN,    "Obsidian"),
-    RawMaterial (Graphic3d_NOM_NEON_PHC,    "Neon"),
-    RawMaterial (Graphic3d_NOM_JADE,        "Jade"),
-    RawMaterial (Graphic3d_NOM_CHARCOAL,    "Charcoal"),
-    RawMaterial (Graphic3d_NOM_WATER,       "Water"),
-    RawMaterial (Graphic3d_NOM_GLASS,       "Glass"),
-    RawMaterial (Graphic3d_NOM_DIAMOND,     "Diamond"),
-    RawMaterial (Graphic3d_NOM_TRANSPARENT, "Transparent"),
-    RawMaterial (Graphic3d_NOM_DEFAULT,     "Default"),
-    RawMaterial (Graphic3d_NOM_UserDefined, "UserDefined")
+    RawMaterial (Graphic3d_NameOfMaterial_Brass,       "Brass"),
+    RawMaterial (Graphic3d_NameOfMaterial_Bronze,      "Bronze"),
+    RawMaterial (Graphic3d_NameOfMaterial_Copper,      "Copper"),
+    RawMaterial (Graphic3d_NameOfMaterial_Gold,        "Gold"),
+    RawMaterial (Graphic3d_NameOfMaterial_Pewter,      "Pewter"),
+    RawMaterial (Graphic3d_NameOfMaterial_Plastered,   "Plastered"),
+    RawMaterial (Graphic3d_NameOfMaterial_Plastified,  "Plastified"),
+    RawMaterial (Graphic3d_NameOfMaterial_Silver,      "Silver"),
+    RawMaterial (Graphic3d_NameOfMaterial_Steel,       "Steel"),
+    RawMaterial (Graphic3d_NameOfMaterial_Stone,       "Stone"),
+    RawMaterial (Graphic3d_NameOfMaterial_ShinyPlastified, "Shiny_plastified"),
+    RawMaterial (Graphic3d_NameOfMaterial_Satin,       "Satined"),
+    RawMaterial (Graphic3d_NameOfMaterial_Metalized,   "Metalized"),
+    RawMaterial (Graphic3d_NameOfMaterial_Ionized,     "Ionized"),
+    RawMaterial (Graphic3d_NameOfMaterial_Chrome,      "Chrome"),
+    RawMaterial (Graphic3d_NameOfMaterial_Aluminum,    "Aluminium"),
+    RawMaterial (Graphic3d_NameOfMaterial_Obsidian,    "Obsidian"),
+    RawMaterial (Graphic3d_NameOfMaterial_Neon,        "Neon"),
+    RawMaterial (Graphic3d_NameOfMaterial_Jade,        "Jade"),
+    RawMaterial (Graphic3d_NameOfMaterial_Charcoal,    "Charcoal"),
+    RawMaterial (Graphic3d_NameOfMaterial_Water,       "Water"),
+    RawMaterial (Graphic3d_NameOfMaterial_Glass,       "Glass"),
+    RawMaterial (Graphic3d_NameOfMaterial_Diamond,     "Diamond"),
+    RawMaterial (Graphic3d_NameOfMaterial_Transparent, "Transparent"),
+    RawMaterial (Graphic3d_NameOfMaterial_DEFAULT,     "Default"),
+    RawMaterial (Graphic3d_NameOfMaterial_UserDefined, "UserDefined")
   };
 }
 
@@ -88,7 +88,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
 {
   switch (theName)
   {
-    case Graphic3d_NOM_PLASTIC:
+    case Graphic3d_NameOfMaterial_Plastified:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 0.0078125f;
@@ -102,7 +102,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Normalize();
 
       break;
-    case Graphic3d_NOM_SHINY_PLASTIC:
+    case Graphic3d_NameOfMaterial_ShinyPlastified:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 1.00f;
@@ -115,7 +115,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Ks = Graphic3d_Vec4 (0.145f, 0.145f, 0.145f, 0.17f);
       BSDF.Normalize();
       break;
-    case Graphic3d_NOM_SATIN:
+    case Graphic3d_NameOfMaterial_Satin:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 0.09375f;
@@ -128,7 +128,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Ks = Graphic3d_Vec4 (0.6f);
 
       break;
-    case Graphic3d_NOM_NEON_GNC:
+    case Graphic3d_NameOfMaterial_Ionized:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 0.05f;
@@ -142,7 +142,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Le = static_cast<Graphic3d_Vec3> (Colors[Graphic3d_TOR_DIFFUSE]);
       BSDF.FresnelBase = Graphic3d_Fresnel::CreateDielectric (1.5f);
       break;
-    case Graphic3d_NOM_METALIZED:
+    case Graphic3d_NameOfMaterial_Metalized:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 0.13f;
@@ -154,7 +154,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
                                              Graphic3d_Fresnel::CreateSchlick (Graphic3d_Vec3 (0.2f)), 0.045f);
       break;
-    case Graphic3d_NOM_BRASS:
+    case Graphic3d_NameOfMaterial_Brass:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -166,7 +166,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.992f, 0.941f, 0.808f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_BRONZE:
+    case Graphic3d_NameOfMaterial_Bronze:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -178,7 +178,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.590f, 0.408f, 0.250f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_COPPER:
+    case Graphic3d_NameOfMaterial_Copper:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -190,7 +190,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.950f, 0.640f, 0.540f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_GOLD:
+    case Graphic3d_NameOfMaterial_Gold:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -202,7 +202,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (1.000f, 0.710f, 0.290f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_PEWTER:
+    case Graphic3d_NameOfMaterial_Pewter:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -214,7 +214,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.333f, 0.333f, 0.522f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_PLASTER:
+    case Graphic3d_NameOfMaterial_Plastered:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Shininess = 0.01f;
@@ -226,7 +226,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Kd = Graphic3d_Vec3 (0.482353f, 0.482353f, 0.482353f);
 
       break;
-    case Graphic3d_NOM_SILVER:
+    case Graphic3d_NameOfMaterial_Silver:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -238,7 +238,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.950f, 0.930f, 0.880f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_STEEL:
+    case Graphic3d_NameOfMaterial_Steel:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -250,7 +250,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.560f, 0.570f, 0.580f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_STONE:
+    case Graphic3d_NameOfMaterial_Stone:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       // special case for SetColor()
@@ -267,7 +267,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Ks = Graphic3d_Vec4 (0.00392157f, 0.00392157f, 0.00392157f, 0.5f);
 
       break;
-    case Graphic3d_NOM_CHROME:
+    case Graphic3d_NameOfMaterial_Chrome:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -279,7 +279,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.975f, 0.975f, 0.975f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_ALUMINIUM:
+    case Graphic3d_NameOfMaterial_Aluminum:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       BSDF = Graphic3d_BSDF::CreateMetallic (Graphic3d_Vec3 (0.985f, 0.985f, 0.985f),
@@ -291,7 +291,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.910f, 0.920f, 0.920f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_NEON_PHC:
+    case Graphic3d_NameOfMaterial_Neon:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       Shininess = 0.05f;
@@ -305,7 +305,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Le = Graphic3d_Vec3 (0.0f, 1.0f, 0.46f);
       BSDF.FresnelBase = Graphic3d_Fresnel::CreateDielectric (1.5f);
       break;
-    case Graphic3d_NOM_OBSIDIAN:
+    case Graphic3d_NameOfMaterial_Obsidian:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       Shininess = 0.3f;
@@ -317,7 +317,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Kd = Graphic3d_Vec3 (0.023f, 0.f, 0.023f);
       BSDF.Ks = Graphic3d_Vec4 (0.0156863f, 0.0156863f, 0.0156863f, 0.1f);
       break;
-    case Graphic3d_NOM_JADE:
+    case Graphic3d_NameOfMaterial_Jade:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       Shininess = 0.10f;
@@ -330,7 +330,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Kd = Graphic3d_Vec3 (0.208658f, 0.415686f, 0.218401f);
       BSDF.Ks = Graphic3d_Vec4 (0.611765f, 0.611765f, 0.611765f, 0.06f);
       break;
-    case Graphic3d_NOM_CHARCOAL:
+    case Graphic3d_NameOfMaterial_Charcoal:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       Shininess = 0.01f;
@@ -342,7 +342,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       BSDF.Kd = Graphic3d_Vec3 (0.02f, 0.02f, 0.02f);
       BSDF.Ks = Graphic3d_Vec4 (0.1f, 0.1f, 0.1f, 0.3f);
       break;
-    case Graphic3d_NOM_WATER:
+    case Graphic3d_NameOfMaterial_Water:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       RefractionIndex  = 1.33f;
@@ -358,7 +358,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.380f, 0.380f, 0.380f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_GLASS:
+    case Graphic3d_NameOfMaterial_Glass:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       RefractionIndex  = 1.62f;
@@ -374,7 +374,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.920f, 0.920f, 0.920f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_DIAMOND:
+    case Graphic3d_NameOfMaterial_Diamond:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       RefractionIndex  = 2.42f;
@@ -391,7 +391,7 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
 
-    case Graphic3d_NOM_TRANSPARENT:
+    case Graphic3d_NameOfMaterial_Transparent:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
 
       RefractionIndex = 1.0f;
@@ -407,14 +407,14 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.970f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_UserDefined:
+    case Graphic3d_NameOfMaterial_UserDefined:
       MaterialType = Graphic3d_MATERIAL_PHYSIC;
       Colors[Graphic3d_TOR_AMBIENT]  = Quantity_Color (Graphic3d_Vec3 (0.1f));
       Colors[Graphic3d_TOR_DIFFUSE]  = Quantity_Color (Graphic3d_Vec3 (0.6f));
       Colors[Graphic3d_TOR_SPECULAR] = Quantity_Color (Graphic3d_Vec3 (0.2f));
       Colors[Graphic3d_TOR_EMISSION] = Quantity_Color (Graphic3d_Vec3 (0.0f));
       break;
-    case Graphic3d_NOM_DEFAULT:
+    case Graphic3d_NameOfMaterial_DEFAULT:
       MaterialType = Graphic3d_MATERIAL_ASPECT;
 
       Colors[Graphic3d_TOR_AMBIENT]  = Quantity_Color (Graphic3d_Vec3 (0.15f));
@@ -431,9 +431,9 @@ RawMaterial::RawMaterial (Graphic3d_NameOfMaterial theName, const char* theStrin
 // purpose  :
 // =======================================================================
 Graphic3d_MaterialAspect::Graphic3d_MaterialAspect()
-: myRequestedMaterialName (Graphic3d_NOM_DEFAULT)
+: myRequestedMaterialName (Graphic3d_NameOfMaterial_DEFAULT)
 {
-  init (Graphic3d_NOM_DEFAULT);
+  init (Graphic3d_NameOfMaterial_DEFAULT);
 }
 
 // =======================================================================
@@ -511,7 +511,7 @@ void Graphic3d_MaterialAspect::SetColor (const Quantity_Color& theColor)
   const RawMaterial& aSrcMat = THE_MATERIALS[myRequestedMaterialName];
   const Quantity_Color anAmbient((Graphic3d_Vec3 )theColor * aSrcMat.AmbientCoef);
   const Quantity_Color aDiffuse ((Graphic3d_Vec3 )theColor * aSrcMat.DiffuseCoef);
-  if (myMaterialName != Graphic3d_NOM_UserDefined
+  if (myMaterialName != Graphic3d_NameOfMaterial_UserDefined
    && (!myColors[Graphic3d_TOR_AMBIENT].IsEqual (anAmbient)
     || !myColors[Graphic3d_TOR_DIFFUSE].IsEqual (aDiffuse)))
   {
@@ -528,7 +528,7 @@ void Graphic3d_MaterialAspect::SetColor (const Quantity_Color& theColor)
 void Graphic3d_MaterialAspect::SetAmbientColor (const Quantity_Color& theColor)
 {
   if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
-  &&  myMaterialName != Graphic3d_NOM_UserDefined
+  &&  myMaterialName != Graphic3d_NameOfMaterial_UserDefined
   && !myColors[Graphic3d_TOR_AMBIENT].IsEqual (theColor))
   {
     setUserMaterial();
@@ -543,7 +543,7 @@ void Graphic3d_MaterialAspect::SetAmbientColor (const Quantity_Color& theColor)
 void Graphic3d_MaterialAspect::SetDiffuseColor (const Quantity_Color& theColor)
 {
   if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
-  &&  myMaterialName != Graphic3d_NOM_UserDefined
+  &&  myMaterialName != Graphic3d_NameOfMaterial_UserDefined
   && !myColors[Graphic3d_TOR_DIFFUSE].IsEqual (theColor))
   {
     setUserMaterial();
@@ -558,7 +558,7 @@ void Graphic3d_MaterialAspect::SetDiffuseColor (const Quantity_Color& theColor)
 void Graphic3d_MaterialAspect::SetSpecularColor (const Quantity_Color& theColor)
 {
   if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
-  &&  myMaterialName != Graphic3d_NOM_UserDefined
+  &&  myMaterialName != Graphic3d_NameOfMaterial_UserDefined
   && !myColors[Graphic3d_TOR_SPECULAR].IsEqual (theColor))
   {
     setUserMaterial();
@@ -573,7 +573,7 @@ void Graphic3d_MaterialAspect::SetSpecularColor (const Quantity_Color& theColor)
 void Graphic3d_MaterialAspect::SetEmissiveColor (const Quantity_Color& theColor)
 {
   if (myMaterialType == Graphic3d_MATERIAL_PHYSIC
-  &&  myMaterialName != Graphic3d_NOM_UserDefined
+  &&  myMaterialName != Graphic3d_NameOfMaterial_UserDefined
   && !myColors[Graphic3d_TOR_EMISSION].IsEqual (theColor))
   {
     setUserMaterial();
@@ -668,32 +668,32 @@ Standard_Boolean Graphic3d_MaterialAspect::MaterialFromName (const Standard_CStr
   // parse aliases
   if (aName == "Plastic")            // Plastified
   {
-    theMat = Graphic3d_NOM_PLASTIC;
+    theMat = Graphic3d_NameOfMaterial_Plastified;
     return Standard_True;
   }
   else if (aName == "Shiny_plastic") // Shiny_plastified
   {
-    theMat = Graphic3d_NOM_SHINY_PLASTIC;
+    theMat = Graphic3d_NameOfMaterial_ShinyPlastified;
     return Standard_True;
   }
   else if (aName == "Plaster")       // Plastered
   {
-    theMat = Graphic3d_NOM_PLASTER;
+    theMat = Graphic3d_NameOfMaterial_Plastered;
     return Standard_True;
   }
   else if (aName == "Satin")         // Satined
   {
-    theMat = Graphic3d_NOM_SATIN;
+    theMat = Graphic3d_NameOfMaterial_Satin;
     return Standard_True;
   }
   else if (aName == "Neon_gnc")      // Ionized
   {
-    theMat = Graphic3d_NOM_NEON_GNC;
+    theMat = Graphic3d_NameOfMaterial_Ionized;
     return Standard_True;
   }
   else if (aName == "Neon_phc") // Neon
   {
-    theMat = Graphic3d_NOM_NEON_PHC;
+    theMat = Graphic3d_NameOfMaterial_Neon;
     return Standard_True;
   }
   return Standard_False;
index ceab484..e67601d 100644 (file)
@@ -35,7 +35,7 @@ public:
   DEFINE_STANDARD_ALLOC
 
   //! Returns the number of predefined textures.
-  static Standard_Integer NumberOfMaterials() { return Graphic3d_NOM_DEFAULT; }
+  static Standard_Integer NumberOfMaterials() { return Graphic3d_NameOfMaterial_DEFAULT; }
 
   //! Returns the name of the predefined material of specified rank within range [1, NumberOfMaterials()].
   Standard_EXPORT static Standard_CString MaterialName (const Standard_Integer theRank);
@@ -50,10 +50,10 @@ public:
   Standard_EXPORT static Standard_Boolean MaterialFromName (const Standard_CString theName,
                                                             Graphic3d_NameOfMaterial& theMat);
 
-  //! Returns the material for specified name or Graphic3d_NOM_DEFAULT if name is unknown.
+  //! Returns the material for specified name or Graphic3d_NameOfMaterial_DEFAULT if name is unknown.
   static Graphic3d_NameOfMaterial MaterialFromName (const Standard_CString theName)
   {
-    Graphic3d_NameOfMaterial aMat = Graphic3d_NOM_DEFAULT;
+    Graphic3d_NameOfMaterial aMat = Graphic3d_NameOfMaterial_DEFAULT;
     MaterialFromName (theName, aMat);
     return aMat;
   }
@@ -87,7 +87,7 @@ public:
   {
     // if a component of a "standard" material change, the
     // result is no more standard (a blue gold is not a gold)
-    myMaterialName = Graphic3d_NOM_UserDefined;
+    myMaterialName = Graphic3d_NameOfMaterial_UserDefined;
     myStringName   = theName;
   }
 
@@ -248,9 +248,9 @@ private:
   {
     // if a component of a "standard" material change, the
     // result is no more standard (a blue gold is not a gold)
-    if (myMaterialName != Graphic3d_NOM_UserDefined)
+    if (myMaterialName != Graphic3d_NameOfMaterial_UserDefined)
     {
-      myMaterialName = Graphic3d_NOM_UserDefined;
+      myMaterialName = Graphic3d_NameOfMaterial_UserDefined;
       myStringName   = "UserDefined";
     }
   }
index 1fe5e74..2d02a6d 100644 (file)
 #ifndef _Graphic3d_NameOfMaterial_HeaderFile
 #define _Graphic3d_NameOfMaterial_HeaderFile
 
-//! Types of aspect materials.
+//! List of named materials (predefined presets).
+//! Each preset defines either physical (having natural color) or generic (mutable color) material (@sa Graphic3d_TypeOfMaterial).
 enum Graphic3d_NameOfMaterial
 {
-Graphic3d_NOM_BRASS,
-Graphic3d_NOM_BRONZE,
-Graphic3d_NOM_COPPER,
-Graphic3d_NOM_GOLD,
-Graphic3d_NOM_PEWTER,
-Graphic3d_NOM_PLASTER,
-Graphic3d_NOM_PLASTIC,
-Graphic3d_NOM_SILVER,
-Graphic3d_NOM_STEEL,
-Graphic3d_NOM_STONE,
-Graphic3d_NOM_SHINY_PLASTIC,
-Graphic3d_NOM_SATIN,
-Graphic3d_NOM_METALIZED,
-Graphic3d_NOM_NEON_GNC,
-Graphic3d_NOM_CHROME,
-Graphic3d_NOM_ALUMINIUM,
-Graphic3d_NOM_OBSIDIAN,
-Graphic3d_NOM_NEON_PHC,
-Graphic3d_NOM_JADE,
-Graphic3d_NOM_CHARCOAL,
-Graphic3d_NOM_WATER,
-Graphic3d_NOM_GLASS,
-Graphic3d_NOM_DIAMOND,
-Graphic3d_NOM_TRANSPARENT,
-Graphic3d_NOM_DEFAULT,
-Graphic3d_NOM_UserDefined
+  Graphic3d_NameOfMaterial_Brass,           //!< Brass        (Physic)
+  Graphic3d_NameOfMaterial_Bronze,          //!< Bronze       (Physic)
+  Graphic3d_NameOfMaterial_Copper,          //!< Copper       (Physic)
+  Graphic3d_NameOfMaterial_Gold,            //!< Gold         (Physic)
+  Graphic3d_NameOfMaterial_Pewter,          //!< Pewter       (Physic)
+  Graphic3d_NameOfMaterial_Plastered,       //!< Plastered    (Generic)
+  Graphic3d_NameOfMaterial_Plastified,      //!< Plastified   (Generic)
+  Graphic3d_NameOfMaterial_Silver,          //!< Silver       (Physic)
+  Graphic3d_NameOfMaterial_Steel,           //!< Steel        (Physic)
+  Graphic3d_NameOfMaterial_Stone,           //!< Stone        (Physic)
+  Graphic3d_NameOfMaterial_ShinyPlastified, //!< Shiny Plastified (Generic)
+  Graphic3d_NameOfMaterial_Satin,           //!< Satin        (Generic)
+  Graphic3d_NameOfMaterial_Metalized,       //!< Metalized    (Generic)
+  Graphic3d_NameOfMaterial_Ionized,         //!< Ionized      (Generic)
+  Graphic3d_NameOfMaterial_Chrome,          //!< Chrome       (Physic)
+  Graphic3d_NameOfMaterial_Aluminum,        //!< Aluminum     (Physic)
+  Graphic3d_NameOfMaterial_Obsidian,        //!< Obsidian     (Physic)
+  Graphic3d_NameOfMaterial_Neon,            //!< Neon         (Physic)
+  Graphic3d_NameOfMaterial_Jade,            //!< Jade         (Physic)
+  Graphic3d_NameOfMaterial_Charcoal,        //!< Charcoal     (Physic)
+  Graphic3d_NameOfMaterial_Water,           //!< Water        (Physic)
+  Graphic3d_NameOfMaterial_Glass,           //!< Glass        (Physic)
+  Graphic3d_NameOfMaterial_Diamond,         //!< Diamond      (Physic)
+  Graphic3d_NameOfMaterial_Transparent,     //!< Transparent  (Physic)
+  Graphic3d_NameOfMaterial_DEFAULT,         //!< Default      (Generic);
+                                            //!  normally used as out-of-range value pointing to some application default
+  Graphic3d_NameOfMaterial_UserDefined,     //!< User-defined (Physic);
+                                            //!  used for any material with non-standard definition
+
+  // old aliases
+  Graphic3d_NOM_BRASS         = Graphic3d_NameOfMaterial_Brass,
+  Graphic3d_NOM_BRONZE        = Graphic3d_NameOfMaterial_Bronze,
+  Graphic3d_NOM_COPPER        = Graphic3d_NameOfMaterial_Copper,
+  Graphic3d_NOM_GOLD          = Graphic3d_NameOfMaterial_Gold,
+  Graphic3d_NOM_PEWTER        = Graphic3d_NameOfMaterial_Pewter,
+  Graphic3d_NOM_PLASTER       = Graphic3d_NameOfMaterial_Plastered,
+  Graphic3d_NOM_PLASTIC       = Graphic3d_NameOfMaterial_Plastified,
+  Graphic3d_NOM_SILVER        = Graphic3d_NameOfMaterial_Silver,
+  Graphic3d_NOM_STEEL         = Graphic3d_NameOfMaterial_Steel,
+  Graphic3d_NOM_STONE         = Graphic3d_NameOfMaterial_Stone,
+  Graphic3d_NOM_SHINY_PLASTIC = Graphic3d_NameOfMaterial_ShinyPlastified,
+  Graphic3d_NOM_SATIN         = Graphic3d_NameOfMaterial_Satin,
+  Graphic3d_NOM_METALIZED     = Graphic3d_NameOfMaterial_Metalized,
+  Graphic3d_NOM_NEON_GNC      = Graphic3d_NameOfMaterial_Ionized,
+  Graphic3d_NOM_CHROME        = Graphic3d_NameOfMaterial_Chrome,
+  Graphic3d_NOM_ALUMINIUM     = Graphic3d_NameOfMaterial_Aluminum,
+  Graphic3d_NOM_OBSIDIAN      = Graphic3d_NameOfMaterial_Obsidian,
+  Graphic3d_NOM_NEON_PHC      = Graphic3d_NameOfMaterial_Neon,
+  Graphic3d_NOM_JADE          = Graphic3d_NameOfMaterial_Jade,
+  Graphic3d_NOM_CHARCOAL      = Graphic3d_NameOfMaterial_Charcoal,
+  Graphic3d_NOM_WATER         = Graphic3d_NameOfMaterial_Water,
+  Graphic3d_NOM_GLASS         = Graphic3d_NameOfMaterial_Glass,
+  Graphic3d_NOM_DIAMOND       = Graphic3d_NameOfMaterial_Diamond,
+  Graphic3d_NOM_TRANSPARENT   = Graphic3d_NameOfMaterial_Transparent,
+  Graphic3d_NOM_DEFAULT       = Graphic3d_NameOfMaterial_DEFAULT,
+  Graphic3d_NOM_UserDefined   = Graphic3d_NameOfMaterial_UserDefined
 };
 
 #endif // _Graphic3d_NameOfMaterial_HeaderFile
index 5e622d8..2674196 100644 (file)
@@ -215,7 +215,7 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)&
             PolygonVerticesFor3D, PolygonBoundsFor3D );
   }
 
-  Graphic3d_MaterialAspect aMaterial[2] = { Graphic3d_NOM_PLASTIC, Graphic3d_NOM_PLASTIC };
+  Graphic3d_MaterialAspect aMaterial[2] = { Graphic3d_NameOfMaterial_Plastified, Graphic3d_NameOfMaterial_Plastified };
   for (Standard_Integer i = 0; i < 2; i++)
   {
     // OCC20644 "plastic" is most suitable here, as it is "non-physic"
@@ -478,7 +478,7 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)&
       CustomBuild(Prs, aCustomElements, IDsToExclude, DisplayMode);
   }
 
-  Graphic3d_MaterialAspect aMaterial2[2] = { Graphic3d_NOM_PLASTIC, Graphic3d_NOM_PLASTIC };
+  Graphic3d_MaterialAspect aMaterial2[2] = { Graphic3d_NameOfMaterial_Plastified, Graphic3d_NameOfMaterial_Plastified };
   for (Standard_Integer i = 0; i < 2; i++)
   {
     // OCC20644 "plastic" is most suitable here, as it is "non-physic"
index 5fff715..e2161a2 100644 (file)
@@ -82,7 +82,7 @@ MeshVS_Mesh::MeshVS_Mesh (const Standard_Boolean theIsAllowOverlapped )
   SetHilightMode( MeshVS_DMF_WireFrame ); // Wireframe as default hilight mode
 
   SetColor ( Quantity_NOC_WHITE );
-  SetMaterial ( Graphic3d_NOM_PLASTIC );
+  SetMaterial (Graphic3d_NameOfMaterial_Plastified);
 
   myCurrentDrawer = new MeshVS_Drawer();
   myCurrentDrawer->SetColor   ( MeshVS_DA_InteriorColor, Quantity_NOC_BLUE4 );
@@ -123,8 +123,8 @@ MeshVS_Mesh::MeshVS_Mesh (const Standard_Boolean theIsAllowOverlapped )
   myHilightDrawer->SetColor    ( MeshVS_DA_EdgeColor, Quantity_NOC_GREEN );
   myHilightDrawer->SetInteger  ( MeshVS_DA_EdgeType, Aspect_TOL_SOLID );
   myHilightDrawer->SetDouble   ( MeshVS_DA_EdgeWidth, 1.0 );
-  myHilightDrawer->SetMaterial ( MeshVS_DA_FrontMaterial, Graphic3d_NOM_PLASTIC );
-  myHilightDrawer->SetMaterial ( MeshVS_DA_BackMaterial, Graphic3d_NOM_PLASTIC );
+  myHilightDrawer->SetMaterial ( MeshVS_DA_FrontMaterial, Graphic3d_NameOfMaterial_Plastified );
+  myHilightDrawer->SetMaterial ( MeshVS_DA_BackMaterial,  Graphic3d_NameOfMaterial_Plastified );
 
   myHilightDrawer->SetColor   ( MeshVS_DA_BeamColor, Quantity_NOC_GRAY80 );
   myHilightDrawer->SetInteger ( MeshVS_DA_BeamType,  Aspect_TOL_SOLID );
index f20aa48..692457c 100644 (file)
@@ -189,7 +189,7 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
 
   // Draw faces with nodal color
   // OCC20644 Use "plastic" material as it is "non-physic" and so it is easier to get the required colors
-  Graphic3d_MaterialAspect aMaterial[2] = { Graphic3d_NOM_PLASTIC, Graphic3d_NOM_PLASTIC };
+  Graphic3d_MaterialAspect aMaterial[2] = { Graphic3d_NameOfMaterial_Plastified, Graphic3d_NameOfMaterial_Plastified };
   for (Standard_Integer i = 0; i < 2; ++i)
   {
     aMaterial[i].SetSpecularColor (Quantity_NOC_BLACK);
index 3f78ac0..a528a91 100644 (file)
@@ -96,10 +96,10 @@ Handle( Graphic3d_AspectFillArea3d ) MeshVS_Tool::CreateAspectFillArea3d
 (  const Handle(MeshVS_Drawer)& theDr,
    const Standard_Boolean UseDefaults )
 {
-  Graphic3d_MaterialAspect aFrMat   = Graphic3d_NOM_BRASS;
-  Graphic3d_MaterialAspect aBackMat = Graphic3d_NOM_BRASS;
-  Standard_Integer aFrMatI = (Standard_Integer)Graphic3d_NOM_BRASS;
-  Standard_Integer aBackMatI = (Standard_Integer)Graphic3d_NOM_BRASS;
+  Graphic3d_MaterialAspect aFrMat   = Graphic3d_NameOfMaterial_Brass;
+  Graphic3d_MaterialAspect aBackMat = Graphic3d_NameOfMaterial_Brass;
+  Standard_Integer aFrMatI   = (Standard_Integer)Graphic3d_NameOfMaterial_Brass;
+  Standard_Integer aBackMatI = (Standard_Integer)Graphic3d_NameOfMaterial_Brass;
 
   if ( !theDr->GetInteger ( MeshVS_DA_FrontMaterial, aFrMatI ) && !UseDefaults )
     return 0;
index 743b866..3fd946d 100644 (file)
@@ -402,7 +402,7 @@ public:
   //! Returns settings for shading aspects.
   //! These settings can be edited. The default values are:
   //! -   Color: Quantity_NOC_YELLOW
-  //! -   Material: Graphic3d_NOM_BRASS
+  //! -   Material: Graphic3d_NameOfMaterial_Brass
   //! Shading aspect is obtained through decomposition of
   //! 3d faces into triangles, each side of each triangle
   //! being a chord of the corresponding curved edge in the face.
index d139c24..303b2dc 100644 (file)
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_ShadingAspect, Prs3d_BasicAspect)
 //=======================================================================
 Prs3d_ShadingAspect::Prs3d_ShadingAspect()
 {
-  const Graphic3d_MaterialAspect aMat (Graphic3d_NOM_BRASS);
+  const Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_Brass);
   const Quantity_Color aColor = aMat.AmbientColor();
   myAspect = new Graphic3d_AspectFillArea3d (Aspect_IS_SOLID,
                                             aColor,
index 42ea09f..9ccb139 100644 (file)
@@ -509,7 +509,7 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati
         myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
       }
 
-      Graphic3d_MaterialAspect aShadeMat (Graphic3d_NOM_DEFAULT);
+      Graphic3d_MaterialAspect aShadeMat (Graphic3d_NameOfMaterial_DEFAULT);
       aShadeMat.SetAmbientColor (Quantity_NOC_BLACK);
       aShadeMat.SetDiffuseColor (Quantity_NOC_BLACK);
       aShadeMat.SetSpecularColor(Quantity_NOC_BLACK);
index 2a62d97..ce18b49 100644 (file)
@@ -124,7 +124,7 @@ static Standard_Integer  OCC128 (Draw_Interpretor& di, Standard_Integer /*argc*/
   TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(50,50,50).Shape();
   Handle(AIS_Shape) AS = new AIS_Shape(shape1);
   AS->SetDisplayMode(1);
-  Graphic3d_MaterialAspect mat(Graphic3d_NOM_PLASTIC);
+  Graphic3d_MaterialAspect mat (Graphic3d_NameOfMaterial_Plastified);
   AS->SetMaterial(mat);
   AS->SetColor(Quantity_NOC_RED);
   myAISContext->Display (AS, Standard_False);
index 6572945..d6ab2d7 100644 (file)
@@ -1159,7 +1159,7 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc,
 
   Handle(AIS_Shape) ais = new AIS_Shape(sh); 
   AISContext->Display (ais, 1, 0, Standard_False);
-  AISContext->SetMaterial (ais, Graphic3d_NOM_SHINY_PLASTIC, Standard_False);
+  AISContext->SetMaterial (ais, Graphic3d_NameOfMaterial_ShinyPlastified, Standard_False);
 
   Quantity_Color colf(0.0, 0.4, 0.0, Quantity_TOC_sRGB);
   Quantity_Color colb(0.0, 0.0, 0.6, Quantity_TOC_sRGB);
index 4af0543..e9f7f30 100644 (file)
@@ -310,7 +310,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
   TopoDS_Face F1= bzf1.Face();
   ais1 = new AIS_Shape(F1);
   DBRep::Set("F1",F1);
-  aContext->SetMaterial(ais1,Graphic3d_NOM_ALUMINIUM,Standard_False);
+  aContext->SetMaterial (ais1, Graphic3d_NameOfMaterial_Aluminum, Standard_False);
   aContext->Display (ais1, Standard_False);
   BRep_Builder B;
   TopoDS_Shell shell;
@@ -347,7 +347,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
   mkw.Add(*E6); 
   FP = BRepBuilderAPI_MakeFace(mkw.Wire()); 
   ais2 = new AIS_Shape( FP ); 
-  aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False); 
+  aContext->SetMaterial (ais2, Graphic3d_NameOfMaterial_Aluminum, Standard_False);
   aContext->Display (ais2, Standard_False);
 
   DBRep::Set("FP",FP);
@@ -378,7 +378,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
   fillet.Build(); 
   FP1 = fillet.Shape(); 
   ais2 = new AIS_Shape( FP1 ); 
-  aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False); 
+  aContext->SetMaterial (ais2, Graphic3d_NameOfMaterial_Aluminum, Standard_False);
   aContext->Display (ais2, Standard_False);
 
   DBRep::Set("FP1",FP1);
index 894299b..2fef459 100755 (executable)
@@ -66,7 +66,7 @@ void V3d_Plane::Display (const Handle(V3d_View)& theView,
   myGraphicStructure = new Graphic3d_Structure (aViewer->StructureManager());
   Handle(Graphic3d_Group)            aGroup = myGraphicStructure->NewGroup();
   Handle(Graphic3d_AspectFillArea3d) anAsp  = new Graphic3d_AspectFillArea3d();
-  Graphic3d_MaterialAspect aPlastic (Graphic3d_NOM_PLASTIC);
+  Graphic3d_MaterialAspect aPlastic (Graphic3d_NameOfMaterial_Plastified);
   aPlastic.SetColor (theColor);
   aPlastic.SetTransparency (0.5);
   anAsp->SetFrontMaterial (aPlastic);
index dc613f9..e2faedd 100644 (file)
@@ -82,7 +82,7 @@ extern int ViewerMainLoop(Standard_Integer argc, const char** argv);
 
 #define DEFAULT_COLOR              Quantity_NOC_GOLDENROD
 #define DEFAULT_FREEBOUNDARY_COLOR Quantity_NOC_GREEN
-#define DEFAULT_MATERIAL           Graphic3d_NOM_BRASS
+#define DEFAULT_MATERIAL           Graphic3d_NameOfMaterial_Brass
 
 //=======================================================================
 // function : GetColorFromName
@@ -1769,7 +1769,7 @@ struct ViewerTest_AspectsChangeSet
     AlphaMode         (Graphic3d_AlphaMode_BlendAuto),
     AlphaCutoff       (0.5f),
     ToSetMaterial     (0),
-    Material          (Graphic3d_NOM_DEFAULT),
+    Material          (Graphic3d_NameOfMaterial_DEFAULT),
     ToSetShowFreeBoundary      (0),
     ToSetFreeBoundaryWidth     (0),
     FreeBoundaryWidth          (1.0),
@@ -2807,7 +2807,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
           || anArg == "-unsetmaterial")
     {
       aChangeSet->ToSetMaterial = -1;
-      aChangeSet->Material = Graphic3d_NOM_DEFAULT;
+      aChangeSet->Material = Graphic3d_NameOfMaterial_DEFAULT;
     }
     else if (anArg == "-subshape"
           || anArg == "-subshapes")
@@ -3187,7 +3187,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI,
       //aChangeSet->ToSetBackFaceColor = -1; // should be reset by ToSetColor
       //aChangeSet->BackFaceColor = DEFAULT_COLOR;
       aChangeSet->ToSetMaterial = -1;
-      aChangeSet->Material = Graphic3d_NOM_DEFAULT;
+      aChangeSet->Material = Graphic3d_NameOfMaterial_DEFAULT;
       aChangeSet->ToSetShowFreeBoundary = -1;
       aChangeSet->ToSetFreeBoundaryColor = -1;
       aChangeSet->FreeBoundaryColor = DEFAULT_FREEBOUNDARY_COLOR;
index c320a14..318c5ab 100644 (file)
@@ -3053,7 +3053,7 @@ static int VDrawSphere (Draw_Interpretor& /*di*/, Standard_Integer argc, const c
   }
 
   // Setting material properties, very important for desirable visual result!
-  Graphic3d_MaterialAspect aMat (Graphic3d_NOM_PLASTIC);
+  Graphic3d_MaterialAspect aMat (Graphic3d_NameOfMaterial_Plastified);
   aMat.SetAmbientColor (Quantity_Color (Graphic3d_Vec3 (0.04f)));
   aMat.SetSpecularColor(Quantity_Color (Graphic3d_Vec3 (0.50f)));
   Handle(Graphic3d_AspectFillArea3d) anAspect
index 626bf7c..66c8dfb 100644 (file)
@@ -923,13 +923,13 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI,
     TCollection_AsciiString anArg (theArgVec[anArgIter]);
     anArg.LowerCase();
     Graphic3d_NameOfMaterial aMat = Graphic3d_MaterialAspect::MaterialFromName (theArgVec[anArgIter]);
-    if (aMat != Graphic3d_NOM_DEFAULT)
+    if (aMat != Graphic3d_NameOfMaterial_DEFAULT)
     {
       aMatList.Append (aMat);
     }
     else if (anArg == "*")
     {
-      for (Standard_Integer aMatIter = 0; aMatIter < (Standard_Integer )Graphic3d_NOM_DEFAULT; ++aMatIter)
+      for (Standard_Integer aMatIter = 0; aMatIter < (Standard_Integer )Graphic3d_NameOfMaterial_DEFAULT; ++aMatIter)
       {
         aMatList.Append ((Graphic3d_NameOfMaterial )aMatIter);
       }
@@ -959,7 +959,7 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI,
       return 0;
     }
 
-    for (Standard_Integer aMatIter = 0; aMatIter < (Standard_Integer )Graphic3d_NOM_DEFAULT; ++aMatIter)
+    for (Standard_Integer aMatIter = 0; aMatIter < (Standard_Integer )Graphic3d_NameOfMaterial_DEFAULT; ++aMatIter)
     {
       aMatList.Append ((Graphic3d_NameOfMaterial )aMatIter);
     }
index 5cb578d..ffac6b8 100644 (file)
@@ -13453,7 +13453,7 @@ static int VSelectionProperties (Draw_Interpretor& theDi,
 
       const Handle(Prs3d_Drawer)& aStyle = aCtx->HighlightStyle (aType);
       Graphic3d_NameOfMaterial aMatName = Graphic3d_MaterialAspect::MaterialFromName (theArgVec[anArgIter + 1]);
-      if (aMatName != Graphic3d_NOM_DEFAULT)
+      if (aMatName != Graphic3d_NameOfMaterial_DEFAULT)
       {
         ++anArgIter;
         Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d();
index d31890a..f3bfac9 100644 (file)
@@ -200,7 +200,7 @@ void XCAFDoc_VisMaterial::FillMaterialAspect (Graphic3d_MaterialAspect& theAspec
 {
   if (myCommonMat.IsDefined)
   {
-    theAspect = Graphic3d_MaterialAspect (Graphic3d_NOM_UserDefined);
+    theAspect = Graphic3d_MaterialAspect (Graphic3d_NameOfMaterial_UserDefined);
     theAspect.SetAmbientColor (myCommonMat.AmbientColor);
     theAspect.SetDiffuseColor (myCommonMat.DiffuseColor);
     theAspect.SetSpecularColor(myCommonMat.SpecularColor);
@@ -225,7 +225,7 @@ void XCAFDoc_VisMaterial::FillMaterialAspect (Graphic3d_MaterialAspect& theAspec
     if (!myCommonMat.IsDefined)
     {
       // convert metal-roughness into common
-      theAspect = Graphic3d_MaterialAspect (Graphic3d_NOM_UserDefined);
+      theAspect = Graphic3d_MaterialAspect (Graphic3d_NameOfMaterial_UserDefined);
       theAspect.SetDiffuseColor (myPbrMat.BaseColor.GetRGB());
       theAspect.SetAlpha        (myPbrMat.BaseColor.Alpha());
       theAspect.SetSpecularColor(Quantity_Color (Graphic3d_Vec3 (myPbrMat.Metallic)));
index 4d0ad72..64b507a 100644 (file)
@@ -50,7 +50,7 @@ XCAFPrs_AISObject::XCAFPrs_AISObject (const TDF_Label& theLabel)
   myToSyncStyles (Standard_True)
 {
   // define plastic material by default for proper color reproduction
-  setMaterial (myDrawer, Graphic3d_NOM_PLASTIC, Standard_False, Standard_False);
+  setMaterial (myDrawer, Graphic3d_NameOfMaterial_Plastified, Standard_False, Standard_False);
   hasOwnMaterial = Standard_True;
 
   myLabel = theLabel;
index ba4365b..617c368 100644 (file)
@@ -508,7 +508,7 @@ static Standard_Integer setPrs (Draw_Interpretor& di, Standard_Integer argc, con
     Handle(TPrsStd_AISPresentation) prs;
     if ( ! seq.Value(i).FindAttribute ( TPrsStd_AISPresentation::GetID(), prs ) ) {
       prs = TPrsStd_AISPresentation::Set(seq.Value(i),XCAFPrs_Driver::GetID());
-      prs->SetMaterial ( Graphic3d_NOM_PLASTIC );
+      prs->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
     }
 //    Quantity_Color Col;
 //    if ( colors.GetColor ( seq.Value(i), XCAFDoc_ColorSurf, Col ) )
@@ -573,7 +573,7 @@ static Standard_Integer show (Draw_Interpretor& di, Standard_Integer argc, const
     Handle(TPrsStd_AISPresentation) prs;
     if ( ! seq.Value(i).FindAttribute ( TPrsStd_AISPresentation::GetID(), prs ) ) {
       prs = TPrsStd_AISPresentation::Set(seq.Value(i),XCAFPrs_Driver::GetID());
-      prs->SetMaterial ( Graphic3d_NOM_PLASTIC );
+      prs->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
     }
 //    Quantity_Color Col;
 //    if ( colors.GetColor ( seq.Value(i), XCAFDoc_ColorSurf, Col ) )
@@ -1218,7 +1218,7 @@ static Standard_Integer XSetTransparency (Draw_Interpretor& di, Standard_Integer
     Handle(TPrsStd_AISPresentation) prs;
     if ( ! seq.Value(i).FindAttribute ( TPrsStd_AISPresentation::GetID(), prs ) ) {
       prs = TPrsStd_AISPresentation::Set(seq.Value(i),XCAFPrs_Driver::GetID());
-      prs->SetMaterial ( Graphic3d_NOM_PLASTIC );
+      prs->SetMaterial (Graphic3d_NameOfMaterial_Plastified);
     }
     prs->SetTransparency( aTransparency );
   }