gem-graph-client/doc/html/d6/d09/draw_8c.html

344 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Gem-graph: src/graphics/draw.c File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../logo icon mini.png"/></td>
<td id="projectalign">
<div id="projectname">Gem-graph<span id="projectnumber">&#160;0.1.0</span>
</div>
<div id="projectbrief">A modelling tool based on rewriting of geometric graphs.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_560415a5d2bc4999842279f4fc1debef.html">graphics</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">draw.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>graphics - general drawing functions
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cglm/cglm.h&gt;</code><br />
<code>#include &quot;<a class="el" href="../../d3/d0a/base_8h.html">../../include/base.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../d7/d04/graphics_8h.html">../../include/graphics.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa0df09cf556373a65c4e0d9c52ea646b" id="r_aa0df09cf556373a65c4e0d9c52ea646b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d09/draw_8c.html#aa0df09cf556373a65c4e0d9c52ea646b">graphics_draw_vertex</a> (const int stack_id, GLfloat x, GLfloat y, GLfloat z)</td></tr>
<tr class="memdesc:aa0df09cf556373a65c4e0d9c52ea646b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. <br /></td></tr>
<tr class="separator:aa0df09cf556373a65c4e0d9c52ea646b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3956486509d8f170b54c8d6831bb85af" id="r_a3956486509d8f170b54c8d6831bb85af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d09/draw_8c.html#a3956486509d8f170b54c8d6831bb85af">graphics_draw_color</a> (const int stack_id, GLfloat r, GLfloat g, GLfloat b)</td></tr>
<tr class="memdesc:a3956486509d8f170b54c8d6831bb85af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes values to describe a color (r,g,b) into the color buffer. <br /></td></tr>
<tr class="separator:a3956486509d8f170b54c8d6831bb85af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a658c61849cb025f4482be722c62d66e4" id="r_a658c61849cb025f4482be722c62d66e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d09/draw_8c.html#a658c61849cb025f4482be722c62d66e4">graphics_draw_line</a> (const int stack_id, GLuint a, GLuint b)</td></tr>
<tr class="memdesc:a658c61849cb025f4482be722c62d66e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes values to describe a line from a to b into the line buffer. <br /></td></tr>
<tr class="separator:a658c61849cb025f4482be722c62d66e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90e33f30b6c203c51f38279e42f74606" id="r_a90e33f30b6c203c51f38279e42f74606"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d09/draw_8c.html#a90e33f30b6c203c51f38279e42f74606">graphics_draw_plan</a> (const int stack_id, GLuint a, GLuint b, GLuint c)</td></tr>
<tr class="memdesc:a90e33f30b6c203c51f38279e42f74606"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. <br /></td></tr>
<tr class="separator:a90e33f30b6c203c51f38279e42f74606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7077e01357e203c1997c806abaee658a" id="r_a7077e01357e203c1997c806abaee658a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d09/draw_8c.html#a7077e01357e203c1997c806abaee658a">graphics_draw</a> (const int stack_id)</td></tr>
<tr class="memdesc:a7077e01357e203c1997c806abaee658a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws the current buffer to a gl_area. <br /></td></tr>
<tr class="separator:a7077e01357e203c1997c806abaee658a"><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>graphics - general drawing functions </p>
<p>This file is part of Gem-graph. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a7077e01357e203c1997c806abaee658a" name="a7077e01357e203c1997c806abaee658a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7077e01357e203c1997c806abaee658a">&#9670;&#160;</a></span>graphics_draw()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void graphics_draw </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>stack_id</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws the current buffer to a gl_area. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack_id</td><td>gl_area, ptr to the gl_area widget </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3956486509d8f170b54c8d6831bb85af" name="a3956486509d8f170b54c8d6831bb85af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3956486509d8f170b54c8d6831bb85af">&#9670;&#160;</a></span>graphics_draw_color()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void graphics_draw_color </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>stack_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>r</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>g</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes values to describe a color (r,g,b) into the color buffer. </p>
<p>Draws the color (r, g, b) associated to a vertex if (console) prints (r, g, b) values to console.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack_id</td><td></td></tr>
<tr><td class="paramname">r</td><td></td></tr>
<tr><td class="paramname">g</td><td></td></tr>
<tr><td class="paramname">b</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a658c61849cb025f4482be722c62d66e4" name="a658c61849cb025f4482be722c62d66e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a658c61849cb025f4482be722c62d66e4">&#9670;&#160;</a></span>graphics_draw_line()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void graphics_draw_line </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>stack_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLuint&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLuint&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes values to describe a line from a to b into the line buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack_id</td><td></td></tr>
<tr><td class="paramname">a</td><td></td></tr>
<tr><td class="paramname">b</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a90e33f30b6c203c51f38279e42f74606" name="a90e33f30b6c203c51f38279e42f74606"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90e33f30b6c203c51f38279e42f74606">&#9670;&#160;</a></span>graphics_draw_plan()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void graphics_draw_plan </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>stack_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLuint&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLuint&#160;</td>
<td class="paramname"><em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLuint&#160;</td>
<td class="paramname"><em>c</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes values to describe an (a,b,c) plan (triangle) into the plan buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack_id</td><td></td></tr>
<tr><td class="paramname">a</td><td></td></tr>
<tr><td class="paramname">b</td><td></td></tr>
<tr><td class="paramname">c</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa0df09cf556373a65c4e0d9c52ea646b" name="aa0df09cf556373a65c4e0d9c52ea646b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0df09cf556373a65c4e0d9c52ea646b">&#9670;&#160;</a></span>graphics_draw_vertex()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void graphics_draw_vertex </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>stack_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">GLfloat&#160;</td>
<td class="paramname"><em>z</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes values to describe a vertex at (x,y,z) intoq the vertex buffer. </p>
<p>Draws a vertex (x, y, z) if (console) prints (x, y, z) values to console.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stack_id</td><td></td></tr>
<tr><td class="paramname">x</td><td></td></tr>
<tr><td class="paramname">y</td><td></td></tr>
<tr><td class="paramname">z</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>