Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1097

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csTextureTrans Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</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="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>csTextureTrans Class Reference<br>
<small>
[<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small>
</h1><!-- doxytag: class="csTextureTrans" -->This is a static class which encapsulates a few functions that can transform texture information into a texture matrix/vector.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="textrans_8h-source.html">csgeom/textrans.h</a>&gt;</code>
<p>

<p>
<a href="classcsTextureTrans-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTextureTrans.html#1715ed67908eabf71e639aa114611711">compute_texture_space</a> (<a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;m, <a class="el" href="classcsVector3.html">csVector3</a> &amp;v, float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv, float xw, float yw, float zw)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The most general function.  <a href="#1715ed67908eabf71e639aa114611711"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTextureTrans.html#a2933588aa2ac954a7ab4dfadcf2454e">compute_texture_space</a> (<a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;m, <a class="el" href="classcsVector3.html">csVector3</a> &amp;v, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v_orig, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v_u, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v_v)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Similar to the previous function but treat as if the lengths are set to 1.  <a href="#a2933588aa2ac954a7ab4dfadcf2454e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTextureTrans.html#f478fe5c7fb6565d6cf63cc5473c5e03">compute_texture_space</a> (<a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;m, <a class="el" href="classcsVector3.html">csVector3</a> &amp;v, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v_orig, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v1, float len1, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v2, float len2)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use 'v1' and 'len1' for the u-axis and 'v2' and 'len2' for the v-axis.  <a href="#f478fe5c7fb6565d6cf63cc5473c5e03"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTextureTrans.html#e9b6598285146e7ee9e75e159c033781">compute_texture_space</a> (<a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;m, <a class="el" href="classcsVector3.html">csVector3</a> &amp;v, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v_orig, const <a class="el" href="classcsVector3.html">csVector3</a> &amp;v1, float len1, float A, float B, float C)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the matrix using two vertices (which are preferably on the plane of the polygon and are possibly (but not necessarily) two vertices of the polygon).  <a href="#e9b6598285146e7ee9e75e159c033781"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is a static class which encapsulates a few functions that can transform texture information into a texture matrix/vector. 
<p>
This class makes it easiers to define textures for polygons given various things. 
<p>Definition at line <a class="el" href="textrans_8h-source.html#l00040">40</a> of file <a class="el" href="textrans_8h-source.html">textrans.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1715ed67908eabf71e639aa114611711"></a><!-- doxytag: member="csTextureTrans::compute_texture_space" ref="1715ed67908eabf71e639aa114611711" args="(csMatrix3 &amp;m, csVector3 &amp;v, float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv, float xw, float yw, float zw)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csTextureTrans::compute_texture_space           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>xo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>yo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>zo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>xu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>yu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>zu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>xv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>yv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>zv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>xw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>yw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>zw</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The most general function. 
<p>
With these you provide the matrix directly. 
</div>
</div><p>
<a class="anchor" name="a2933588aa2ac954a7ab4dfadcf2454e"></a><!-- doxytag: member="csTextureTrans::compute_texture_space" ref="a2933588aa2ac954a7ab4dfadcf2454e" args="(csMatrix3 &amp;m, csVector3 &amp;v, const csVector3 &amp;v_orig, const csVector3 &amp;v_u, const csVector3 &amp;v_v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csTextureTrans::compute_texture_space           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v_orig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v_u</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v_v</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Similar to the previous function but treat as if the lengths are set to 1. 
<p>

</div>
</div><p>
<a class="anchor" name="f478fe5c7fb6565d6cf63cc5473c5e03"></a><!-- doxytag: member="csTextureTrans::compute_texture_space" ref="f478fe5c7fb6565d6cf63cc5473c5e03" args="(csMatrix3 &amp;m, csVector3 &amp;v, const csVector3 &amp;v_orig, const csVector3 &amp;v1, float len1, const csVector3 &amp;v2, float len2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csTextureTrans::compute_texture_space           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v_orig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>len1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>len2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Use 'v1' and 'len1' for the u-axis and 'v2' and 'len2' for the v-axis. 
<p>
Otherwise this function is the same as the previous one. 
</div>
</div><p>
<a class="anchor" name="e9b6598285146e7ee9e75e159c033781"></a><!-- doxytag: member="csTextureTrans::compute_texture_space" ref="e9b6598285146e7ee9e75e159c033781" args="(csMatrix3 &amp;m, csVector3 &amp;v, const csVector3 &amp;v_orig, const csVector3 &amp;v1, float len1, float A, float B, float C)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csTextureTrans::compute_texture_space           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsMatrix3.html">csMatrix3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v_orig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classcsVector3.html">csVector3</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>v1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>len1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>B</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>C</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculate the matrix using two vertices (which are preferably on the plane of the polygon and are possibly (but not necessarily) two vertices of the polygon). 
<p>
The first vertex is seen as the origin and the second as the u-axis of the texture space coordinate system. The v-axis is calculated on the plane of the polygon and orthogonal to the given u-axis. The length of the u-axis and the v-axis is given as the 'len1' parameter.<p>
For example, if 'len1' is equal to 2 this means that texture will be tiled exactly two times between vertex 'v_orig' and 'v1'. I hope this explanation is clear since I can't seem to make it any clearer :-) 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csgeom/<a class="el" href="textrans_8h-source.html">textrans.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>