~ubuntu-branches/ubuntu/karmic/gimp/karmic-updates

« back to all changes in this revision

Viewing changes to devel-docs/libgimpmath/html/libgimpmath-GimpVector.html

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-08-31 10:24:10 UTC
  • mfrom: (1.1.21 upstream) (0.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090831102410-eqawgw6fhdyi91ee
Tags: 2.6.7-1ubuntu1
* Merge with Debian unstable (LP: #419593), remaining changes:
  - debian/patches/02_help-message.patch,
    debian/patches/03_gimp.desktop.in.in.patch:
    + updated some strings for ubuntu
  - debian/rules:
    + updated translation templates
  - debian/control:
    + Drop webkit build dependency. gimp is the only thing pulling in webkit
      for the desktop CDs, and makes them explode. Without the webkit help
      browser plugin, help will just be displayed in the default browser.
* debian/patches/01_debian-gimprc.patch:
  - Updated
* debian/control:
  - Added a BZR link

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GimpVector</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GIMP Math Library Reference Manual">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
7
<link rel="home" href="index.html" title="GIMP Math Library Reference Manual">
8
8
<link rel="up" href="libgimpmath.html" title="Part I. GIMP Math Library">
9
9
<link rel="prev" href="libgimpmath-GimpMatrix.html" title="GimpMatrix">
10
10
<link rel="next" href="libgimpmath-GimpMD5.html" title="GimpMD5">
11
 
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="libgimpmath.html" title="Part I. GIMP Math Library">
14
14
<link rel="index" href="libgimpmath-index.html" title="Index">
26
26
<th width="100%" align="center">GIMP Math Library Reference Manual</th>
27
27
<td><a accesskey="n" href="libgimpmath-GimpMD5.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
28
28
</tr>
29
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#libgimpmath-GimpVector.synopsis" class="shortcut">Top</a>
30
 
                   | 
31
 
                  <a href="#libgimpmath-GimpVector.description" class="shortcut">Description</a></nobr></td></tr>
 
29
<tr><td colspan="5" class="shortcuts">
 
30
<a href="#libgimpmath-GimpVector.synopsis" class="shortcut">Top</a>
 
31
                 | 
 
32
                <a href="#libgimpmath-GimpVector.description" class="shortcut">Description</a>
 
33
</td></tr>
32
34
</table>
33
 
<div class="refentry" lang="en">
 
35
<div class="refentry" title="GimpVector">
34
36
<a name="libgimpmath-GimpVector"></a><div class="titlepage"></div>
35
37
<div class="refnamediv"><table width="100%"><tr>
36
38
<td valign="top">
39
41
</td>
40
42
<td valign="top" align="right"></td>
41
43
</tr></table></div>
42
 
<div class="refsynopsisdiv">
 
44
<div class="refsynopsisdiv" title="Synopsis">
43
45
<a name="libgimpmath-GimpVector.synopsis"></a><h2>Synopsis</h2>
44
46
<pre class="synopsis">
45
47
                    <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>;
247
249
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *p);
248
250
</pre>
249
251
</div>
250
 
<div class="refsect1" lang="en">
 
252
<div class="refsect1" title="Description">
251
253
<a name="libgimpmath-GimpVector.description"></a><h2>Description</h2>
252
254
<p>
253
255
Utilities to set up and manipulate vectors.
254
 
 
255
256
</p>
256
257
</div>
257
 
<div class="refsect1" lang="en">
 
258
<div class="refsect1" title="Details">
258
259
<a name="libgimpmath-GimpVector.details"></a><h2>Details</h2>
259
 
<div class="refsect2" lang="en">
 
260
<div class="refsect2" title="GimpVector2">
260
261
<a name="GimpVector2"></a><h3>GimpVector2</h3>
261
262
<pre class="programlisting">typedef struct {
262
263
  gdouble x, y;
267
268
</p>
268
269
</div>
269
270
<hr>
270
 
<div class="refsect2" lang="en">
 
271
<div class="refsect2" title="GimpVector3">
271
272
<a name="GimpVector3"></a><h3>GimpVector3</h3>
272
273
<pre class="programlisting">typedef struct {
273
274
  gdouble x, y, z;
278
279
</p>
279
280
</div>
280
281
<hr>
281
 
<div class="refsect2" lang="en">
 
282
<div class="refsect2" title="GimpVector4">
282
283
<a name="GimpVector4"></a><h3>GimpVector4</h3>
283
284
<pre class="programlisting">typedef struct {
284
285
  gdouble x, y, z, w;
289
290
</p>
290
291
</div>
291
292
<hr>
292
 
<div class="refsect2" lang="en">
 
293
<div class="refsect2" title="gimp_vector2_new ()">
293
294
<a name="gimp-vector2-new"></a><h3>gimp_vector2_new ()</h3>
294
295
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_new                    (<a
295
296
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
300
301
<p>
301
302
Creates a <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2"><span class="type">GimpVector2</span></a> of coordinates <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.</p>
302
303
<p>
303
 
 
304
304
</p>
305
305
<div class="variablelist"><table border="0">
306
306
<col align="left" valign="top">
324
324
</table></div>
325
325
</div>
326
326
<hr>
327
 
<div class="refsect2" lang="en">
 
327
<div class="refsect2" title="gimp_vector2_set ()">
328
328
<a name="gimp-vector2-set"></a><h3>gimp_vector2_set ()</h3>
329
329
<pre class="programlisting">void                gimp_vector2_set                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector,
330
330
                                                         <a
336
336
<p>
337
337
Sets the X and Y coordinates of <em class="parameter"><code>vector</code></em> to <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.</p>
338
338
<p>
339
 
 
340
339
</p>
341
340
<div class="variablelist"><table border="0">
342
341
<col align="left" valign="top">
360
359
</table></div>
361
360
</div>
362
361
<hr>
363
 
<div class="refsect2" lang="en">
 
362
<div class="refsect2" title="gimp_vector2_length ()">
364
363
<a name="gimp-vector2-length"></a><h3>gimp_vector2_length ()</h3>
365
364
<pre class="programlisting"><a
366
365
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
368
367
<p>
369
368
Computes the length of a 2D vector.</p>
370
369
<p>
371
 
 
372
370
</p>
373
371
<div class="variablelist"><table border="0">
374
372
<col align="left" valign="top">
387
385
</table></div>
388
386
</div>
389
387
<hr>
390
 
<div class="refsect2" lang="en">
 
388
<div class="refsect2" title="gimp_vector2_length_val ()">
391
389
<a name="gimp-vector2-length-val"></a><h3>gimp_vector2_length_val ()</h3>
392
390
<pre class="programlisting"><a
393
391
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
396
394
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-length" title="gimp_vector2_length ()"><code class="function">gimp_vector2_length()</code></a> but the
397
395
vector is passed by value rather than by reference.</p>
398
396
<p>
399
 
 
400
397
</p>
401
398
<div class="variablelist"><table border="0">
402
399
<col align="left" valign="top">
415
412
</table></div>
416
413
</div>
417
414
<hr>
418
 
<div class="refsect2" lang="en">
 
415
<div class="refsect2" title="gimp_vector2_mul ()">
419
416
<a name="gimp-vector2-mul"></a><h3>gimp_vector2_mul ()</h3>
420
417
<pre class="programlisting">void                gimp_vector2_mul                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector,
421
418
                                                         <a
425
422
Multiplies each component of the <em class="parameter"><code>vector</code></em> by <em class="parameter"><code>factor</code></em>. Note that this
426
423
is equivalent to multiplying the vectors length by <em class="parameter"><code>factor</code></em>.</p>
427
424
<p>
428
 
 
429
425
</p>
430
426
<div class="variablelist"><table border="0">
431
427
<col align="left" valign="top">
444
440
</table></div>
445
441
</div>
446
442
<hr>
447
 
<div class="refsect2" lang="en">
 
443
<div class="refsect2" title="gimp_vector2_mul_val ()">
448
444
<a name="gimp-vector2-mul-val"></a><h3>gimp_vector2_mul_val ()</h3>
449
445
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_mul_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector,
450
446
                                                         <a
454
450
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-mul" title="gimp_vector2_mul ()"><code class="function">gimp_vector2_mul()</code></a> but the vector is
455
451
passed by value rather than by reference.</p>
456
452
<p>
457
 
 
458
453
</p>
459
454
<div class="variablelist"><table border="0">
460
455
<col align="left" valign="top">
478
473
</table></div>
479
474
</div>
480
475
<hr>
481
 
<div class="refsect2" lang="en">
 
476
<div class="refsect2" title="gimp_vector2_normalize ()">
482
477
<a name="gimp-vector2-normalize"></a><h3>gimp_vector2_normalize ()</h3>
483
478
<pre class="programlisting">void                gimp_vector2_normalize              (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector);</pre>
484
479
<p>
485
480
Normalizes the <em class="parameter"><code>vector</code></em> so the length of the <em class="parameter"><code>vector</code></em> is 1.0. The nul
486
481
vector will not be changed.</p>
487
482
<p>
488
 
 
489
483
</p>
490
484
<div class="variablelist"><table border="0">
491
485
<col align="left" valign="top">
497
491
</table></div>
498
492
</div>
499
493
<hr>
500
 
<div class="refsect2" lang="en">
 
494
<div class="refsect2" title="gimp_vector2_normalize_val ()">
501
495
<a name="gimp-vector2-normalize-val"></a><h3>gimp_vector2_normalize_val ()</h3>
502
496
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_normalize_val          (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector);</pre>
503
497
<p>
504
498
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-normalize" title="gimp_vector2_normalize ()"><code class="function">gimp_vector2_normalize()</code></a> but the
505
499
vector is passed by value rather than by reference.</p>
506
500
<p>
507
 
 
508
501
</p>
509
502
<div class="variablelist"><table border="0">
510
503
<col align="left" valign="top">
524
517
</table></div>
525
518
</div>
526
519
<hr>
527
 
<div class="refsect2" lang="en">
 
520
<div class="refsect2" title="gimp_vector2_neg ()">
528
521
<a name="gimp-vector2-neg"></a><h3>gimp_vector2_neg ()</h3>
529
522
<pre class="programlisting">void                gimp_vector2_neg                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector);</pre>
530
523
<p>
531
524
Negates the <em class="parameter"><code>vector</code></em> (i.e. negate all its coordinates).</p>
532
525
<p>
533
 
 
534
526
</p>
535
527
<div class="variablelist"><table border="0">
536
528
<col align="left" valign="top">
542
534
</table></div>
543
535
</div>
544
536
<hr>
545
 
<div class="refsect2" lang="en">
 
537
<div class="refsect2" title="gimp_vector2_neg_val ()">
546
538
<a name="gimp-vector2-neg-val"></a><h3>gimp_vector2_neg_val ()</h3>
547
539
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_neg_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector);</pre>
548
540
<p>
549
541
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-neg" title="gimp_vector2_neg ()"><code class="function">gimp_vector2_neg()</code></a> but the vector
550
542
is passed by value rather than by reference.</p>
551
543
<p>
552
 
 
553
544
</p>
554
545
<div class="variablelist"><table border="0">
555
546
<col align="left" valign="top">
568
559
</table></div>
569
560
</div>
570
561
<hr>
571
 
<div class="refsect2" lang="en">
 
562
<div class="refsect2" title="gimp_vector2_add ()">
572
563
<a name="gimp-vector2-add"></a><h3>gimp_vector2_add ()</h3>
573
564
<pre class="programlisting">void                gimp_vector2_add                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *result,
574
565
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector1,
577
568
Computes the sum of two 2D vectors. The resulting <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2"><span class="type">GimpVector2</span></a> is
578
569
stored in <em class="parameter"><code>result</code></em>.</p>
579
570
<p>
580
 
 
581
571
</p>
582
572
<div class="variablelist"><table border="0">
583
573
<col align="left" valign="top">
601
591
</table></div>
602
592
</div>
603
593
<hr>
604
 
<div class="refsect2" lang="en">
 
594
<div class="refsect2" title="gimp_vector2_add_val ()">
605
595
<a name="gimp-vector2-add-val"></a><h3>gimp_vector2_add_val ()</h3>
606
596
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_add_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector1,
607
597
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector2);</pre>
609
599
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-add" title="gimp_vector2_add ()"><code class="function">gimp_vector2_add()</code></a> but the vectors
610
600
are passed by value rather than by reference.</p>
611
601
<p>
612
 
 
613
602
</p>
614
603
<div class="variablelist"><table border="0">
615
604
<col align="left" valign="top">
633
622
</table></div>
634
623
</div>
635
624
<hr>
636
 
<div class="refsect2" lang="en">
 
625
<div class="refsect2" title="gimp_vector2_sub ()">
637
626
<a name="gimp-vector2-sub"></a><h3>gimp_vector2_sub ()</h3>
638
627
<pre class="programlisting">void                gimp_vector2_sub                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *result,
639
628
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector1,
642
631
Computes the difference of two 2D vectors (<em class="parameter"><code>vector1</code></em> minus <em class="parameter"><code>vector2</code></em>).
643
632
The resulting <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2"><span class="type">GimpVector2</span></a> is stored in <em class="parameter"><code>result</code></em>.</p>
644
633
<p>
645
 
 
646
634
</p>
647
635
<div class="variablelist"><table border="0">
648
636
<col align="left" valign="top">
666
654
</table></div>
667
655
</div>
668
656
<hr>
669
 
<div class="refsect2" lang="en">
 
657
<div class="refsect2" title="gimp_vector2_sub_val ()">
670
658
<a name="gimp-vector2-sub-val"></a><h3>gimp_vector2_sub_val ()</h3>
671
659
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_sub_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector1,
672
660
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector2);</pre>
674
662
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-sub" title="gimp_vector2_sub ()"><code class="function">gimp_vector2_sub()</code></a> but the vectors
675
663
are passed by value rather than by reference.</p>
676
664
<p>
677
 
 
678
665
</p>
679
666
<div class="variablelist"><table border="0">
680
667
<col align="left" valign="top">
698
685
</table></div>
699
686
</div>
700
687
<hr>
701
 
<div class="refsect2" lang="en">
 
688
<div class="refsect2" title="gimp_vector2_inner_product ()">
702
689
<a name="gimp-vector2-inner-product"></a><h3>gimp_vector2_inner_product ()</h3>
703
690
<pre class="programlisting"><a
704
691
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
708
695
Computes the inner (dot) product of two 2D vectors.
709
696
This product is zero if and only if the two vectors are orthognal.</p>
710
697
<p>
711
 
 
712
698
</p>
713
699
<div class="variablelist"><table border="0">
714
700
<col align="left" valign="top">
732
718
</table></div>
733
719
</div>
734
720
<hr>
735
 
<div class="refsect2" lang="en">
 
721
<div class="refsect2" title="gimp_vector2_inner_product_val ()">
736
722
<a name="gimp-vector2-inner-product-val"></a><h3>gimp_vector2_inner_product_val ()</h3>
737
723
<pre class="programlisting"><a
738
724
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
742
728
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-inner-product" title="gimp_vector2_inner_product ()"><code class="function">gimp_vector2_inner_product()</code></a> but the
743
729
vectors are passed by value rather than by reference.</p>
744
730
<p>
745
 
 
746
731
</p>
747
732
<div class="variablelist"><table border="0">
748
733
<col align="left" valign="top">
766
751
</table></div>
767
752
</div>
768
753
<hr>
769
 
<div class="refsect2" lang="en">
 
754
<div class="refsect2" title="gimp_vector2_cross_product ()">
770
755
<a name="gimp-vector2-cross-product"></a><h3>gimp_vector2_cross_product ()</h3>
771
756
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_cross_product          (const <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector1,
772
757
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector2);</pre>
780
765
Note that in 2D, this function is useful to test if two vectors are
781
766
parallel or not, or to compute the area spawned by two vectors.</p>
782
767
<p>
783
 
 
784
768
</p>
785
769
<div class="variablelist"><table border="0">
786
770
<col align="left" valign="top">
804
788
</table></div>
805
789
</div>
806
790
<hr>
807
 
<div class="refsect2" lang="en">
 
791
<div class="refsect2" title="gimp_vector2_cross_product_val ()">
808
792
<a name="gimp-vector2-cross-product-val"></a><h3>gimp_vector2_cross_product_val ()</h3>
809
793
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_cross_product_val      (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector1,
810
794
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector2);</pre>
812
796
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-cross-product" title="gimp_vector2_cross_product ()"><code class="function">gimp_vector2_cross_product()</code></a> but the
813
797
vectors are passed by value rather than by reference.</p>
814
798
<p>
815
 
 
816
799
</p>
817
800
<div class="variablelist"><table border="0">
818
801
<col align="left" valign="top">
836
819
</table></div>
837
820
</div>
838
821
<hr>
839
 
<div class="refsect2" lang="en">
 
822
<div class="refsect2" title="gimp_vector2_rotate ()">
840
823
<a name="gimp-vector2-rotate"></a><h3>gimp_vector2_rotate ()</h3>
841
824
<pre class="programlisting">void                gimp_vector2_rotate                 (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> *vector,
842
825
                                                         <a
845
828
<p>
846
829
Rotates the <em class="parameter"><code>vector</code></em> counterclockwise by <em class="parameter"><code>alpha</code></em> radians.</p>
847
830
<p>
848
 
 
849
831
</p>
850
832
<div class="variablelist"><table border="0">
851
833
<col align="left" valign="top">
864
846
</table></div>
865
847
</div>
866
848
<hr>
867
 
<div class="refsect2" lang="en">
 
849
<div class="refsect2" title="gimp_vector2_rotate_val ()">
868
850
<a name="gimp-vector2-rotate-val"></a><h3>gimp_vector2_rotate_val ()</h3>
869
851
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a>         gimp_vector2_rotate_val             (<a class="link" href="libgimpmath-GimpVector.html#GimpVector2" title="GimpVector2">GimpVector2</a> vector,
870
852
                                                         <a
874
856
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector2-rotate" title="gimp_vector2_rotate ()"><code class="function">gimp_vector2_rotate()</code></a> but the vector
875
857
is passed by value rather than by reference.</p>
876
858
<p>
877
 
 
878
859
</p>
879
860
<div class="variablelist"><table border="0">
880
861
<col align="left" valign="top">
899
880
</table></div>
900
881
</div>
901
882
<hr>
902
 
<div class="refsect2" lang="en">
 
883
<div class="refsect2" title="gimp_vector3_new ()">
903
884
<a name="gimp-vector3-new"></a><h3>gimp_vector3_new ()</h3>
904
885
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_new                    (<a
905
886
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
913
894
<p>
914
895
Creates a <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3"><span class="type">GimpVector3</span></a> of coordinate <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>.</p>
915
896
<p>
916
 
 
917
897
</p>
918
898
<div class="variablelist"><table border="0">
919
899
<col align="left" valign="top">
942
922
</table></div>
943
923
</div>
944
924
<hr>
945
 
<div class="refsect2" lang="en">
 
925
<div class="refsect2" title="gimp_vector3_set ()">
946
926
<a name="gimp-vector3-set"></a><h3>gimp_vector3_set ()</h3>
947
927
<pre class="programlisting">void                gimp_vector3_set                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector,
948
928
                                                         <a
957
937
<p>
958
938
Sets the X, Y and Z coordinates of <em class="parameter"><code>vector</code></em> to <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>.</p>
959
939
<p>
960
 
 
961
940
</p>
962
941
<div class="variablelist"><table border="0">
963
942
<col align="left" valign="top">
986
965
</table></div>
987
966
</div>
988
967
<hr>
989
 
<div class="refsect2" lang="en">
 
968
<div class="refsect2" title="gimp_vector3_length ()">
990
969
<a name="gimp-vector3-length"></a><h3>gimp_vector3_length ()</h3>
991
970
<pre class="programlisting"><a
992
971
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
994
973
<p>
995
974
Computes the length of a 3D vector.</p>
996
975
<p>
997
 
 
998
976
</p>
999
977
<div class="variablelist"><table border="0">
1000
978
<col align="left" valign="top">
1013
991
</table></div>
1014
992
</div>
1015
993
<hr>
1016
 
<div class="refsect2" lang="en">
 
994
<div class="refsect2" title="gimp_vector3_length_val ()">
1017
995
<a name="gimp-vector3-length-val"></a><h3>gimp_vector3_length_val ()</h3>
1018
996
<pre class="programlisting"><a
1019
997
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
1022
1000
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-length" title="gimp_vector3_length ()"><code class="function">gimp_vector3_length()</code></a> but the vector
1023
1001
is passed by value rather than by reference.</p>
1024
1002
<p>
1025
 
 
1026
1003
</p>
1027
1004
<div class="variablelist"><table border="0">
1028
1005
<col align="left" valign="top">
1041
1018
</table></div>
1042
1019
</div>
1043
1020
<hr>
1044
 
<div class="refsect2" lang="en">
 
1021
<div class="refsect2" title="gimp_vector3_mul ()">
1045
1022
<a name="gimp-vector3-mul"></a><h3>gimp_vector3_mul ()</h3>
1046
1023
<pre class="programlisting">void                gimp_vector3_mul                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector,
1047
1024
                                                         <a
1051
1028
Multiplies each component of the <em class="parameter"><code>vector</code></em> by <em class="parameter"><code>factor</code></em>. Note that
1052
1029
this is equivalent to multiplying the vectors length by <em class="parameter"><code>factor</code></em>.</p>
1053
1030
<p>
1054
 
 
1055
1031
</p>
1056
1032
<div class="variablelist"><table border="0">
1057
1033
<col align="left" valign="top">
1070
1046
</table></div>
1071
1047
</div>
1072
1048
<hr>
1073
 
<div class="refsect2" lang="en">
 
1049
<div class="refsect2" title="gimp_vector3_mul_val ()">
1074
1050
<a name="gimp-vector3-mul-val"></a><h3>gimp_vector3_mul_val ()</h3>
1075
1051
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_mul_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector,
1076
1052
                                                         <a
1080
1056
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-mul" title="gimp_vector3_mul ()"><code class="function">gimp_vector3_mul()</code></a> but the vector is
1081
1057
passed by value rather than by reference.</p>
1082
1058
<p>
1083
 
 
1084
1059
</p>
1085
1060
<div class="variablelist"><table border="0">
1086
1061
<col align="left" valign="top">
1104
1079
</table></div>
1105
1080
</div>
1106
1081
<hr>
1107
 
<div class="refsect2" lang="en">
 
1082
<div class="refsect2" title="gimp_vector3_normalize ()">
1108
1083
<a name="gimp-vector3-normalize"></a><h3>gimp_vector3_normalize ()</h3>
1109
1084
<pre class="programlisting">void                gimp_vector3_normalize              (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector);</pre>
1110
1085
<p>
1111
1086
Normalizes the <em class="parameter"><code>vector</code></em> so the length of the <em class="parameter"><code>vector</code></em> is 1.0. The nul
1112
1087
vector will not be changed.</p>
1113
1088
<p>
1114
 
 
1115
1089
</p>
1116
1090
<div class="variablelist"><table border="0">
1117
1091
<col align="left" valign="top">
1123
1097
</table></div>
1124
1098
</div>
1125
1099
<hr>
1126
 
<div class="refsect2" lang="en">
 
1100
<div class="refsect2" title="gimp_vector3_normalize_val ()">
1127
1101
<a name="gimp-vector3-normalize-val"></a><h3>gimp_vector3_normalize_val ()</h3>
1128
1102
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_normalize_val          (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector);</pre>
1129
1103
<p>
1130
1104
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-normalize" title="gimp_vector3_normalize ()"><code class="function">gimp_vector3_normalize()</code></a> but the
1131
1105
vector is passed by value rather than by reference.</p>
1132
1106
<p>
1133
 
 
1134
1107
</p>
1135
1108
<div class="variablelist"><table border="0">
1136
1109
<col align="left" valign="top">
1150
1123
</table></div>
1151
1124
</div>
1152
1125
<hr>
1153
 
<div class="refsect2" lang="en">
 
1126
<div class="refsect2" title="gimp_vector3_neg ()">
1154
1127
<a name="gimp-vector3-neg"></a><h3>gimp_vector3_neg ()</h3>
1155
1128
<pre class="programlisting">void                gimp_vector3_neg                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector);</pre>
1156
1129
<p>
1157
1130
Negates the <em class="parameter"><code>vector</code></em> (i.e. negate all its coordinates).</p>
1158
1131
<p>
1159
 
 
1160
1132
</p>
1161
1133
<div class="variablelist"><table border="0">
1162
1134
<col align="left" valign="top">
1168
1140
</table></div>
1169
1141
</div>
1170
1142
<hr>
1171
 
<div class="refsect2" lang="en">
 
1143
<div class="refsect2" title="gimp_vector3_neg_val ()">
1172
1144
<a name="gimp-vector3-neg-val"></a><h3>gimp_vector3_neg_val ()</h3>
1173
1145
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_neg_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector);</pre>
1174
1146
<p>
1175
1147
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-neg" title="gimp_vector3_neg ()"><code class="function">gimp_vector3_neg()</code></a> but the vector
1176
1148
is passed by value rather than by reference.</p>
1177
1149
<p>
1178
 
 
1179
1150
</p>
1180
1151
<div class="variablelist"><table border="0">
1181
1152
<col align="left" valign="top">
1194
1165
</table></div>
1195
1166
</div>
1196
1167
<hr>
1197
 
<div class="refsect2" lang="en">
 
1168
<div class="refsect2" title="gimp_vector3_add ()">
1198
1169
<a name="gimp-vector3-add"></a><h3>gimp_vector3_add ()</h3>
1199
1170
<pre class="programlisting">void                gimp_vector3_add                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *result,
1200
1171
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector1,
1203
1174
Computes the sum of two 3D vectors. The resulting <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3"><span class="type">GimpVector3</span></a> is
1204
1175
stored in <em class="parameter"><code>result</code></em>.</p>
1205
1176
<p>
1206
 
 
1207
1177
</p>
1208
1178
<div class="variablelist"><table border="0">
1209
1179
<col align="left" valign="top">
1227
1197
</table></div>
1228
1198
</div>
1229
1199
<hr>
1230
 
<div class="refsect2" lang="en">
 
1200
<div class="refsect2" title="gimp_vector3_add_val ()">
1231
1201
<a name="gimp-vector3-add-val"></a><h3>gimp_vector3_add_val ()</h3>
1232
1202
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_add_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector1,
1233
1203
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector2);</pre>
1235
1205
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-add" title="gimp_vector3_add ()"><code class="function">gimp_vector3_add()</code></a> but the vectors
1236
1206
are passed by value rather than by reference.</p>
1237
1207
<p>
1238
 
 
1239
1208
</p>
1240
1209
<div class="variablelist"><table border="0">
1241
1210
<col align="left" valign="top">
1259
1228
</table></div>
1260
1229
</div>
1261
1230
<hr>
1262
 
<div class="refsect2" lang="en">
 
1231
<div class="refsect2" title="gimp_vector3_sub ()">
1263
1232
<a name="gimp-vector3-sub"></a><h3>gimp_vector3_sub ()</h3>
1264
1233
<pre class="programlisting">void                gimp_vector3_sub                    (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *result,
1265
1234
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector1,
1268
1237
Computes the difference of two 3D vectors (<em class="parameter"><code>vector1</code></em> minus <em class="parameter"><code>vector2</code></em>).
1269
1238
The resulting <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3"><span class="type">GimpVector3</span></a> is stored in <em class="parameter"><code>result</code></em>.</p>
1270
1239
<p>
1271
 
 
1272
1240
</p>
1273
1241
<div class="variablelist"><table border="0">
1274
1242
<col align="left" valign="top">
1292
1260
</table></div>
1293
1261
</div>
1294
1262
<hr>
1295
 
<div class="refsect2" lang="en">
 
1263
<div class="refsect2" title="gimp_vector3_sub_val ()">
1296
1264
<a name="gimp-vector3-sub-val"></a><h3>gimp_vector3_sub_val ()</h3>
1297
1265
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_sub_val                (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector1,
1298
1266
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector2);</pre>
1300
1268
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-sub" title="gimp_vector3_sub ()"><code class="function">gimp_vector3_sub()</code></a> but the vectors
1301
1269
are passed by value rather than by reference.</p>
1302
1270
<p>
1303
 
 
1304
1271
</p>
1305
1272
<div class="variablelist"><table border="0">
1306
1273
<col align="left" valign="top">
1324
1291
</table></div>
1325
1292
</div>
1326
1293
<hr>
1327
 
<div class="refsect2" lang="en">
 
1294
<div class="refsect2" title="gimp_vector3_inner_product ()">
1328
1295
<a name="gimp-vector3-inner-product"></a><h3>gimp_vector3_inner_product ()</h3>
1329
1296
<pre class="programlisting"><a
1330
1297
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
1334
1301
Computes the inner (dot) product of two 3D vectors. This product
1335
1302
is zero if and only if the two vectors are orthognal.</p>
1336
1303
<p>
1337
 
 
1338
1304
</p>
1339
1305
<div class="variablelist"><table border="0">
1340
1306
<col align="left" valign="top">
1358
1324
</table></div>
1359
1325
</div>
1360
1326
<hr>
1361
 
<div class="refsect2" lang="en">
 
1327
<div class="refsect2" title="gimp_vector3_inner_product_val ()">
1362
1328
<a name="gimp-vector3-inner-product-val"></a><h3>gimp_vector3_inner_product_val ()</h3>
1363
1329
<pre class="programlisting"><a
1364
1330
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"
1368
1334
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-inner-product" title="gimp_vector3_inner_product ()"><code class="function">gimp_vector3_inner_product()</code></a> but the
1369
1335
vectors are passed by value rather than by reference.</p>
1370
1336
<p>
1371
 
 
1372
1337
</p>
1373
1338
<div class="variablelist"><table border="0">
1374
1339
<col align="left" valign="top">
1392
1357
</table></div>
1393
1358
</div>
1394
1359
<hr>
1395
 
<div class="refsect2" lang="en">
 
1360
<div class="refsect2" title="gimp_vector3_cross_product ()">
1396
1361
<a name="gimp-vector3-cross-product"></a><h3>gimp_vector3_cross_product ()</h3>
1397
1362
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_cross_product          (const <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector1,
1398
1363
                                                         const <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector2);</pre>
1406
1371
This function can be used to compute the normal of the plane
1407
1372
defined by <em class="parameter"><code>vector1</code></em> and <em class="parameter"><code>vector2</code></em>.</p>
1408
1373
<p>
1409
 
 
1410
1374
</p>
1411
1375
<div class="variablelist"><table border="0">
1412
1376
<col align="left" valign="top">
1430
1394
</table></div>
1431
1395
</div>
1432
1396
<hr>
1433
 
<div class="refsect2" lang="en">
 
1397
<div class="refsect2" title="gimp_vector3_cross_product_val ()">
1434
1398
<a name="gimp-vector3-cross-product-val"></a><h3>gimp_vector3_cross_product_val ()</h3>
1435
1399
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_cross_product_val      (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector1,
1436
1400
                                                         <a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector2);</pre>
1438
1402
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-cross-product" title="gimp_vector3_cross_product ()"><code class="function">gimp_vector3_cross_product()</code></a> but the
1439
1403
vectors are passed by value rather than by reference.</p>
1440
1404
<p>
1441
 
 
1442
1405
</p>
1443
1406
<div class="variablelist"><table border="0">
1444
1407
<col align="left" valign="top">
1462
1425
</table></div>
1463
1426
</div>
1464
1427
<hr>
1465
 
<div class="refsect2" lang="en">
 
1428
<div class="refsect2" title="gimp_vector3_rotate ()">
1466
1429
<a name="gimp-vector3-rotate"></a><h3>gimp_vector3_rotate ()</h3>
1467
1430
<pre class="programlisting">void                gimp_vector3_rotate                 (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> *vector,
1468
1431
                                                         <a
1484
1447
have to call this function twice. Also, it is often wise to call
1485
1448
this function with only one of <em class="parameter"><code>alpha</code></em>, <em class="parameter"><code>beta</code></em> and <em class="parameter"><code>gamma</code></em> non-zero.</p>
1486
1449
<p>
1487
 
 
1488
1450
</p>
1489
1451
<div class="variablelist"><table border="0">
1490
1452
<col align="left" valign="top">
1513
1475
</table></div>
1514
1476
</div>
1515
1477
<hr>
1516
 
<div class="refsect2" lang="en">
 
1478
<div class="refsect2" title="gimp_vector3_rotate_val ()">
1517
1479
<a name="gimp-vector3-rotate-val"></a><h3>gimp_vector3_rotate_val ()</h3>
1518
1480
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector3_rotate_val             (<a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a> vector,
1519
1481
                                                         <a
1529
1491
This function is identical to <a class="link" href="libgimpmath-GimpVector.html#gimp-vector3-rotate" title="gimp_vector3_rotate ()"><code class="function">gimp_vector3_rotate()</code></a> but the vectors
1530
1492
are passed by value rather than by reference.</p>
1531
1493
<p>
1532
 
 
1533
1494
</p>
1534
1495
<div class="variablelist"><table border="0">
1535
1496
<col align="left" valign="top">
1563
1524
</table></div>
1564
1525
</div>
1565
1526
<hr>
1566
 
<div class="refsect2" lang="en">
 
1527
<div class="refsect2" title="gimp_vector_2d_to_3d ()">
1567
1528
<a name="gimp-vector-2d-to-3d"></a><h3>gimp_vector_2d_to_3d ()</h3>
1568
1529
<pre class="programlisting">void                gimp_vector_2d_to_3d                (<a
1569
1530
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1595
1556
to the plane z = <em class="parameter"><code>p-&gt;z</code></em> (parallel to XY), from the <em class="parameter"><code>vp</code></em> point of view
1596
1557
through the screen (<em class="parameter"><code>sx</code></em>, <em class="parameter"><code>sy</code></em>)-&gt;(<em class="parameter"><code>sx</code></em> + <em class="parameter"><code>w</code></em>, <em class="parameter"><code>sy</code></em> + <em class="parameter"><code>h</code></em>)</p>
1597
1558
<p>
1598
 
 
1599
1559
</p>
1600
1560
<div class="variablelist"><table border="0">
1601
1561
<col align="left" valign="top">
1644
1604
</table></div>
1645
1605
</div>
1646
1606
<hr>
1647
 
<div class="refsect2" lang="en">
 
1607
<div class="refsect2" title="gimp_vector_2d_to_3d_val ()">
1648
1608
<a name="gimp-vector-2d-to-3d-val"></a><h3>gimp_vector_2d_to_3d_val ()</h3>
1649
1609
<pre class="programlisting"><a class="link" href="libgimpmath-GimpVector.html#GimpVector3" title="GimpVector3">GimpVector3</a>         gimp_vector_2d_to_3d_val            (<a
1650
1610
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1671
1631
position of the <em class="parameter"><code>observer</code></em> and the resulting point <em class="parameter"><code>p</code></em> are passed by
1672
1632
value rather than by reference.</p>
1673
1633
<p>
1674
 
 
1675
1634
</p>
1676
1635
<div class="variablelist"><table border="0">
1677
1636
<col align="left" valign="top">
1725
1684
</table></div>
1726
1685
</div>
1727
1686
<hr>
1728
 
<div class="refsect2" lang="en">
 
1687
<div class="refsect2" title="gimp_vector_3d_to_2d ()">
1729
1688
<a name="gimp-vector-3d-to-2d"></a><h3>gimp_vector_3d_to_2d ()</h3>
1730
1689
<pre class="programlisting">void                gimp_vector_3d_to_2d                (<a
1731
1690
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1756
1715
<p>
1757
1716
This is basically the opposite of <a class="link" href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d" title="gimp_vector_2d_to_3d ()"><code class="function">gimp_vector_2d_to_3d()</code></a>.</p>
1758
1717
<p>
1759
 
 
1760
1718
</p>
1761
1719
<div class="variablelist"><table border="0">
1762
1720
<col align="left" valign="top">
1805
1763
</table></div>
1806
1764
</div>
1807
1765
</div>
1808
 
<div class="refsect1" lang="en">
 
1766
<div class="refsect1" title="See Also">
1809
1767
<a name="libgimpmath-GimpVector.see-also"></a><h2>See Also</h2>
1810
1768
<p>
1811
1769
<a class="link" href="libgimpmath-GimpMatrix.html#GimpMatrix3" title="GimpMatrix3"><span class="type">GimpMatrix3</span></a>
1817
1775
</div>
1818
1776
<div class="footer">
1819
1777
<hr>
1820
 
          Generated by GTK-Doc V1.10</div>
 
1778
          Generated by GTK-Doc V1.11</div>
1821
1779
</body>
1822
1780
</html>