{
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()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
myDrawer->ShadingAspect()->SetTransparency (1.0);
myDrawer->ShadingAspect()->SetColor (Quantity_NOC_WHITE);
{
myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theWidth));
myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
+ myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY);
myDrawer->ShadingAspect()->SetTransparency (1.0);
myDrawer->ShadingAspect()->SetColor (Quantity_NOC_WHITE);
{
myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theLineWidth));
myDrawer->SetShadingAspect (new Prs3d_ShadingAspect());
+ myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC);
myDrawer->ShadingAspect()->SetColor (theFillColor);
myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_SOLID);
myDrawer->ShadingAspect()->SetTransparency (theTransparency);
if (myTriangles.IsNull() || myTriangles->VertexNumber() != myPoints.Length() + 1)
{
toFill = Standard_True;
- myTriangles = new Graphic3d_ArrayOfTriangles (aTriangles.Extent() * 3);
+ myTriangles = new Graphic3d_ArrayOfTriangles (aTriangles.Extent() * 3, 0, Standard_True);
}
Standard_Integer aVertexIndex = 1;
if (toFill)
{
+ gp_Dir aNorm = gp::DZ();
for (Standard_Integer anIt = 0; anIt < 3; ++anIt)
{
- myTriangles->AddVertex (aPts[anIt].X(), aPts[anIt].Y(), 0.0);
+ myTriangles->AddVertex (aPts[anIt].X(), aPts[anIt].Y(), 0.0,
+ aNorm.X(), aNorm.Y(), aNorm.Z());
}
}
else
static Handle(AIS_RubberBand) aBand;
if (aBand.IsNull())
{
- aBand = new AIS_RubberBand();
+ aBand = new AIS_RubberBand (Quantity_NOC_LIGHTBLUE, Aspect_TOL_SOLID, Quantity_NOC_LIGHTBLUE, 0.4, 1.0);
+ aBand->SetDisplayMode (0);
}
return aBand;
}
case WM_MOUSEMOVE:
if (IsDragged)
{
+ bool toRedraw = false;
if (!DragFirst && ViewerTest::GetAISContext()->IsDisplayed (GetRubberBand()))
{
ViewerTest::GetAISContext()->Remove (GetRubberBand(), Standard_False);
- ViewerTest::GetAISContext()->CurrentViewer()->RedrawImmediate();
+ toRedraw = true;
}
DragFirst = Standard_False;
{
int aHeight = aRect.bottom - aRect.top;
GetRubberBand()->SetRectangle (X_ButtonPress, aHeight - Y_ButtonPress, X_Motion, aHeight - Y_Motion);
- ViewerTest::GetAISContext()->Display (GetRubberBand(), Standard_False);
+ ViewerTest::GetAISContext()->Display (GetRubberBand(), 0, -1, Standard_False, Standard_True, AIS_DS_Displayed);
+ toRedraw = true;
+ }
+ if (toRedraw)
+ {
ViewerTest::GetAISContext()->CurrentViewer()->RedrawImmediate();
}
}
if (ViewerTest::GetAISContext()->IsDisplayed (GetRubberBand()))
{
ViewerTest::GetAISContext()->Remove (GetRubberBand(), Standard_False);
- ViewerTest::GetAISContext()->CurrentViewer()->RedrawImmediate();
}
}
unsigned int aWidth, aHeight, aBorderWidth, aDepth;
XGetGeometry (aDisplay, aWindow, &aRoot, &anX, &anY, &aWidth, &aHeight, &aBorderWidth, &aDepth);
GetRubberBand()->SetRectangle (X_ButtonPress, aHeight - Y_ButtonPress, X_Motion, aHeight - Y_Motion);
- ViewerTest::GetAISContext()->Display (GetRubberBand(), Standard_False);
+ ViewerTest::GetAISContext()->Display (GetRubberBand(), 0, -1, Standard_False, Standard_True, AIS_DS_Displayed);
ViewerTest::GetAISContext()->CurrentViewer()->RedrawImmediate();
}
else