/usr/share/doc/s3d/ch02.html is in s3d-doc 0.2.2-7build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!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><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter 2. libs3d - The S3D API</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><meta name="keywords" content="s3d, API, handbook, guide" /><link rel="home" href="index.html" title="S3D - a 3D Desktop Environment" /><link rel="up" href="index.html" title="S3D - a 3D Desktop Environment" /><link rel="prev" href="ch01s03.html" title="The s3drc file" /><link rel="next" href="ch02s02.html" title="function reference" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. libs3d - The S3D API</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 2. libs3d - The S3D API"><div class="titlepage"><div><div><h2 class="title"><a id="libs3d"></a>Chapter 2. libs3d - The S3D API</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="sect1"><a href="ch02.html#using">Using the <span class="application">s3d</span> library</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02.html#setup">Setting <span class="application">s3d</span> up</a></span></dt><dt><span class="sect2"><a href="ch02.html#gettingstarted">Getting started</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s02.html">function reference</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s02.html#s3d_usage">s3d_usage</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_init">s3d_init</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_quit">s3d_quit</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_mainloop">s3d_mainloop</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_vertex">s3d_push_vertex</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_vertices">s3d_push_vertices</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_material">s3d_push_material</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_material">s3d_pep_material</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_material_a">s3d_push_material_a</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_materials_a">s3d_push_materials_a</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_material_a">s3d_pep_material_a</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_materials_a">s3d_pep_materials_a</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_load_materials_a">s3d_load_materials_a</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_polygon">s3d_push_polygon</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_polygons">s3d_push_polygons</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_line">s3d_push_line</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_lines">s3d_push_lines</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_texture">s3d_push_texture</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_textures">s3d_push_textures</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_vertex">s3d_pop_vertex</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_polygon">s3d_pop_polygon</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_material">s3d_pop_material</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_texture">s3d_pop_texture</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_line">s3d_pop_line</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_line_normals">s3d_pep_line_normals</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_polygon_normals">s3d_pep_polygon_normals</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_polygon_tex_coord">s3d_pep_polygon_tex_coord</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_polygon_tex_coords">s3d_pep_polygon_tex_coords</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_material_texture">s3d_pep_material_texture</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_vertex">s3d_pep_vertex</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_vertices">s3d_pep_vertices</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_line">s3d_pep_line</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pep_lines">s3d_pep_lines</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_load_line_normals">s3d_load_line_normals</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_load_polygon_normals">s3d_load_polygon_normals</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_load_polygon_tex_coords">s3d_load_polygon_tex_coords</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_load_texture">s3d_load_texture</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_new_object">s3d_new_object</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_del_object">s3d_del_object</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_clone">s3d_clone</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_clone_target">s3d_clone_target</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_link">s3d_link</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_unlink">s3d_unlink</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_flags_on">s3d_flags_on</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_flags_off">s3d_flags_off</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_translate">s3d_translate</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_rotate">s3d_rotate</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_scale">s3d_scale</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_import_model_file">s3d_import_model_file</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_open_file">s3d_open_file</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_select_font">s3d_select_font</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_draw_string">s3d_draw_string</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_strlen">s3d_strlen</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_vector_length">s3d_vector_length</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_vector_dot_product">s3d_vector_dot_product</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_vector_subtract">s3d_vector_subtract</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_vector_angle">s3d_vector_angle</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_angle_to_cam">s3d_angle_to_cam</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_vector_cross_product">s3d_vector_cross_product</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_push_event">s3d_push_event</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_pop_event">s3d_pop_event</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_find_event">s3d_find_event</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_delete_event">s3d_delete_event</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_set_callback">s3d_set_callback</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_clear_callback">s3d_clear_callback</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_ignore_callback">s3d_ignore_callback</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_get_callback">s3d_get_callback</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_process_stack">s3d_process_stack</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_mcp_focus">s3d_mcp_focus</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#s3d_net_check">s3d_net_check</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s03.html">Data types</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s03.html#structs3d_evt">struct s3d_evt</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#structmcp_object">struct mcp_object</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#structs3d_obj_info">struct s3d_obj_info</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#structs3d_but_info">struct s3d_but_info</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#structs3d_key_event">struct s3d_key_event</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#s3d_cb">typedef s3d_cb</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s04.html">Definitions</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s04.html#s3d_events">S3D events</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#s3d_object_flags">S3D Object Flags</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s05.html">Additional Notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s05.html#alpha">About alpha transparency</a></span></dt></dl></dd></dl></div><div class="sect1" title="Using the s3d library"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="using"></a>Using the <span class="application">s3d</span> library</h2></div></div></div><div class="sect2" title="Setting s3d up"><div class="titlepage"><div><div><h3 class="title"><a id="setup"></a>Setting <span class="application">s3d</span> up</h3></div></div></div><p>
Install the lib using the usual usual mechanism:
</p><pre class="programlisting">
cmake .
make
make install
</pre><p>
You might need to have superuser rights in order to do make install. You should now have the server,
the library and some applications installed somewhere.
</p></div><div class="sect2" title="Getting started"><div class="titlepage"><div><div><h3 class="title"><a id="gettingstarted"></a>Getting started</h3></div></div></div><p>
After having <span class="application">s3d</span> installed, you can write your own <span class="application">s3d</span> programs (yeah, that is what this guide is about ;)
</p><pre class="programlisting">
#include <s3d.h>
</pre><p>
should be enough to access the 3d functions. If you want to use keyboard interaction, do
</p><pre class="programlisting">
#include <s3d_keysym.h>
</pre><p>
for the keycode table.
Now you can compile your program with
</p><pre class="screen">
<code class="prompt">bash$</code> <span class="command"><strong> gcc <em class="replaceable"><code>program</code></em>.c -ls3d -o <em class="replaceable"><code>program</code></em> </strong></span>
That wasn't that hard, wasn't it?
</pre><p>
</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The s3drc file </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> function reference</td></tr></table></div></body></html>
|