mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024131: TKOpenGL redesign GPU memory management for markers presentation
Introduce Point Sprites usage. Graphic3d_Group - drop Marker(),MarkerSet() methods - markers should be drawn using AddPrimitiveArray. Added new Draw Harness commands vcaps, vmarkerstest.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <Graphic3d_Vertex.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <Aspect_TypeOfMarker.hxx>
|
||||
#include <Aspect_AspectMarker.hxx>
|
||||
@@ -56,20 +57,13 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const DsgPrs_ArrowSide ArrowSide)
|
||||
{
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
|
||||
// symbols aux extremites de la cote
|
||||
// Graphic3d_Vertex V3d,V3d1,V3d2;
|
||||
Graphic3d_Vertex V3d,V3d1;
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
|
||||
switch(ArrowSide) {
|
||||
case DsgPrs_AS_NONE:
|
||||
@@ -115,28 +109,29 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
|
||||
case DsgPrs_AS_FIRSTPT:
|
||||
{
|
||||
V3d = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_LASTPT:
|
||||
{
|
||||
// On dessine un rond
|
||||
V3d = Graphic3d_Vertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_BOTHPT:
|
||||
{
|
||||
V3d1 = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d1);
|
||||
Graphic3d_Vertex V3d2(pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d2);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints1->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints2->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -144,30 +139,30 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
{
|
||||
// an Arrow
|
||||
Prs3d_Arrow::Draw(aPresentation,
|
||||
pt1,
|
||||
dir1,
|
||||
LA->ArrowAspect()->Angle(),
|
||||
LA->ArrowAspect()->Length());
|
||||
pt1,
|
||||
dir1,
|
||||
LA->ArrowAspect()->Angle(),
|
||||
LA->ArrowAspect()->Length());
|
||||
// a Round
|
||||
V3d = Graphic3d_Vertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_FIRSTPT_LASTAR:
|
||||
{
|
||||
// a Round
|
||||
V3d = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
|
||||
// an Arrow
|
||||
Prs3d_Arrow::Draw(aPresentation,
|
||||
pt2,
|
||||
dir2,
|
||||
LA->ArrowAspect()->Angle(),
|
||||
LA->ArrowAspect()->Length());
|
||||
|
||||
pt2,
|
||||
dir2,
|
||||
LA->ArrowAspect()->Angle(),
|
||||
LA->ArrowAspect()->Length());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -182,19 +177,13 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
const DsgPrs_ArrowSide ArrowSide,
|
||||
const Standard_Boolean drawFromCenter)
|
||||
{
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
// symbols aux extremites de la cote
|
||||
// Graphic3d_Vertex V3d,V3d1,V3d2;
|
||||
Graphic3d_Vertex V3d,V3d1;
|
||||
LA->LineAspect()->Aspect()->Values(aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
|
||||
switch(ArrowSide) {
|
||||
case DsgPrs_AS_NONE:
|
||||
@@ -240,30 +229,35 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
|
||||
case DsgPrs_AS_FIRSTPT:
|
||||
{
|
||||
V3d = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
if(drawFromCenter)
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
if (drawFromCenter)
|
||||
{
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_LASTPT:
|
||||
{
|
||||
// On dessine un rond
|
||||
V3d = Graphic3d_Vertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_BOTHPT:
|
||||
{
|
||||
V3d1 = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
if(drawFromCenter)
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d1);
|
||||
Graphic3d_Vertex V3d2(pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d2);
|
||||
|
||||
if (drawFromCenter)
|
||||
{
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints1->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
|
||||
}
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints2->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -271,29 +265,32 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
|
||||
{
|
||||
// an Arrow
|
||||
Prs3d_Arrow::Draw (aPresentation,
|
||||
pt1,
|
||||
dir1,
|
||||
LA->Arrow1Aspect()->Angle(),
|
||||
LA->Arrow1Aspect()->Length());
|
||||
pt1,
|
||||
dir1,
|
||||
LA->Arrow1Aspect()->Angle(),
|
||||
LA->Arrow1Aspect()->Length());
|
||||
// a Round
|
||||
V3d = Graphic3d_Vertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
break;
|
||||
}
|
||||
|
||||
case DsgPrs_AS_FIRSTPT_LASTAR:
|
||||
{
|
||||
// a Round
|
||||
V3d = Graphic3d_Vertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
if(drawFromCenter)
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
if (drawFromCenter)
|
||||
{
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
}
|
||||
// an Arrow
|
||||
Prs3d_Arrow::Draw (aPresentation,
|
||||
pt2,
|
||||
dir2,
|
||||
LA->Arrow1Aspect()->Angle(),
|
||||
LA->Arrow1Aspect()->Length());
|
||||
pt2,
|
||||
dir2,
|
||||
LA->Arrow1Aspect()->Angle(),
|
||||
LA->Arrow1Aspect()->Length());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
#include <Graphic3d_Vertex.hxx>
|
||||
|
||||
#include <Prs3d_LengthAspect.hxx>
|
||||
@@ -108,15 +109,13 @@ void DsgPrs_FixPresentation::Add(
|
||||
// On ajoute un rond au point d'attache
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
Graphic3d_Vertex V3d(aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_LengthAspect.hxx>
|
||||
@@ -59,17 +60,15 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
|
||||
// On ajoute un rond au point d'attache
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
Graphic3d_Vertex V3d(aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
|
||||
// texte
|
||||
Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
|
||||
|
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Graphic3d_ArrayOfSegments.hxx>
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
|
||||
#include <Prs3d_Arrow.hxx>
|
||||
#include <Prs3d_ArrowAspect.hxx>
|
||||
@@ -131,20 +132,18 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
|
||||
// ball 1 : 3eme groupe
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
Graphic3d_Vertex V3d(Proj2.X() ,Proj2.Y(), Proj2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
|
||||
|
||||
// texte : 4eme groupe
|
||||
Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
|
||||
}
|
||||
@@ -209,7 +208,8 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
|
||||
|
||||
// anneau : 3eme et 4eme groupes
|
||||
Graphic3d_Vertex V3d(Proj2.X() ,Proj2.Y(), Proj2.Z());
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
|
||||
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
@@ -218,7 +218,7 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
|
||||
//MarkerAsp->SetColor(Quantity_Color(Quantity_NOC_RED));
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Handle(Graphic3d_AspectMarker3d) Marker2Asp = new Graphic3d_AspectMarker3d();
|
||||
@@ -227,5 +227,5 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
|
||||
//Marker2Asp->SetColor(Quantity_Color(Quantity_NOC_GREEN));
|
||||
Marker2Asp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(Marker2Asp);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
}
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
#include <Graphic3d_Vertex.hxx>
|
||||
|
||||
#include <Prs3d_Arrow.hxx>
|
||||
@@ -702,17 +703,16 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
|
||||
// SYMMETRY WHEN THE REFERENCE POINT IS ON THE AXIS OF SYM.:
|
||||
//==============================================================
|
||||
//Marker of localisation of the face
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
|
||||
MarkerAsp->SetType(Aspect_TOM_BALL);
|
||||
MarkerAsp->SetScale(0.8);
|
||||
Quantity_Color acolor;
|
||||
Aspect_TypeOfLine atype;
|
||||
Standard_Real awidth;
|
||||
LA->LineAspect()->Aspect()->Values(acolor, atype, awidth);
|
||||
MarkerAsp->SetColor(acolor);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
|
||||
Graphic3d_Vertex V3d(AttachmentPoint1.X(),AttachmentPoint1.Y(),AttachmentPoint1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(V3d);
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values(aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
|
||||
|
||||
|
||||
//Trace of the linking segment
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
@@ -824,23 +824,22 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
|
||||
Handle(Graphic3d_AspectMarker3d) MarkerAspAtt = new Graphic3d_AspectMarker3d();
|
||||
MarkerAspAtt->SetType(Aspect_TOM_BALL);
|
||||
MarkerAspAtt->SetScale(0.8);
|
||||
Quantity_Color color;
|
||||
Aspect_TypeOfLine type;
|
||||
Standard_Real width;
|
||||
LA->LineAspect()->Aspect()->Values(color, type, width);
|
||||
MarkerAspAtt->SetColor(color);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAspAtt);
|
||||
Graphic3d_Vertex Vatt1(AttachmentPoint1.X(),AttachmentPoint1.Y(),AttachmentPoint1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(Vatt1);
|
||||
Quantity_Color aColor;
|
||||
Aspect_TypeOfLine aType;
|
||||
Standard_Real aWidth;
|
||||
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
|
||||
Handle(Graphic3d_AspectMarker3d) aMarkerAspAtt = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints1->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
|
||||
|
||||
Prs3d_Root::NewGroup(aPresentation);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAspAtt);
|
||||
Graphic3d_Vertex Vatt2(AttachmentPoint2.X(),AttachmentPoint2.Y(),AttachmentPoint2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->Marker(Vatt2);
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
|
||||
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
|
||||
anArrayOfPoints2->AddVertex (AttachmentPoint2.X(), AttachmentPoint2.Y(), AttachmentPoint2.Z());
|
||||
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
//| SYMBOL OF SYMMETRY |
|
||||
|
Reference in New Issue
Block a user