-// File: AIS_Trihedron.cxx
-// Created: Mon Oct 9 16:24:53 1995
-// Author: Arnaud BOUZY/Odile Olivier
-// <adn>
-
-#define GER61351 //GG_171199 Enable to set an object RGB color
-// instead a restricted object NameOfColor.
+// Created on: 1995-10-09
+// Created by: Arnaud BOUZY/Odile Olivier
+// Copyright (c) 1995-1999 Matra Datavision
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+
+//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#define IMP120100 // GG Add SetTextColor() and SetArrowColor() methods
//=======================================================================
void AIS_Trihedron::SetColor(const Quantity_NameOfColor aCol)
-#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
void AIS_Trihedron::SetColor(const Quantity_Color &aCol)
-#endif
{
hasOwnColor=Standard_True;
myOwnColor = aCol;
}
#endif
-//=======================================================================
-//function : Compute
-//purpose : to avoid warning
-//=======================================================================
-void AIS_Trihedron::Compute(const Handle(PrsMgr_PresentationManager2d)&,
- const Handle(Graphic2d_GraphicObject)&,
- const Standard_Integer)
-{
-}
//=======================================================================
//function : Compute
void AIS_Trihedron::SetContext(const Handle(AIS_InteractiveContext)& Ctx)
{
// Standard_Boolean same_DA = myDrawer->Link() == Ctx->DefaultDrawer();
-
+
+ if( Ctx.IsNull())
+ {
+ Standard_Integer anIdx;
+ for (anIdx = 0; anIdx < 7; anIdx++)
+ {
+ myShapes[anIdx]->SetContext(Ctx);
+ }
+ AIS_InteractiveObject::SetContext (Ctx);
+ return;
+ }
// Remove subobjects from current context
Handle(AIS_InteractiveContext) anAISContext = GetContext();
+
Standard_Boolean hasContext = (anAISContext.IsNull() == Standard_False);
Standard_Integer anIdx;
for (anIdx = 0; anIdx < 7; anIdx++)
}
myShapes[anIdx].Nullify();
}
-
+
AIS_InteractiveObject::SetContext (Ctx);
-
LoadSubObjects();
for(Standard_Integer i= 0;i<=6;i++)
myShapes[i]->SetContext (Ctx);