| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!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" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
- <title></title>
- <style type="text/css">
- /*
- :Author: David Goodger ([email protected])
- :Id: $Id: html4css1.css 5196 2007-06-03 20:25:28Z wiemann $
- :Copyright: This stylesheet has been placed in the public domain.
- Default cascading style sheet for the HTML output of Docutils.
- See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
- customize this style sheet.
- */
- /* used to remove borders from tables and images */
- .borderless, table.borderless td, table.borderless th {
- border: 0 }
- table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
- .first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
- .last, .with-subtitle {
- margin-bottom: 0 ! important }
- .hidden {
- display: none }
- a.toc-backref {
- text-decoration: none ;
- color: black }
- blockquote.epigraph {
- margin: 2em 5em ; }
- dl.docutils dd {
- margin-bottom: 0.5em }
- /* Uncomment (and remove this text!) to get bold-faced definition list terms
- dl.docutils dt {
- font-weight: bold }
- */
- div.abstract {
- margin: 2em 5em }
- div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
- div.admonition, div.attention, div.caution, div.danger, div.error,
- div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
- div.admonition p.admonition-title, div.hint p.admonition-title,
- div.important p.admonition-title, div.note p.admonition-title,
- div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
- div.attention p.admonition-title, div.caution p.admonition-title,
- div.danger p.admonition-title, div.error p.admonition-title,
- div.warning p.admonition-title {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
- /* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
- div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
- div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
- */
- div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
- div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
- div.figure {
- margin-left: 2em ;
- margin-right: 2em }
- div.footer, div.header {
- clear: both;
- font-size: smaller }
- div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
- div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
- div.sidebar {
- margin: 0 0 0.5em 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
- div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
- div.system-messages {
- margin: 5em }
- div.system-messages h1 {
- color: red }
- div.system-message {
- border: medium outset ;
- padding: 1em }
- div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
- div.topic {
- margin: 2em }
- h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
- h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
- h1.title {
- text-align: center }
- h2.subtitle {
- text-align: center }
- hr.docutils {
- width: 75% }
- img.align-left {
- clear: left }
- img.align-right {
- clear: right }
- ol.simple, ul.simple {
- margin-bottom: 1em }
- ol.arabic {
- list-style: decimal }
- ol.loweralpha {
- list-style: lower-alpha }
- ol.upperalpha {
- list-style: upper-alpha }
- ol.lowerroman {
- list-style: lower-roman }
- ol.upperroman {
- list-style: upper-roman }
- p.attribution {
- text-align: right ;
- margin-left: 50% }
- p.caption {
- font-style: italic }
- p.credits {
- font-style: italic ;
- font-size: smaller }
- p.label {
- white-space: nowrap }
- p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
- p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
- p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
- p.topic-title {
- font-weight: bold }
- pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font-family: serif ;
- font-size: 100% }
- pre.literal-block, pre.doctest-block {
- margin-left: 2em ;
- margin-right: 2em }
- span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
- span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
- span.interpreted {
- font-family: sans-serif }
- span.option {
- white-space: nowrap }
- span.pre {
- white-space: pre }
- span.problematic {
- color: red }
- span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
- table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
- table.docinfo {
- margin: 2em 4em }
- table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
- table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
- table.docutils td, table.docutils th,
- table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
- table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
- h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
- h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
- ul.auto-toc {
- list-style-type: none }
- </style>
- </head>
- <body>
- <div class="document">
- <p><strong>AnKi 3D Engine</strong></p>
- <p>Copyright (C) 2009, 2010 Panagiotis Christopoulos-Charitos</p>
- <p><a class="reference external" href="http://www.ancient-ritual.com">http://www.ancient-ritual.com</a>
- <a class="reference external" href="mailto:godlike@ancient-ritual.com">godlike@ancient-ritual.com</a></p>
- <div class="contents topic" id="table-of-contents">
- <p class="topic-title first">Table of Contents</p>
- <ul class="simple">
- <li><a class="reference internal" href="#building" id="id1">Building</a><ul>
- <li><a class="reference internal" href="#required-libraries" id="id2">Required libraries</a><ul>
- <li><a class="reference internal" href="#bullet-physics-library" id="id3">Bullet Physics Library</a></li>
- <li><a class="reference internal" href="#sdl-ver-1-3" id="id4">SDL ver 1.3</a></li>
- <li><a class="reference internal" href="#glew" id="id5">GLEW</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#generating-makefiles-and-building-anki" id="id6">Generating makefiles and building AnKi</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#generating-source-documentation-doxygen" id="id7">Generating source documentation (doxygen)</a></li>
- <li><a class="reference internal" href="#assets" id="id8">Assets</a></li>
- <li><a class="reference internal" href="#coding-style" id="id9">Coding style</a><ul>
- <li><a class="reference internal" href="#classes" id="id10">Classes</a></li>
- <li><a class="reference internal" href="#material-shader-program-naming" id="id11">Material shader program naming</a></li>
- <li><a class="reference internal" href="#naming-shortcuts" id="id12">Naming shortcuts</a></li>
- <li><a class="reference internal" href="#controllers" id="id13">Controllers</a></li>
- <li><a class="reference internal" href="#submitting-patches" id="id14">Submitting patches</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#todo-list" id="id15">ToDo list</a></li>
- </ul>
- </div>
- <div class="section" id="building">
- <h1><a class="toc-backref" href="#id1">Building</a></h1>
- <p>AnKi build system is very Linux specific (GNU make only) at the moment. It
- also requires a few extra development libraries. You can also find a custom
- build system that generates GNU makefiles.</p>
- <div class="section" id="required-libraries">
- <h2><a class="toc-backref" href="#id2">Required libraries</a></h2>
- <p>AnKi requires a few up to date versions of some libraries. The libraries are:</p>
- <ul class="simple">
- <li>Bullet Physics</li>
- <li>SDL ver 1.3</li>
- <li>GLEW</li>
- </ul>
- <p>So before generating makefiles or building AnKi you have to download from their
- repositories and build the above libraries. Instructions follow. You can
- alternately use the script download-and-build-externals.sh</p>
- <div class="section" id="bullet-physics-library">
- <h3><a class="toc-backref" href="#id3">Bullet Physics Library</a></h3>
- <p>From now on the AnKi requires the Bullet physics library. You need CMake and
- SVN installed.</p>
- <ol class="arabic simple">
- <li>$ Go to the root AnKi path (where src, shaders and blenderscripts are)</li>
- <li>$ cd ..</li>
- <li>$ svn checkout <a class="reference external" href="http://bullet.googlecode.com/svn/trunk/">http://bullet.googlecode.com/svn/trunk/</a> bullet_svn</li>
- <li>$ cd bullet_svn</li>
- <li>$ cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release</li>
- <li>$ make</li>
- </ol>
- </div>
- <div class="section" id="sdl-ver-1-3">
- <h3><a class="toc-backref" href="#id4">SDL ver 1.3</a></h3>
- <p>We need SDL ver 1.3 for creating OpenGL 3.x context. You need to have the
- Mercurial and autoconf installed.</p>
- <ol class="arabic simple">
- <li>$ Go to the root AnKi path (where src, shaders and blenderscripts are)</li>
- <li>$ cd ..</li>
- <li>$ hg clone <a class="reference external" href="http://hg.libsdl.org/SDL">http://hg.libsdl.org/SDL</a> SDL-hg</li>
- <li>$ cd SDL-hg</li>
- <li>$ ./autogen.sh</li>
- <li>$ ./configure</li>
- <li>$ make</li>
- </ol>
- </div>
- <div class="section" id="glew">
- <h3><a class="toc-backref" href="#id5">GLEW</a></h3>
- <p>The latest GLEW provides us with OpenGL 3 and 4 extensions. Needs SVN and a
- Unix environment (for step 5).</p>
- <ol class="arabic simple">
- <li>$ Go to the root AnKi path (where src, shaders and blenderscripts are)</li>
- <li>$ cd ..</li>
- <li>$ svn co <a class="reference external" href="https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew">https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew</a> glew</li>
- <li>$ cd glew</li>
- <li>$ make extensions</li>
- <li>$ make</li>
- </ol>
- </div>
- </div>
- <div class="section" id="generating-makefiles-and-building-anki">
- <h2><a class="toc-backref" href="#id6">Generating makefiles and building AnKi</a></h2>
- <p>There are 4 build targets in this folder. There is also a build system that
- generates GNU makefiles (it requires Python 3 installed). If you want to
- generate the makefile for the debug target (for example) do the following:</p>
- <ol class="arabic simple">
- <li>$ cd <path to anki>/build/debug</li>
- <li>$ ../genmakefile.py</li>
- <li>$ make</li>
- </ol>
- <p>And the build process will begin.</p>
- <p>The gen.cfg.py files contain the build options of every target. Their format
- is pretty straightforward and minimal.</p>
- <p><strong>WARNING</strong>: Sometimes I forget to update all the targets. The debug is always
- updated though.</p>
- </div>
- </div>
- <div class="section" id="generating-source-documentation-doxygen">
- <h1><a class="toc-backref" href="#id7">Generating source documentation (doxygen)</a></h1>
- <p>The AnKi source code uses doxygen style comments inside the source. To generate
- the html documentation from a terminal do:</p>
- <ol class="arabic simple">
- <li>$ cd docs</li>
- <li>$ doxygen doxyfile</li>
- </ol>
- <p>Then open doxygen.html to see it.</p>
- </div>
- <div class="section" id="assets">
- <h1><a class="toc-backref" href="#id8">Assets</a></h1>
- <p>Currently there are no assets (models, textures, materials etc) so even if you
- build it, the application will fail to run.</p>
- </div>
- <div class="section" id="coding-style">
- <h1><a class="toc-backref" href="#id9">Coding style</a></h1>
- <p>Some things to remember while coding AnKi.</p>
- <div class="section" id="classes">
- <h2><a class="toc-backref" href="#id10">Classes</a></h2>
- <p>class</p>
- <p>{</p>
- <blockquote>
- <p>friends</p>
- <p>pre-nested (if necessary)</p>
- <p>nested</p>
- <p>properties</p>
- <p>public</p>
- <p>protected</p>
- <p>private</p>
- </blockquote>
- <p>}</p>
- </div>
- <div class="section" id="material-shader-program-naming">
- <h2><a class="toc-backref" href="#id11">Material shader program naming</a></h2>
- <p>dnspgke:</p>
- <ul class="simple">
- <li>diffuse mapping</li>
- <li>normal mapping</li>
- <li>specular mapping</li>
- <li>parallax mapping</li>
- <li>grass like</li>
- <li>hardware skinning</li>
- <li>environment mapping</li>
- </ul>
- </div>
- <div class="section" id="naming-shortcuts">
- <h2><a class="toc-backref" href="#id12">Naming shortcuts</a></h2>
- <p>This list contains some of the naming shortcuts we use in AnKi:</p>
- <ul class="simple">
- <li>Array : arr</li>
- <li>Animation : anim</li>
- <li>Application : app</li>
- <li>Buffer : buff</li>
- <li>Camera : cam</li>
- <li>Color : col</li>
- <li>Controller : ctrl</li>
- <li>Feature : feat</li>
- <li>Fragment : frag</li>
- <li>Framebuffer Attachable Image : fai</li>
- <li>Geometry : geom</li>
- <li>Location : loc</li>
- <li>Material : mtl</li>
- <li>Matrix : mat</li>
- <li>Number : num</li>
- <li>Physics : phy</li>
- <li>Property : prop</li>
- <li>Quadrilateral : quad</li>
- <li>Quaternion : quat</li>
- <li>Resource : rsrc</li>
- <li>Rotation : rot</li>
- <li>Shader : shdr</li>
- <li>Shader Program : shaderProg or sProg</li>
- <li>Skeletal Animation : sAnim</li>
- <li>Skeleton : skel</li>
- <li>Text : txt</li>
- <li>Texture : tex</li>
- <li>Transformation : trf</li>
- <li>Translation : tsl</li>
- <li>Triangle : tri</li>
- <li>Utility : util</li>
- <li>Variable : var</li>
- <li>Vector : vec</li>
- <li>Vertex : vert</li>
- </ul>
- </div>
- <div class="section" id="controllers">
- <h2><a class="toc-backref" href="#id13">Controllers</a></h2>
- <p>The controllers are part of the scene node objects. They control the node's
- behaviour.</p>
- <p>They have an input (script, animation, etc) and they control a scene node. The
- naming convention of the controllers is:</p>
- <p><what the controller controls><the input of the contoller>Ctrl</p>
- <p>For Example:</p>
- <p>MeshSkelNodeCtrl A Mesh is controlled by a SkelNode</p>
- </div>
- <div class="section" id="submitting-patches">
- <h2><a class="toc-backref" href="#id14">Submitting patches</a></h2>
- <p>If you want to update/patch a file (for example Main.cpp) do:</p>
- <ul class="simple">
- <li>Make the changes on that file</li>
- <li>Save the differences in a file using "svn diff Main.cpp > /tmp/diff"</li>
- <li>E-mail the "diff" file with subject "[PATCH] Main.cpp updates"</li>
- </ul>
- </div>
- </div>
- <div class="section" id="todo-list">
- <h1><a class="toc-backref" href="#id15">ToDo list</a></h1>
- <ul>
- <li><p class="first">Continue working on the new coding style in shaders</p>
- </li>
- <li><p class="first">Changes in the blending objects problem. The BS will become one stage and the
- PPS will be divided in two steps. The first will apply the SSAO and the EdgeAA
- in the IS_FAI and the second will do the rest</p>
- </li>
- <li><p class="first">The second Physics demo: Create a box that is geting moved by the user. It has
- to interact with the other boxes</p>
- </li>
- <li><p class="first">Set the gravity of a certain body to a lower value and see how it behaves</p>
- </li>
- <li><p class="first">In the Ragdoll bullet demo try to change the distances of the bodies</p>
- </li>
- <li><dl class="first docutils">
- <dt>Ask in the bullet forum:</dt>
- <dd><ul class="first last simple">
- <li>How to make floating particles like smoke. But first try with one body and
- manualy setting the gravity</li>
- <li>What the btCollisionObject::setActivationState takes as parameter?</li>
- </ul>
- </dd>
- </dl>
- </li>
- </ul>
- </div>
- </div>
- </body>
- </html>
|