0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input...
[occt.git] / src / V3d / V3d_DirectionalLight.cxx
index 335a42d..323ae58 100644 (file)
@@ -60,7 +60,7 @@ IMPLEMENT_STANDARD_RTTIEXT(V3d_DirectionalLight,V3d_PositionLight)
 // =======================================================================
 V3d_DirectionalLight::V3d_DirectionalLight (const Handle(V3d_Viewer)& theViewer,
                                             const V3d_TypeOfOrientation theDirection,
-                                            const Quantity_NameOfColor theColor,
+                                            const Quantity_Color& theColor,
                                             const Standard_Boolean theIsHeadlight)
 : V3d_PositionLight (theViewer)
 {
@@ -85,7 +85,7 @@ V3d_DirectionalLight::V3d_DirectionalLight (const Handle(V3d_Viewer)& theViewer,
                                             const Standard_Real theXp,
                                             const Standard_Real theYp,
                                             const Standard_Real theZp,
-                                            const Quantity_NameOfColor theColor,
+                                            const Quantity_Color& theColor,
                                             const Standard_Boolean theIsHeadlight)
 : V3d_PositionLight (theViewer)
 {
@@ -272,7 +272,6 @@ void V3d_DirectionalLight::Display (const Handle(V3d_View)& theView,
   Standard_Real X0,Y0,Z0,VX,VY,VZ;
   Standard_Real X1,Y1,Z1;
   Standard_Real DXRef,DYRef,DZRef,DXini,DYini,DZini;
-  Standard_Real R1,G1,B1;
   V3d_TypeOfRepresentation Pres;
 
 //  Creation of a structure of markable elements (position of the
@@ -312,8 +311,7 @@ void V3d_DirectionalLight::Display (const Handle(V3d_View)& theView,
 
 //Display of the position of the light.
 
-  this->Color(Quantity_TOC_RGB,R1,G1,B1);
-  Quantity_Color Col1(R1,G1,B1,Quantity_TOC_RGB);
+  const Quantity_Color Col1 = this->Color();
   Handle(Graphic3d_AspectLine3d) Asp1 = new Graphic3d_AspectLine3d();
   Asp1->SetColor(Col1);
   glight->SetPrimitivesAspect(Asp1);