0024455: Graphic3d_Group - restore Marker() method to simplify porting
authorkgv <kgv@opencascade.com>
Wed, 11 Dec 2013 05:31:04 +0000 (09:31 +0400)
committerabv <abv@opencascade.com>
Thu, 12 Dec 2013 15:36:52 +0000 (19:36 +0400)
src/Graphic3d/Graphic3d_Group.cdl
src/Graphic3d/Graphic3d_Group_13.cxx

index c91f4005b6186c0754be38d434737ac6272339f4..bf95ccc1380f180ab0eb58c8596989270871ebfc 100755 (executable)
@@ -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; 
index 1678f7070f8136019f790a3bd7ca11c8114995c7..68d3addbd578d149586aafd9718eaa6304e8abbf 100755 (executable)
@@ -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  :