theTris->AddVertex (gp_Pnt (theXLeft + theSizeX, theYBottom, 0.0), theColorBottom);
theTris->AddVertex (gp_Pnt (theXLeft, theYBottom + theSizeY, 0.0), theColorTop);
theTris->AddVertex (gp_Pnt (theXLeft + theSizeX, theYBottom + theSizeY, 0.0), theColorTop);
- theTris->AddEdge (aVertIndex);
- theTris->AddEdge (aVertIndex + 1);
- theTris->AddEdge (aVertIndex + 2);
- theTris->AddEdge (aVertIndex + 1);
- theTris->AddEdge (aVertIndex + 2);
- theTris->AddEdge (aVertIndex + 3);
+ theTris->AddEdges (aVertIndex, aVertIndex + 1, aVertIndex + 2);
+ theTris->AddEdges (aVertIndex + 1, aVertIndex + 2, aVertIndex + 3);
}
//! Compute hue angle from specified value.
//! @return the actual edges number
Standard_EXPORT Standard_Integer AddEdge (const Standard_Integer theVertexIndex);
+ //! Convenience method, adds two vertex indices (a segment) in the range [1,VertexNumber()] in the array.
+ //! @return the actual edges number
+ Standard_Integer AddEdges (Standard_Integer theVertexIndex1,
+ Standard_Integer theVertexIndex2)
+ {
+ AddEdge (theVertexIndex1);
+ return AddEdge (theVertexIndex2);
+ }
+
+ //! Convenience method, adds three vertex indices (a triangle) in the range [1,VertexNumber()] in the array.
+ //! @return the actual edges number
+ Standard_Integer AddEdges (Standard_Integer theVertexIndex1,
+ Standard_Integer theVertexIndex2,
+ Standard_Integer theVertexIndex3)
+ {
+ AddEdge (theVertexIndex1);
+ AddEdge (theVertexIndex2);
+ return AddEdge (theVertexIndex3);
+ }
+
+ //! Convenience method, adds four vertex indices (a quad) in the range [1,VertexNumber()] in the array.
+ //! @return the actual edges number
+ Standard_Integer AddEdges (Standard_Integer theVertexIndex1,
+ Standard_Integer theVertexIndex2,
+ Standard_Integer theVertexIndex3,
+ Standard_Integer theVertexIndex4)
+ {
+ AddEdge (theVertexIndex1);
+ AddEdge (theVertexIndex2);
+ AddEdge (theVertexIndex3);
+ return AddEdge (theVertexIndex4);
+ }
+
public: //! @name optional array of Bounds/Subgroups within primitive array (e.g. restarting primitives / assigning colors)
//! Returns optional bounds buffer.