Changeset 68

Show
Ignore:
Timestamp:
05/25/08 15:14:44 (6 months ago)
Author:
JoeCoder
Message:

Lights no longer have to track their own indices, but rather use a self-indexed array.
Better thread synchronization with calculations.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/api/demo1.gameobj.html

    r64 r68  
    106106        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    107107        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    108         on Sat May 17 17:35:22 2008 
     108        on Sun May 25 15:02:03 2008 
    109109 
    110110    </div> 
     
    116116 
    117117    explorer.packageExplorer.addModule("yage.core.array"); 
     118 
     119    explorer.packageExplorer.addModule("yage.core.color"); 
    118120 
    119121    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/demo1.main.html

    r64 r68  
    106106        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    107107        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    108         on Sat May 17 17:35:22 2008 
     108        on Sun May 25 15:02:03 2008 
    109109 
    110110    </div> 
     
    116116 
    117117    explorer.packageExplorer.addModule("yage.core.array"); 
     118 
     119    explorer.packageExplorer.addModule("yage.core.color"); 
    118120 
    119121    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/demo1.ship.html

    r64 r68  
    106106        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    107107        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    108         on Sat May 17 17:35:22 2008 
     108        on Sun May 25 15:02:03 2008 
    109109 
    110110    </div> 
     
    116116 
    117117    explorer.packageExplorer.addModule("yage.core.array"); 
     118 
     119    explorer.packageExplorer.addModule("yage.core.color"); 
    118120 
    119121    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/yage.all.html

    r64 r68  
    110110        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    111111        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    112         on Sat May 17 17:35:21 2008 
     112        on Sun May 25 15:02:03 2008 
    113113 
    114114    </div> 
     
    120120 
    121121    explorer.packageExplorer.addModule("yage.core.array"); 
     122 
     123    explorer.packageExplorer.addModule("yage.core.color"); 
    122124 
    123125    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/yage.core.all.html

    r64 r68  
    111111        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    112112        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    113         on Sat May 17 17:35:21 2008 
     113        on Sun May 25 15:02:03 2008 
    114114 
    115115    </div> 
     
    121121 
    122122    explorer.packageExplorer.addModule("yage.core.array"); 
     123 
     124    explorer.packageExplorer.addModule("yage.core.color"); 
    123125 
    124126    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/yage.core.array.html

    r64 r68  
    105105<dl> 
    106106<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
     107<dt><span class="decl">void  
     108<span class="currsymbol">addSorted</span> 
     109<script type="text/javascript">explorer.outline.addDecl('addSorted');</script> 
     110(T)(ref T[] <span class="funcparam">array</span>, T <span class="funcparam">value</span>, bool <span class="funcparam">increasing</span> = true); 
     111<br>void  
     112<span class="currsymbol">addSorted</span> 
     113<script type="text/javascript">explorer.outline.addDecl('addSorted');</script> 
     114(T,K)(ref T[] <span class="funcparam">array</span>, T <span class="funcparam">value</span>, bool <span class="funcparam">increasing</span>, K delegate(T elem) <span class="funcparam">getKey</span>); 
     115</span></dt> 
     116<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
     117 
     118<dd>Add an element to an already sorted array, maintaining the same sort order. 
     119<br><br> 
     120<b>Params:</b><br> 
     121<table><tr> 
     122<td nowrap valign="top" style="padding-right: 8px">array</td> 
     123 
     124                
     125<td>The array to use.</td></tr> 
     126<tr> 
     127<td nowrap valign="top" style="padding-right: 8px">value</td> 
     128 
     129                
     130<td>Value to add.</td></tr> 
     131<tr> 
     132<td nowrap valign="top" style="padding-right: 8px">increasing</td> 
     133 
     134                
     135<td>The elements are stored in increasing order.</td></tr> 
     136<tr> 
     137<td nowrap valign="top" style="padding-right: 8px">getKey</td> 
     138 
     139                
     140<td>A function to return a key of type K for each element. 
     141                K must be either a primitive type or a type that impelments opCmp. 
     142              Only required for arrays of classes and structs. </td></tr> 
     143</table><br> 
     144 
     145</dd> 
     146 
     147<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    107148<dt><span class="decl">T  
    108149<span class="currsymbol">amax</span> 
     
    132173<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    133174<dt><span class="decl">bool  
    134 <span class="currsymbol">ordered</span> 
    135 <script type="text/javascript">explorer.outline.addDecl('ordered');</script> 
     175<span class="currsymbol">sorted</span> 
     176<script type="text/javascript">explorer.outline.addDecl('sorted');</script> 
    136177(T)(T[] <span class="funcparam">array</span>, bool <span class="funcparam">increasing</span> = true); 
    137178<br>bool  
    138 <span class="currsymbol">ordered</span> 
    139 <script type="text/javascript">explorer.outline.addDecl('ordered');</script> 
    140 (T,K)(T[] <span class="funcparam">array</span>, bool <span class="funcparam">increasing</span> = true, K delegate(T elem) <span class="funcparam">getKey</span> = null); 
     179<span class="currsymbol">sorted</span> 
     180<script type="text/javascript">explorer.outline.addDecl('sorted');</script> 
     181(T,K)(T[] <span class="funcparam">array</span>, bool <span class="funcparam">increasing</span>, K delegate(T elem) <span class="funcparam">getKey</span>); 
    141182</span></dt> 
    142183<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    143184 
    144185<dd>Is the array  
    145 <span class="currsymbol">ordered</span> 
    146 <script type="text/javascript">explorer.outline.addDecl('ordered');</script> 
     186<span class="currsymbol">sorted</span> 
     187<script type="text/javascript">explorer.outline.addDecl('sorted');</script> 
    147188? 
    148189<br><br> 
     
    157198 
    158199                
    159 <td>a function to get a key.</td></tr> 
     200<td>A function to return a key of type K for each element. 
     201          Only required for arrays of classes and structs.</td></tr> 
    160202</table><br> 
    161203<b>Example:</b><br> 
    162204<pre class="d_code"> Timer[] array; 
    163205 <font color=green>// ... fill array with new Timer() ... 
    164 </font> array.<b>ordered</b>(<font color=blue>true</font>, (Timer a) { <font color=blue>return</font> a.get(); }); <font color=green>// should return true 
     206</font> array.<b>sorted</b>(<font color=blue>true</font>, (Timer a) { <font color=blue>return</font> a.get(); }); <font color=green>// should return true 
    165207</font></pre> 
    166208  
     
    288330        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    289331        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    290         on Sat May 17 17:35:21 2008 
     332        on Sun May 25 15:02:03 2008 
    291333 
    292334    </div> 
     
    299341    explorer.packageExplorer.addModule("yage.core.array"); 
    300342 
     343    explorer.packageExplorer.addModule("yage.core.color"); 
     344 
    301345    explorer.packageExplorer.addModule("yage.core.freelist"); 
    302346 
  • trunk/doc/api/yage.core.freelist.html

    r64 r68  
    165165        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    166166        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    167         on Sat May 17 17:35:21 2008 
     167        on Sun May 25 15:02:03 2008 
    168168 
    169169    </div> 
     
    175175 
    176176    explorer.packageExplorer.addModule("yage.core.array"); 
     177 
     178    explorer.packageExplorer.addModule("yage.core.color"); 
    177179 
    178180    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/yage.core.math.html

    r64 r68  
    211211        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    212212        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    213         on Sat May 17 17:35:21 2008 
     213        on Sun May 25 15:02:03 2008 
    214214 
    215215    </div> 
     
    222222    explorer.packageExplorer.addModule("yage.core.array"); 
    223223 
     224    explorer.packageExplorer.addModule("yage.core.color"); 
     225 
    224226    explorer.packageExplorer.addModule("yage.core.freelist"); 
    225227 
  • trunk/doc/api/yage.core.matrix.html

    r64 r68  
    832832        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    833833        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    834         on Sat May 17 17:35:21 2008 
     834        on Sun May 25 15:02:03 2008 
    835835 
    836836    </div> 
     
    843843    explorer.packageExplorer.addModule("yage.core.array"); 
    844844 
     845    explorer.packageExplorer.addModule("yage.core.color"); 
     846 
    845847    explorer.packageExplorer.addModule("yage.core.freelist"); 
    846848 
  • trunk/doc/api/yage.core.misc.html

    r64 r68  
    128128<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    129129 
    130 <dd><br><br> 
     130<dd>Probaly won't work on multicore machines. 
     131<br><br> 
     132 
    131133</dd> 
    132134 
     
    139141<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    140142 
    141 <dd>Print out the bools that make <span class="funcparam">a</span> 32-bool number 
     143<dd>Print out the bits that make <span class="funcparam">a</span> 32-bit number 
    142144<br><br> 
    143145 
     
    157159        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    158160        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    159         on Sat May 17 17:35:21 2008 
     161        on Sun May 25 15:02:03 2008 
    160162 
    161163    </div> 
     
    167169 
    168170    explorer.packageExplorer.addModule("yage.core.array"); 
     171 
     172    explorer.packageExplorer.addModule("yage.core.color"); 
    169173 
    170174    explorer.packageExplorer.addModule("yage.core.freelist"); 
  • trunk/doc/api/yage.core.parse.html

    r64 r68  
    222222        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    223223        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    224         on Sat May 17 17:35:21 2008 
     224        on Sun May 25 15:02:03 2008 
    225225 
    226226    </div> 
     
    233233    explorer.packageExplorer.addModule("yage.core.array"); 
    234234 
     235    explorer.packageExplorer.addModule("yage.core.color"); 
     236 
    235237    explorer.packageExplorer.addModule("yage.core.freelist"); 
    236238 
  • trunk/doc/api/yage.core.plane.html

    r64 r68  
    278278        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    279279        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    280         on Sat May 17 17:35:21 2008 
     280        on Sun May 25 15:02:03 2008 
    281281 
    282282    </div> 
     
    289289    explorer.packageExplorer.addModule("yage.core.array"); 
    290290 
     291    explorer.packageExplorer.addModule("yage.core.color"); 
     292 
    291293    explorer.packageExplorer.addModule("yage.core.freelist"); 
    292294 
  • trunk/doc/api/yage.core.quatrn.html

    r64 r68  
    471471        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    472472        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    473         on Sat May 17 17:35:21 2008 
     473        on Sun May 25 15:02:03 2008 
    474474 
    475475    </div> 
     
    482482    explorer.packageExplorer.addModule("yage.core.array"); 
    483483 
     484    explorer.packageExplorer.addModule("yage.core.color"); 
     485 
    484486    explorer.packageExplorer.addModule("yage.core.freelist"); 
    485487 
  • trunk/doc/api/yage.core.repeater.html

    r64 r68  
    219219        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    220220        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    221         on Sat May 17 17:35:21 2008 
     221        on Sun May 25 15:02:03 2008 
    222222 
    223223    </div> 
     
    230230    explorer.packageExplorer.addModule("yage.core.array"); 
    231231 
     232    explorer.packageExplorer.addModule("yage.core.color"); 
     233 
    232234    explorer.packageExplorer.addModule("yage.core.freelist"); 
    233235 
  • trunk/doc/api/yage.core.timer.html

    r64 r68  
    255255        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    256256        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    257         on Sat May 17 17:35:21 2008 
     257        on Sun May 25 15:02:03 2008 
    258258 
    259259    </div> 
     
    266266    explorer.packageExplorer.addModule("yage.core.array"); 
    267267 
     268    explorer.packageExplorer.addModule("yage.core.color"); 
     269 
    268270    explorer.packageExplorer.addModule("yage.core.freelist"); 
    269271 
  • trunk/doc/api/yage.core.types.html

    r64 r68  
    9292<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    9393<dt><span class="decl">struct  
    94 <span class="currsymbol">Color</span> 
    95 <script type="text/javascript">explorer.outline.addDecl('Color');</script> 
    96 ; 
    97 </span></dt> 
    98 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    99  
    100 <dd>A struct used to represent a color. 
    101  Colors are represented in RGBA format. 
    102  Note that uints and dwords store the bytes in reverse, 
    103  so  
    104 <span class="currsymbol">Color</span> 
    105 <script type="text/javascript">explorer.outline.addDecl('Color');</script> 
    106 (0x6633ff00).hex == "00FF3366" 
    107  All Colors default to transparent black. 
    108 <br><br> 
    109 <b>Example:</b><br> 
    110 <pre class="d_code"> <font color=blue>uint</font>  red  = <b>Color</b>(<span style="color: purple">"red"</span>).ui; 
    111  Vec4f blue = <b>Color</b>(<span style="color: purple">"0000FF"</span>).vec4f; 
    112  writefln(<b>Color</b>(<span style="color: purple">"blue"</span>));      <font color=green>// outputs "0000FF00" 
    113 </font> writefln(<b>Color</b>(0x00FF0000));  <font color=green>// outputs "0000FF00" 
    114 </font></pre> 
    115   
    116 <br><br> 
    117  
    118  
    119 <script type="text/javascript">explorer.outline.incSymbolLevel();</script> 
    120 <dl> 
    121 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    122 <dt><span class="decl">ubyte[4u]  
    123 <span class="currsymbol">ub</span> 
    124 <script type="text/javascript">explorer.outline.addDecl('ub');</script> 
    125 ; 
    126 </span></dt> 
    127 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    128  
    129 <dd>Get the Color as an array of ubyte 
    130 <br><br> 
    131  
    132 </dd> 
    133  
    134 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    135 <dt><span class="decl">uint  
    136 <span class="currsymbol">ui</span> 
    137 <script type="text/javascript">explorer.outline.addDecl('ui');</script> 
    138 ; 
    139 </span></dt> 
    140 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    141  
    142 <dd>Get the Color as a uint      
    143 <br><br> 
    144  
    145 </dd> 
    146  
    147 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    148 <dt><span class="decl">dword  
    149 <span class="currsymbol">dw</span> 
    150 <script type="text/javascript">explorer.outline.addDecl('dw');</script> 
    151 ; 
    152 </span></dt> 
    153 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    154  
    155 <dd>Get the Color as a dword 
    156 <br><br> 
    157  
    158 </dd> 
    159  
    160 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    161 <dt><span class="decl">ubyte  
    162 <span class="currsymbol">r</span> 
    163 <script type="text/javascript">explorer.outline.addDecl('r');</script> 
    164 ; 
    165 </span></dt> 
    166 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    167  
    168 <dd>Access each color component. 
    169 <br><br> 
    170  
    171 </dd> 
    172  
    173 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    174 <dt><span class="decl">ubyte  
    175 <span class="currsymbol">g</span> 
    176 <script type="text/javascript">explorer.outline.addDecl('g');</script> 
    177 ; 
    178 </span></dt> 
    179 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    180  
    181 <dd>Access each color component. 
    182 <br><br> 
    183  
    184 </dd> 
    185  
    186 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    187 <dt><span class="decl">ubyte  
    188 <span class="currsymbol">b</span> 
    189 <script type="text/javascript">explorer.outline.addDecl('b');</script> 
    190 ; 
    191 </span></dt> 
    192 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    193  
    194 <dd>Access each color component. 
    195 <br><br> 
    196  
    197 </dd> 
    198  
    199 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    200 <dt><span class="decl">ubyte  
    201 <span class="currsymbol">a</span> 
    202 <script type="text/javascript">explorer.outline.addDecl('a');</script> 
    203 ; 
    204 </span></dt> 
    205 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    206  
    207 <dd>Access each color component. 
    208 <br><br> 
    209  
    210 </dd> 
    211  
    212 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    213 <dt><span class="decl">static Color  
    214 <span class="currsymbol">opCall</span> 
    215 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    216 (int <span class="funcparam">r</span>, int <span class="funcparam">g</span>, int <span class="funcparam">b</span>, int <span class="funcparam">a</span> = 255); 
    217 <br>static Color  
    218 <span class="currsymbol">opCall</span> 
    219 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    220 (float <span class="funcparam">r</span>, float <span class="funcparam">g</span>, float <span class="funcparam">b</span>, float <span class="funcparam">a</span> = cast(float)1); 
    221 </span></dt> 
    222 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    223  
    224 <dd>Initialize 
    225 <br><br> 
    226  
    227 </dd> 
    228  
    229 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    230 <dt><span class="decl">static Color  
    231 <span class="currsymbol">opCall</span> 
    232 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    233 (dword <span class="funcparam">dw</span>); 
    234 </span></dt> 
    235 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    236  
    237 <dd>Convert dword to Color 
    238 <br><br> 
    239  
    240 </dd> 
    241  
    242 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    243 <dt><span class="decl">static Color  
    244 <span class="currsymbol">opCall</span> 
    245 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    246 (uint <span class="funcparam">ui</span>); 
    247 </span></dt> 
    248 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    249  
    250 <dd>Convert uint to Color 
    251 <br><br> 
    252  
    253 </dd> 
    254  
    255 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    256 <dt><span class="decl">static Color  
    257 <span class="currsymbol">opCall</span> 
    258 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    259 (ubyte[] <span class="funcparam">v</span>); 
    260 </span></dt> 
    261 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    262  
    263 <dd>Convert ubyte[] to Color 
    264 <br><br> 
    265  
    266 </dd> 
    267  
    268 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    269 <dt><span class="decl">static Color  
    270 <span class="currsymbol">opCall</span> 
    271 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    272 (int[] <span class="funcparam">v</span>); 
    273 </span></dt> 
    274 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    275  
    276 <dd>Convert int[] to Color 
    277 <br><br> 
    278  
    279 </dd> 
    280  
    281 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    282 <dt><span class="decl">static Color  
    283 <span class="currsymbol">opCall</span> 
    284 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    285 (float[] <span class="funcparam">f</span>); 
    286 </span></dt> 
    287 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    288  
    289 <dd>Convert float[] to Color 
    290 <br><br> 
    291  
    292 </dd> 
    293  
    294 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    295 <dt><span class="decl">static Color  
    296 <span class="currsymbol">opCall</span> 
    297 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    298 (Vec3f <span class="funcparam">v</span>); 
    299 </span></dt> 
    300 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    301  
    302 <dd>Convert Vec3f to Color 
    303 <br><br> 
    304  
    305 </dd> 
    306  
    307 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    308 <dt><span class="decl">static Color  
    309 <span class="currsymbol">opCall</span> 
    310 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    311 (Vec!(float,4) <span class="funcparam">v</span>); 
    312 </span></dt> 
    313 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    314  
    315 <dd>Convert Vec4f to Color 
    316 <br><br> 
    317  
    318 </dd> 
    319  
    320 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    321 <dt><span class="decl">static Color  
    322 <span class="currsymbol">opCall</span> 
    323 <script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    324 (char[] <span class="funcparam">string</span>); 
    325 </span></dt> 
    326 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    327  
    328 <dd>Convert a <span class="funcparam">string</span> to a color. 
    329  The <span class="funcparam">string</span> can be a 6 or 8 digit hexadecimal or an English color name. 
    330  Black, blue, brown, cyan, gold, gray/grey, green, indigo, magenta, orange, 
    331  pink, purple, red, violet, white, and yellow are supported. 
    332 <br><br> 
    333 <b>See:</b><br> 
    334 <a href="http://www.w3schools.com/css/css_colornames.asp">CSS color names</a> 
    335 <br><br> 
    336 <b>Params:</b><br> 
    337 <table><tr> 
    338 <td nowrap valign="top" style="padding-right: 8px">char[] <span class="funcparam">string</span></td> 
    339  
    340                 
    341 <td>The <span class="funcparam">string</span> to convert.</td></tr> 
    342 </table><br> 
    343  
    344 </dd> 
    345  
    346 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    347 <dt><span class="decl">float[]  
    348 <span class="currsymbol">f</span> 
    349 <script type="text/javascript">explorer.outline.addDecl('f');</script> 
    350 (); 
    351 </span></dt> 
    352 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    353  
    354 <dd>Get the Color as an array of float. 
    355 <br><br> 
    356  
    357 </dd> 
    358  
    359 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    360 <dt><span class="decl">Vec3f  
    361 <span class="currsymbol">vec3f</span> 
    362 <script type="text/javascript">explorer.outline.addDecl('vec3f');</script> 
    363 (); 
    364 </span></dt> 
    365 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    366  
    367 <dd>Get the Color as a Vec3f. 
    368 <br><br> 
    369  
    370 </dd> 
    371  
    372 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    373 <dt><span class="decl">Vec!(float,4)  
    374 <span class="currsymbol">vec4f</span> 
    375 <script type="text/javascript">explorer.outline.addDecl('vec4f');</script> 
    376 (); 
    377 </span></dt> 
    378 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    379  
    380 <dd>Get the Color as a Vec4f. 
    381 <br><br> 
    382  
    383 </dd> 
    384  
    385 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    386 <dt><span class="decl">char[]  
    387 <span class="currsymbol">hex</span> 
    388 <script type="text/javascript">explorer.outline.addDecl('hex');</script> 
    389 (bool <span class="funcparam">lower</span> = false); 
    390 <br>char[]  
    391 <span class="currsymbol">toString</span> 
    392 <script type="text/javascript">explorer.outline.addDecl('toString');</script> 
    393 (); 
    394 </span></dt> 
    395 <script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    396  
    397 <dd>Get the color as a string. 
    398 <br><br> 
    399 <b>Params:</b><br> 
    400 <table><tr> 
    401 <td nowrap valign="top" style="padding-right: 8px">bool <span class="funcparam">lower</span></td> 
    402  
    403                 
    404 <td>return <span class="funcparam">lower</span> case hexadecimal digits</td></tr> 
    405 </table><br> 
    406  
    407 </dd> 
    408 </dl> 
    409 <script type="text/javascript">explorer.outline.decSymbolLevel();</script> 
    410  
    411  
    412 </dd> 
    413  
    414 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    415 <dt><span class="decl">struct  
    41694<span class="currsymbol">word</span> 
    41795<script type="text/javascript">explorer.outline.addDecl('word');</script> 
     
    662340        Documentation generated with <a href="http://www.dsource.org/projects/helix/wiki/CandyDoc"> 
    663341        <img src="img/candydoc.gif" alt="CandyDoc" style="vertical-align:middle; top:-1px"></a> 
    664         on Sat May 17 17:35:21 2008 
     342        on Sun May 25 15:02:03 2008 
    665343 
    666344    </div> 
     
    673351    explorer.packageExplorer.addModule("yage.core.array"); 
    674352 
     353    explorer.packageExplorer.addModule("yage.core.color"); 
     354 
    675355    explorer.packageExplorer.addModule("yage.core.freelist"); 
    676356 
  • trunk/doc/api/yage.core.vector.html

    r64 r68  
    9494<span class="currsymbol">Vec</span> 
    9595<script type="text/javascript">explorer.outline.addDecl('Vec');</script> 
    96 (T,int K); 
     96(int S,T); 
    9797</span></dt> 
    9898<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
     
    106106<br><br> 
    107107<b>Example:</b><br> 
    108 <pre class="d_code"> <b>Vec</b>!(<font color=blue>real</font>, 4) a; <font color=green>// a is a four-component real vector. 
     108<pre class="d_code"> <b>Vec</b>!(4, <font color=blue>real</font>) a; <font color=green>// a is a four-component real vector. 
    109109</font></pre> 
    110110<br><br> 
     
    114114<dl> 
    115115<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    116 <dt><span class="decl">VTK  
     116<dt><span class="decl">VST  
    117117<span class="currsymbol">opCall</span> 
    118118<script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
     
    127127 
    128128<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    129 <dt><span class="decl">VTK  
     129<dt><span class="decl">VST  
    130130<span class="currsymbol">opCall</span> 
    131131<script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
     
    140140 
    141141<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    142 <dt><span class="decl">VTK  
     142<dt><span class="decl">VST  
    143143<span class="currsymbol">opCall</span> 
    144144<script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
    145 (T[K] <span class="funcparam">s</span>...); 
     145(T[S] <span class="funcparam">s</span>...); 
    146146</span></dt> 
    147147<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
     
    153153 
    154154<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    155 <dt><span class="decl">VTK  
     155<dt><span class="decl">VST  
    156156<span class="currsymbol">opCall</span> 
    157157<script type="text/javascript">explorer.outline.addDecl('opCall');</script> 
     
    160160<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    161161 
    162 <dd>Create a new vector with the values of <span class="funcparam">s</span>; <span class="funcparam">s</span> must be at least of length K
    163 <br><br> 
    164  
    165 </dd> 
    166  
    167 <script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    168 <dt><span class="decl">VTK  
     162<dd>Create a new vector with the values of <span class="funcparam">s</span>; <span class="funcparam">s</span> must be at least of length S
     163<br><br> 
     164 
     165</dd> 
     166 
     167<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
     168<dt><span class="decl">VST  
    169169<span class="currsymbol">add</span> 
    170170<script type="text/javascript">explorer.outline.addDecl('add');</script> 
    171 (VTK <span class="funcparam">s</span>); 
     171(VST <span class="funcparam">s</span>); 
    172172</span></dt> 
    173173<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
     
    180180<span class="currsymbol">angle</span> 
    181181<script type="text/javascript">explorer.outline.addDecl('angle');</script> 
    182 (VTK <span class="funcparam">s</span>); 
     182(VST <span class="funcparam">s</span>); 
    183183</span></dt> 
    184184<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
     
    190190 
    191191<script type="text/javascript">explorer.outline.writeEnabled = true;</script> 
    192 <dt><span class="decl">VTK  
     192<dt><span class="decl">VST  
    193193<span class="currsymbol">clamp</span> 
    194194<script type="text/javascript">explorer.outline.addDecl('clamp');</script> 
     
    197197<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    198198 
    199 <dd><br><br> 
     199<dd>Clamp all values between <span class="funcparam">min</span> and <span class="funcparam">max</span>. 
     200<br><br> 
     201 
    200202</dd> 
    201203 
     
    204206<span class="currsymbol">dot</span> 
    205207<script type="text/javascript">explorer.outline.addDecl('dot');</script> 
    206 (VTK <span class="funcparam">s</span>); 
     208(VST <span class="funcparam">s</span>); 
    207209</span></dt> 
    208210<script type="text/javascript">explorer.outline.writeEnabled = false;</script> 
    &helli