vectozavr-shooter/SFML/doc/html/classsf_1_1VertexArray.html

414 lines
24 KiB
HTML
Raw Normal View History

2021-10-09 13:41:12 +03:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 2.5.1</span>
</div>
</div>
<div id="content">
<!-- Generated by Doxygen 1.8.14 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1VertexArray.html">VertexArray</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsf_1_1VertexArray-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::VertexArray Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Define a set of one or more 2D primitives.
<a href="classsf_1_1VertexArray.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="VertexArray_8hpp_source.html">VertexArray.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::VertexArray:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1VertexArray.png" usemap="#sf::VertexArray_map" alt=""/>
<map id="sf::VertexArray_map" name="sf::VertexArray_map">
<area href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target. " alt="sf::Drawable" shape="rect" coords="0,0,98,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a15729e01df8fc0021f9774dfb56295c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a15729e01df8fc0021f9774dfb56295c1">VertexArray</a> ()</td></tr>
<tr class="memdesc:a15729e01df8fc0021f9774dfb56295c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a15729e01df8fc0021f9774dfb56295c1">More...</a><br /></td></tr>
<tr class="separator:a15729e01df8fc0021f9774dfb56295c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bb1c29a0e3354a035075899d84f02f9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a4bb1c29a0e3354a035075899d84f02f9">VertexArray</a> (<a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type, std::size_t vertexCount=0)</td></tr>
<tr class="memdesc:a4bb1c29a0e3354a035075899d84f02f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the vertex array with a type and an initial number of vertices. <a href="#a4bb1c29a0e3354a035075899d84f02f9">More...</a><br /></td></tr>
<tr class="separator:a4bb1c29a0e3354a035075899d84f02f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abda90e8d841a273d93164f0c0032bd8d"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#abda90e8d841a273d93164f0c0032bd8d">getVertexCount</a> () const</td></tr>
<tr class="memdesc:abda90e8d841a273d93164f0c0032bd8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the vertex count. <a href="#abda90e8d841a273d93164f0c0032bd8d">More...</a><br /></td></tr>
<tr class="separator:abda90e8d841a273d93164f0c0032bd8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6006676417d91f42d0278f1abcfe4352"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vertex.html">Vertex</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a6006676417d91f42d0278f1abcfe4352">operator[]</a> (std::size_t index)</td></tr>
<tr class="memdesc:a6006676417d91f42d0278f1abcfe4352"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a read-write access to a vertex by its index. <a href="#a6006676417d91f42d0278f1abcfe4352">More...</a><br /></td></tr>
<tr class="separator:a6006676417d91f42d0278f1abcfe4352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bfcf91c01c754e86ee8b44b6c79441b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a6bfcf91c01c754e86ee8b44b6c79441b">operator[]</a> (std::size_t index) const</td></tr>
<tr class="memdesc:a6bfcf91c01c754e86ee8b44b6c79441b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a read-only access to a vertex by its index. <a href="#a6bfcf91c01c754e86ee8b44b6c79441b">More...</a><br /></td></tr>
<tr class="separator:a6bfcf91c01c754e86ee8b44b6c79441b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3654c424aca1f9e468f369bc777c839c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a3654c424aca1f9e468f369bc777c839c">clear</a> ()</td></tr>
<tr class="memdesc:a3654c424aca1f9e468f369bc777c839c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the vertex array. <a href="#a3654c424aca1f9e468f369bc777c839c">More...</a><br /></td></tr>
<tr class="separator:a3654c424aca1f9e468f369bc777c839c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c0fe239e8f9a54e64d3bbc96bf548c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a0c0fe239e8f9a54e64d3bbc96bf548c0">resize</a> (std::size_t vertexCount)</td></tr>
<tr class="memdesc:a0c0fe239e8f9a54e64d3bbc96bf548c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize the vertex array. <a href="#a0c0fe239e8f9a54e64d3bbc96bf548c0">More...</a><br /></td></tr>
<tr class="separator:a0c0fe239e8f9a54e64d3bbc96bf548c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80c8f6865e53bd21fc6cb10fffa10035"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#a80c8f6865e53bd21fc6cb10fffa10035">append</a> (const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> &amp;vertex)</td></tr>
<tr class="memdesc:a80c8f6865e53bd21fc6cb10fffa10035"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a vertex to the array. <a href="#a80c8f6865e53bd21fc6cb10fffa10035">More...</a><br /></td></tr>
<tr class="separator:a80c8f6865e53bd21fc6cb10fffa10035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa38c10707c28a97f4627ae8b2f3ad969"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#aa38c10707c28a97f4627ae8b2f3ad969">setPrimitiveType</a> (<a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type)</td></tr>
<tr class="memdesc:aa38c10707c28a97f4627ae8b2f3ad969"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the type of primitives to draw. <a href="#aa38c10707c28a97f4627ae8b2f3ad969">More...</a><br /></td></tr>
<tr class="separator:aa38c10707c28a97f4627ae8b2f3ad969"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1a60d84543aa6e220683349b645f130"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#aa1a60d84543aa6e220683349b645f130">getPrimitiveType</a> () const</td></tr>
<tr class="memdesc:aa1a60d84543aa6e220683349b645f130"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the type of primitives drawn by the vertex array. <a href="#aa1a60d84543aa6e220683349b645f130">More...</a><br /></td></tr>
<tr class="separator:aa1a60d84543aa6e220683349b645f130"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd57744c732abfc7d4c98d8e1d4ccca1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Rect.html">FloatRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexArray.html#abd57744c732abfc7d4c98d8e1d4ccca1">getBounds</a> () const</td></tr>
<tr class="memdesc:abd57744c732abfc7d4c98d8e1d4ccca1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the bounding rectangle of the vertex array. <a href="#abd57744c732abfc7d4c98d8e1d4ccca1">More...</a><br /></td></tr>
<tr class="separator:abd57744c732abfc7d4c98d8e1d4ccca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Define a set of one or more 2D primitives. </p>
<p><a class="el" href="classsf_1_1VertexArray.html" title="Define a set of one or more 2D primitives. ">sf::VertexArray</a> is a very simple wrapper around a dynamic array of vertices and a primitives type.</p>
<p>It inherits <a class="el" href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target. ">sf::Drawable</a>, but unlike other drawables it is not transformable.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="classsf_1_1VertexArray.html">sf::VertexArray</a> lines(<a class="code" href="group__graphics.html#gga5ee56ac1339984909610713096283b1ba14d9eeec2c7c314f239a57bde35949fa">sf::LineStrip</a>, 4);</div><div class="line">lines[0].position = <a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a>(10, 0);</div><div class="line">lines[1].position = <a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a>(20, 0);</div><div class="line">lines[2].position = <a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a>(30, 5);</div><div class="line">lines[3].position = <a class="code" href="classsf_1_1Vector2.html">sf::Vector2f</a>(40, 2);</div><div class="line"></div><div class="line">window.draw(lines);</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">sf::Vertex</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="VertexArray_8hpp_source.html#l00045">45</a> of file <a class="el" href="VertexArray_8hpp_source.html">VertexArray.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a15729e01df8fc0021f9774dfb56295c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15729e01df8fc0021f9774dfb56295c1">&#9670;&nbsp;</a></span>VertexArray() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::VertexArray::VertexArray </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>Creates an empty vertex array. </p>
</div>
</div>
<a id="a4bb1c29a0e3354a035075899d84f02f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bb1c29a0e3354a035075899d84f02f9">&#9670;&nbsp;</a></span>VertexArray() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sf::VertexArray::VertexArray </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct the vertex array with a type and an initial number of vertices. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of primitives </td></tr>
<tr><td class="paramname">vertexCount</td><td>Initial number of vertices in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a80c8f6865e53bd21fc6cb10fffa10035"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80c8f6865e53bd21fc6cb10fffa10035">&#9670;&nbsp;</a></span>append()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexArray::append </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> &amp;&#160;</td>
<td class="paramname"><em>vertex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a vertex to the array. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertex</td><td><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> to add </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3654c424aca1f9e468f369bc777c839c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3654c424aca1f9e468f369bc777c839c">&#9670;&nbsp;</a></span>clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexArray::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clear the vertex array. </p>
<p>This function removes all the vertices from the array. It doesn't deallocate the corresponding memory, so that adding new vertices after clearing doesn't involve reallocating all the memory. </p>
</div>
</div>
<a id="abd57744c732abfc7d4c98d8e1d4ccca1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd57744c732abfc7d4c98d8e1d4ccca1">&#9670;&nbsp;</a></span>getBounds()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1Rect.html">FloatRect</a> sf::VertexArray::getBounds </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the bounding rectangle of the vertex array. </p>
<p>This function returns the minimal axis-aligned rectangle that contains all the vertices of the array.</p>
<dl class="section return"><dt>Returns</dt><dd>Bounding rectangle of the vertex array </dd></dl>
</div>
</div>
<a id="aa1a60d84543aa6e220683349b645f130"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1a60d84543aa6e220683349b645f130">&#9670;&nbsp;</a></span>getPrimitiveType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> sf::VertexArray::getPrimitiveType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the type of primitives drawn by the vertex array. </p>
<dl class="section return"><dt>Returns</dt><dd>Primitive type </dd></dl>
</div>
</div>
<a id="abda90e8d841a273d93164f0c0032bd8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abda90e8d841a273d93164f0c0032bd8d">&#9670;&nbsp;</a></span>getVertexCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::size_t sf::VertexArray::getVertexCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the vertex count. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of vertices in the array </dd></dl>
</div>
</div>
<a id="a6006676417d91f42d0278f1abcfe4352"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6006676417d91f42d0278f1abcfe4352">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1Vertex.html">Vertex</a>&amp; sf::VertexArray::operator[] </td>
<td>(</td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a read-write access to a vertex by its index. </p>
<p>This function doesn't check <em>index</em>, it must be in range [0, <a class="el" href="classsf_1_1VertexArray.html#abda90e8d841a273d93164f0c0032bd8d" title="Return the vertex count. ">getVertexCount()</a> - 1]. The behavior is undefined otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>Index of the vertex to get</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to the index-th vertex</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1VertexArray.html#abda90e8d841a273d93164f0c0032bd8d" title="Return the vertex count. ">getVertexCount</a> </dd></dl>
</div>
</div>
<a id="a6bfcf91c01c754e86ee8b44b6c79441b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bfcf91c01c754e86ee8b44b6c79441b">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a>&amp; sf::VertexArray::operator[] </td>
<td>(</td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a read-only access to a vertex by its index. </p>
<p>This function doesn't check <em>index</em>, it must be in range [0, <a class="el" href="classsf_1_1VertexArray.html#abda90e8d841a273d93164f0c0032bd8d" title="Return the vertex count. ">getVertexCount()</a> - 1]. The behavior is undefined otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>Index of the vertex to get</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Const reference to the index-th vertex</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1VertexArray.html#abda90e8d841a273d93164f0c0032bd8d" title="Return the vertex count. ">getVertexCount</a> </dd></dl>
</div>
</div>
<a id="a0c0fe239e8f9a54e64d3bbc96bf548c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c0fe239e8f9a54e64d3bbc96bf548c0">&#9670;&nbsp;</a></span>resize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexArray::resize </td>
<td>(</td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resize the vertex array. </p>
<p>If <em>vertexCount</em> is greater than the current size, the previous vertices are kept and new (default-constructed) vertices are added. If <em>vertexCount</em> is less than the current size, existing vertices are removed from the array.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexCount</td><td>New size of the array (number of vertices) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa38c10707c28a97f4627ae8b2f3ad969"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa38c10707c28a97f4627ae8b2f3ad969">&#9670;&nbsp;</a></span>setPrimitiveType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexArray::setPrimitiveType </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the type of primitives to draw. </p>
<p>This function defines how the vertices must be interpreted when it's time to draw them: </p><ul>
<li>As points </li>
<li>As lines </li>
<li>As triangles </li>
<li>As quads The default primitive type is sf::Points.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of primitive </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="VertexArray_8hpp_source.html">VertexArray.hpp</a></li>
</ul>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>