1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0024455: Graphic3d_Group - restore Marker() method to simplify porting

This commit is contained in:
kgv 2013-12-11 09:31:04 +04:00 committed by abv
parent 4efafd1f3a
commit 7551feda20
2 changed files with 22 additions and 0 deletions

View File

@ -359,6 +359,13 @@ class Group from Graphic3d inherits TShared
---Level: Public
---Purpose: Adds an array of primitives for display
Marker ( me : mutable;
thePoint : Vertex from Graphic3d;
theToEvalMinMax : Boolean from Standard = Standard_True )
is static;
---Level: Public
---Purpose: Creates a primitive array with single marker using AddPrimitiveArray().
UserDraw ( me : mutable;
AnObject : Address from Standard;
EvalMinMax : Boolean from Standard = Standard_True;

View File

@ -19,6 +19,8 @@
#include <Graphic3d_Group.jxx>
#include <Graphic3d_Group.pxx>
#include <Graphic3d_ArrayOfPoints.hxx>
#include <gp_Pnt.hxx>
// =======================================================================
@ -65,6 +67,19 @@ void Graphic3d_Group :: AddPrimitiveArray ( const Handle(Graphic3d_ArrayOfPrimit
Update ();
}
// =======================================================================
// function : Marker
// purpose :
// =======================================================================
void Graphic3d_Group::Marker (const Graphic3d_Vertex& thePoint,
const Standard_Boolean theToEvalMinMax)
{
Handle(Graphic3d_ArrayOfPoints) aPoints = new Graphic3d_ArrayOfPoints (1);
aPoints->AddVertex (thePoint.X(), thePoint.Y(), thePoint.Z());
AddPrimitiveArray (aPoints, theToEvalMinMax);
}
// =======================================================================
// function : UserDraw
// purpose :