This file is indexed.

/usr/share/gtk-doc/html/cogl-2.0-experimental/cogl-2.0-experimental-Matrix-Stacks.html is in libcogl-doc 1.16.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Matrix Stacks</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
<link rel="up" href="cogl-utilities.html" title="Utilities">
<link rel="prev" href="cogl-2.0-experimental-Matrices.html" title="Matrices">
<link rel="next" href="cogl-2.0-experimental-3-Component-Vectors.html" title="3 Component Vectors">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cogl-2.0-experimental-Matrices.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cogl-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cogl 2.0 Reference Manual</th>
<td><a accesskey="n" href="cogl-2.0-experimental-3-Component-Vectors.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cogl-2.0-experimental-Matrix-Stacks.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#cogl-2.0-experimental-Matrix-Stacks.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="cogl-2.0-experimental-Matrix-Stacks"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-2.0-experimental-Matrix-Stacks.top_of_page"></a>Matrix Stacks</span></h2>
<p>Matrix Stacks — Functions for efficiently tracking many
                    related transformations</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cogl-2.0-experimental-Matrix-Stacks.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack">CoglMatrixStack</a>;
                    <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry">CoglMatrixEntry</a>;
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="returnvalue">CoglMatrixStack</span></a> *   <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-new" title="cogl_matrix_stack_new ()">cogl_matrix_stack_new</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *ctx</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-push" title="cogl_matrix_stack_push ()">cogl_matrix_stack_push</a>              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-pop" title="cogl_matrix_stack_pop ()">cogl_matrix_stack_pop</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-load-identity" title="cogl_matrix_stack_load_identity ()">cogl_matrix_stack_load_identity</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-scale" title="cogl_matrix_stack_scale ()">cogl_matrix_stack_scale</a>             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-translate" title="cogl_matrix_stack_translate ()">cogl_matrix_stack_translate</a>         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-rotate" title="cogl_matrix_stack_rotate ()">cogl_matrix_stack_rotate</a>            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> angle</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-rotate-quaternion" title="cogl_matrix_stack_rotate_quaternion ()">cogl_matrix_stack_rotate_quaternion</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Quaternions-(Rotations).html#CoglQuaternion" title="CoglQuaternion"><span class="type">CoglQuaternion</span></a> *quaternion</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-rotate-euler" title="cogl_matrix_stack_rotate_euler ()">cogl_matrix_stack_rotate_euler</a>      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Eulers-(Rotations).html#CoglEuler" title="CoglEuler"><span class="type">CoglEuler</span></a> *euler</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-multiply" title="cogl_matrix_stack_multiply ()">cogl_matrix_stack_multiply</a>          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-frustum" title="cogl_matrix_stack_frustum ()">cogl_matrix_stack_frustum</a>           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> left</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> right</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> bottom</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> top</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_far</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-perspective" title="cogl_matrix_stack_perspective ()">cogl_matrix_stack_perspective</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> fov_y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> aspect</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_far</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-orthographic" title="cogl_matrix_stack_orthographic ()">cogl_matrix_stack_orthographic</a>      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> far</code></em>);
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-inverse" title="cogl_matrix_stack_get_inverse ()">cogl_matrix_stack_get_inverse</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *inverse</code></em>);
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="returnvalue">CoglMatrixEntry</span></a> *   <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()">cogl_matrix_stack_get_entry</a>         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);
<a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *        <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get" title="cogl_matrix_stack_get ()">cogl_matrix_stack_get</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *        <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-get" title="cogl_matrix_entry_get ()">cogl_matrix_entry_get</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-set" title="cogl_matrix_stack_set ()">cogl_matrix_stack_set</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-calculate-translation" title="cogl_matrix_entry_calculate_translation ()">cogl_matrix_entry_calculate_translation</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *z</code></em>);
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-is-identity" title="cogl_matrix_entry_is_identity ()">cogl_matrix_entry_is_identity</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-equal" title="cogl_matrix_entry_equal ()">cogl_matrix_entry_equal</a>             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry1</code></em>);
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="returnvalue">CoglMatrixEntry</span></a> *   <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-ref" title="cogl_matrix_entry_ref ()">cogl_matrix_entry_ref</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()">cogl_matrix_entry_unref</a>             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-Matrix-Stacks.description"></a><h2>Description</h2>
<p>
Matrices can be used (for example) to describe the model-view
transforms of objects, texture transforms, and projective
transforms.
</p>
<p>
The <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> api provides a good way to manipulate individual
matrices representing a single transformation but if you need to
track many-many such transformations for many objects that are
organized in a scenegraph for example then using a separate
<a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> for each object may not be the most efficient way.
</p>
<p>
A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> enables applications to track lots of
transformations that are related to each other in some kind of
hierarchy.  In a scenegraph for example if you want to know how to
transform a particular node then you usually have to walk up
through the ancestors and accumulate their transforms before
finally applying the transform of the node itself. In this model
things are grouped together spatially according to their ancestry
and all siblings with the same parent share the same initial
transformation. The <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> API is suited to tracking lots
of transformations that fit this kind of model.
</p>
<p>
Compared to using the <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> api directly to track many
related transforms, these can be some advantages to using a
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Faster equality comparisons of transformations</li>
<li class="listitem">Efficient comparisons of the differences between arbitrary
  transformations</li>
<li class="listitem">Avoid redundant arithmetic related to common transforms
  </li>
<li class="listitem">Can be more space efficient (not always though)</li>
</ul></div>
<p>
</p>
<p>
For reference (to give an idea of when a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> can
provide a space saving) a <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> can be expected to take 72
bytes whereas a single <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> in a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> is
currently around 32 bytes on a 32bit CPU or 36 bytes on a 64bit
CPU. An entry is needed for each individual operation applied to
the stack (such as rotate, scale, translate) so if most of your
leaf node transformations only need one or two simple operations
relative to their parent then a matrix stack will likely take less
space than having a <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> for each node.
</p>
<p>
Even without any space saving though the ability to perform fast
comparisons and avoid redundant arithmetic (especially sine and
cosine calculations for rotations) can make using a matrix stack
worthwhile.
</p>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-Matrix-Stacks.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CoglMatrixStack"></a><h3>CoglMatrixStack</h3>
<pre class="programlisting">typedef struct _CoglMatrixStack CoglMatrixStack;</pre>
<p>
Tracks your current position within a hierarchy and lets you build
up a graph of transformations as you traverse through a hierarchy
such as a scenegraph.
</p>
<p>
A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> always maintains a reference to a single
transformation at any point in time, representing the
transformation at the current position in the hierarchy. You can
get a reference to the current transformation by calling
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.
</p>
<p>
When a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> is first created with
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-new" title="cogl_matrix_stack_new ()"><code class="function">cogl_matrix_stack_new()</code></a> then it is conceptually positioned at the
root of your hierarchy and the current transformation simply
represents an identity transformation.
</p>
<p>
As you traverse your object hierarchy (your scenegraph) then you
should call <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-push" title="cogl_matrix_stack_push ()"><code class="function">cogl_matrix_stack_push()</code></a> whenever you move down one
level and call <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-pop" title="cogl_matrix_stack_pop ()"><code class="function">cogl_matrix_stack_pop()</code></a> whenever you move back up
one level towards the root.
</p>
<p>
At any time you can apply a set of operations, such as "rotate",
"scale", "translate" on top of the current transformation of a
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> using functions such as
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-rotate" title="cogl_matrix_stack_rotate ()"><code class="function">cogl_matrix_stack_rotate()</code></a>, <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-scale" title="cogl_matrix_stack_scale ()"><code class="function">cogl_matrix_stack_scale()</code></a> and
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-translate" title="cogl_matrix_stack_translate ()"><code class="function">cogl_matrix_stack_translate()</code></a>. These operations will derive a new
current transformation and will never affect a transformation
that you have referenced using <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.
</p>
<p>
Internally applying operations to a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> builds up a
graph of <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> structures which each represent a single
immutable transform.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglMatrixEntry"></a><h3>CoglMatrixEntry</h3>
<pre class="programlisting">typedef struct _CoglMatrixEntry CoglMatrixEntry;</pre>
<p>
Represents a single immutable transformation that was retrieved
from a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> using <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.
</p>
<p>
Internally a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> represents a single matrix
operation (such as "rotate", "scale", "translate") which is applied
to the transform of a single parent entry.
</p>
<p>
Using the <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> api effectively builds up a graph of
these immutable <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> structures whereby operations
that can be shared between multiple transformations will result
in shared <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> nodes in the graph.
</p>
<p>
When a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> is first created it references one
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> that represents a single "load identity"
operation. This serves as the root entry and all operations
that are then applied to the stack will extend the graph
starting from this root "load identity" entry.
</p>
<p>
Given the typical usage model for a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> and the way
the entries are built up while traversing a scenegraph then in most
cases where an application is interested in comparing two
transformations for equality then it is enough to simply compare
two <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> pointers directly. Technically this can lead
to false negatives that could be identified with a deeper
comparison but often these false negatives are unlikely and
don't matter anyway so this enables extremely cheap comparisons.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>s are reference counted using
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-ref" title="cogl_matrix_entry_ref ()"><code class="function">cogl_matrix_entry_ref()</code></a> and <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()"><code class="function">cogl_matrix_entry_unref()</code></a> not with
<a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#cogl-object-ref" title="cogl_object_ref ()"><code class="function">cogl_object_ref()</code></a> and <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#cogl-object-unref" title="cogl_object_unref ()"><code class="function">cogl_object_unref()</code></a>.</div>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-new"></a><h3>cogl_matrix_stack_new ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="returnvalue">CoglMatrixStack</span></a> *   cogl_matrix_stack_new               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *ctx</code></em>);</pre>
<p>
Allocates a new <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> that can be used to build up
transformations relating to objects in a scenegraph like hierarchy.
(See the description of <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> and <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> for
more details of what a matrix stack is best suited for)
</p>
<p>
When a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> is first allocated it is conceptually
positioned at the root of your scenegraph hierarchy. As you
traverse your scenegraph then you should call
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-push" title="cogl_matrix_stack_push ()"><code class="function">cogl_matrix_stack_push()</code></a> whenever you move down a level and
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-pop" title="cogl_matrix_stack_pop ()"><code class="function">cogl_matrix_stack_pop()</code></a> whenever you move back up a level towards
the root.
</p>
<p>
Once you have allocated a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> you can get a reference
to the current transformation for the current position in the
hierarchy by calling <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.
</p>
<p>
Once you have allocated a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> you can apply operations
such as rotate, scale and translate to modify the current transform
for the current position in the hierarchy by calling
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-rotate" title="cogl_matrix_stack_rotate ()"><code class="function">cogl_matrix_stack_rotate()</code></a>, <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-scale" title="cogl_matrix_stack_scale ()"><code class="function">cogl_matrix_stack_scale()</code></a> and
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-translate" title="cogl_matrix_stack_translate ()"><code class="function">cogl_matrix_stack_translate()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-push"></a><h3>cogl_matrix_stack_push ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_push              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);</pre>
<p>
Saves the current transform and starts a new transform that derives
from the current transform.
</p>
<p>
This is usually called while traversing a scenegraph whenever you
traverse one level deeper. <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-pop" title="cogl_matrix_stack_pop ()"><code class="function">cogl_matrix_stack_pop()</code></a> can then be
called when going back up one layer to restore the previous
transform of an ancestor.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-pop"></a><h3>cogl_matrix_stack_pop ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_pop               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);</pre>
<p>
Restores the previous transform that was last saved by calling
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-push" title="cogl_matrix_stack_push ()"><code class="function">cogl_matrix_stack_push()</code></a>.
</p>
<p>
This is usually called while traversing a scenegraph whenever you
return up one level in the graph towards the root node.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-load-identity"></a><h3>cogl_matrix_stack_load_identity ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_load_identity     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);</pre>
<p>
Resets the current matrix to the identity matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-scale"></a><h3>cogl_matrix_stack_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_scale             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<p>
Multiplies the current matrix by one that scales the x, y and z
axes by the given values.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Amount to scale along the x-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Amount to scale along the y-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Amount to scale along the z-axis</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-translate"></a><h3>cogl_matrix_stack_translate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_translate         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<p>
Multiplies the current matrix by one that translates along all
three axes according to the given values.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Distance to translate along the x-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Distance to translate along the y-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Distance to translate along the z-axis</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-rotate"></a><h3>cogl_matrix_stack_rotate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_rotate            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> angle</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<p>
Multiplies the current matrix by one that rotates the around the
axis-vector specified by <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>. The rotation follows the
right-hand thumb rule so for example rotating by 10 degrees about
the axis-vector (0, 0, 1) causes a small counter-clockwise
rotation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>Angle in degrees to rotate.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X-component of vertex to rotate around.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y-component of vertex to rotate around.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>Z-component of vertex to rotate around.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-rotate-quaternion"></a><h3>cogl_matrix_stack_rotate_quaternion ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_rotate_quaternion (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Quaternions-(Rotations).html#CoglQuaternion" title="CoglQuaternion"><span class="type">CoglQuaternion</span></a> *quaternion</code></em>);</pre>
<p>
Multiplies the current matrix by one that rotates according to the
rotation described by <em class="parameter"><code>quaternion</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quaternion</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Quaternions-(Rotations).html#CoglQuaternion" title="CoglQuaternion"><span class="type">CoglQuaternion</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-rotate-euler"></a><h3>cogl_matrix_stack_rotate_euler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_rotate_euler      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Eulers-(Rotations).html#CoglEuler" title="CoglEuler"><span class="type">CoglEuler</span></a> *euler</code></em>);</pre>
<p>
Multiplies the current matrix by one that rotates according to the
rotation described by <em class="parameter"><code>euler</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>euler</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Eulers-(Rotations).html#CoglEuler" title="CoglEuler"><span class="type">CoglEuler</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-multiply"></a><h3>cogl_matrix_stack_multiply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_multiply          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<p>
Multiplies the current matrix by the given matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>the matrix to multiply with the current model-view</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-frustum"></a><h3>cogl_matrix_stack_frustum ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_frustum           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> left</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> right</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> bottom</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> top</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
<p>
Replaces the current matrix with a perspective matrix for a given
viewing frustum defined by 4 side clip planes that all cross
through the origin and 2 near and far clip planes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>X position of the left clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
<td>X position of the right clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom</code></em> :</span></p></td>
<td>Y position of the bottom clipping plane where it
intersects the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>Y position of the top clipping plane where it intersects
the near clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
<td>The distance to the near clipping plane (Must be positive)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
<td>The distance to the far clipping plane (Must be positive)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-perspective"></a><h3>cogl_matrix_stack_perspective ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_perspective       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> fov_y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> aspect</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
<p>
Replaces the current matrix with a perspective matrix based on the
provided values.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>You should be careful not to have too great a <em class="parameter"><code>z_far</code></em> / <em class="parameter"><code>z_near</code></em>
ratio since that will reduce the effectiveness of depth testing
since there wont be enough precision to identify the depth of
objects near to each other.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fov_y</code></em> :</span></p></td>
<td>Vertical field of view angle in degrees.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>aspect</code></em> :</span></p></td>
<td>The (width over height) aspect ratio for display</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
<td>The distance to the near clipping plane (Must be positive,
and must not be 0)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
<td>The distance to the far clipping plane (Must be positive)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-orthographic"></a><h3>cogl_matrix_stack_orthographic ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_orthographic      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> near</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> far</code></em>);</pre>
<p>
Replaces the current matrix with an orthographic projection matrix.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
<td>The x coordinate for the first vertical clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
<td>The y coordinate for the first horizontal clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
<td>The x coordinate for the second vertical clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
<td>The y coordinate for the second horizontal clipping plane</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>near</code></em> :</span></p></td>
<td>The <span class="emphasis"><em>distance</em></span> to the near clipping
plane (will be <span class="emphasis"><em>negative</em></span> if the plane is
behind the viewer)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>far</code></em> :</span></p></td>
<td>The <span class="emphasis"><em>distance</em></span> to the far clipping
plane (will be <span class="emphasis"><em>negative</em></span> if the plane is
behind the viewer)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-get-inverse"></a><h3>cogl_matrix_stack_get_inverse ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_matrix_stack_get_inverse       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *inverse</code></em>);</pre>
<p>
Gets the inverse transform of the current matrix and uses it to
initialize a new <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>inverse</code></em> :</span></p></td>
<td>The destination for a 4x4 inverse transformation matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the inverse was successfully calculated or <code class="literal">FALSE</code>
for degenerate transformations that can't be inverted (in this case the
<em class="parameter"><code>inverse</code></em> matrix will simply be initialized with the identity matrix)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-get-entry"></a><h3>cogl_matrix_stack_get_entry ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="returnvalue">CoglMatrixEntry</span></a> *   cogl_matrix_stack_get_entry         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>);</pre>
<p>
Gets a reference to the current transform represented by a
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> pointer.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>The transform represented by a <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> is
immutable.</div>
<p>
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>s are reference counted using
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-ref" title="cogl_matrix_entry_ref ()"><code class="function">cogl_matrix_entry_ref()</code></a> and <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()"><code class="function">cogl_matrix_entry_unref()</code></a> and you
should call <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()"><code class="function">cogl_matrix_entry_unref()</code></a> when you are finished with
and entry you get via <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer to the <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>
representing the current matrix stack transform. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-get"></a><h3>cogl_matrix_stack_get ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *        cogl_matrix_stack_get               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<p>
Resolves the current <em class="parameter"><code>stack</code></em> transform into a <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> by
combining the operations that have been applied to build up the
current transform.
</p>
<p>
There are two possible ways that this function may return its
result depending on whether the stack is able to directly point
to an internal <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> or whether the result needs to be
composed of multiple operations.
</p>
<p>
If an internal matrix contains the required result then this
function will directly return a pointer to that matrix, otherwise
if the function returns <code class="literal">NULL</code> then <em class="parameter"><code>matrix</code></em> will be initialized
to match the current transform of <em class="parameter"><code>stack</code></em>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<em class="parameter"><code>matrix</code></em> will be left untouched if a direct pointer is
returned.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>The potential destination for the current matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A direct pointer to the current transform or <code class="literal">NULL</code>
and in that case <em class="parameter"><code>matrix</code></em> will be initialized with
the value of the current transform.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-get"></a><h3>cogl_matrix_entry_get ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *        cogl_matrix_entry_get               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<p>
Resolves the current <em class="parameter"><code>entry</code></em> transform into a <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> by
combining the sequence of operations that have been applied to
build up the current transform.
</p>
<p>
There are two possible ways that this function may return its
result depending on whether it's possible to directly point
to an internal <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> or whether the result needs to be
composed of multiple operations.
</p>
<p>
If an internal matrix contains the required result then this
function will directly return a pointer to that matrix, otherwise
if the function returns <code class="literal">NULL</code> then <em class="parameter"><code>matrix</code></em> will be initialized
to match the transform of <em class="parameter"><code>entry</code></em>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<em class="parameter"><code>matrix</code></em> will be left untouched if a direct pointer is
returned.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>The potential destination for the transform as
a matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A direct pointer to a <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> transform or <code class="literal">NULL</code>
and in that case <em class="parameter"><code>matrix</code></em> will be initialized with
the effective transform represented by <em class="parameter"><code>entry</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-stack-set"></a><h3>cogl_matrix_stack_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_stack_set               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a> *stack</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
<p>
Replaces the current <em class="parameter"><code>stack</code></em> matrix value with the value of <em class="parameter"><code>matrix</code></em>.
This effectively discards any other operations that were applied
since the last time <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-push" title="cogl_matrix_stack_push ()"><code class="function">cogl_matrix_stack_push()</code></a> was called or since
the stack was initialized.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stack</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixStack" title="CoglMatrixStack"><span class="type">CoglMatrixStack</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> replace the current matrix value with</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-calculate-translation"></a><h3>cogl_matrix_entry_calculate_translation ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_matrix_entry_calculate_translation
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry1</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *x</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *y</code></em>,
                                                         <em class="parameter"><code><span class="type">float</span> *z</code></em>);</pre>
<p>
Determines if the only difference between two transforms is a
translation and if so returns what the <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>, and <em class="parameter"><code>z</code></em> components of
the translation are.
</p>
<p>
If the difference between the two translations involves anything
other than a translation then the function returns <code class="literal">FALSE</code>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry0</code></em> :</span></p></td>
<td>The first reference transform</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry1</code></em> :</span></p></td>
<td>A second reference transform</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>The destination for the x-component of the translation. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>The destination for the y-component of the translation. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
<td>The destination for the z-component of the translation. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the only difference between the transform of
<em class="parameter"><code>entry0</code></em> and the transform of <em class="parameter"><code>entry1</code></em> is a translation,
otherwise <code class="literal">FALSE</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-is-identity"></a><h3>cogl_matrix_entry_is_identity ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_matrix_entry_is_identity       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);</pre>
<p>
Determines whether <em class="parameter"><code>entry</code></em> is known to represent an identity
transform.
</p>
<p>
If this returns <code class="literal">TRUE</code> then the entry is definitely the identity
matrix. If it returns <code class="literal">FALSE</code> it may or may not be the identity
matrix but no expensive comparison is performed to verify it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>entry</code></em> is definitely an identity transform,
otherwise <code class="literal">FALSE</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-equal"></a><h3>cogl_matrix_entry_equal ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_matrix_entry_equal             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry0</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry1</code></em>);</pre>
<p>
Compares two arbitrary <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> transforms for equality
returning <code class="literal">TRUE</code> if they are equal or <code class="literal">FALSE</code> otherwise.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>In many cases it is unnecessary to use this api and instead
direct pointer comparisons of entries are good enough and much
cheaper too.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry0</code></em> :</span></p></td>
<td>The first <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> to compare</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entry1</code></em> :</span></p></td>
<td>A second <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> to compare</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>entry0</code></em> represents the same transform as
<em class="parameter"><code>entry1</code></em>, otherwise <code class="literal">FALSE</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-ref"></a><h3>cogl_matrix_entry_ref ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="returnvalue">CoglMatrixEntry</span></a> *   cogl_matrix_entry_ref               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);</pre>
<p>
Takes a reference on the given <em class="parameter"><code>entry</code></em> to ensure the <em class="parameter"><code>entry</code></em> stays
alive and remains valid. When you are finished with the <em class="parameter"><code>entry</code></em> then
you should call <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()"><code class="function">cogl_matrix_entry_unref()</code></a>.
</p>
<p>
It is an error to pass an <em class="parameter"><code>entry</code></em> pointer to <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#cogl-object-ref" title="cogl_object_ref ()"><code class="function">cogl_object_ref()</code></a> and
<a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#cogl-object-unref" title="cogl_object_unref ()"><code class="function">cogl_object_unref()</code></a>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-matrix-entry-unref"></a><h3>cogl_matrix_entry_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_matrix_entry_unref             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a> *entry</code></em>);</pre>
<p>
Releases a reference on <em class="parameter"><code>entry</code></em> either taken by calling
<a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-entry-unref" title="cogl_matrix_entry_unref ()"><code class="function">cogl_matrix_entry_unref()</code></a> or to release the reference given when
calling <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#cogl-matrix-stack-get-entry" title="cogl_matrix_stack_get_entry ()"><code class="function">cogl_matrix_stack_get_entry()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-Matrix-Stacks.html#CoglMatrixEntry" title="CoglMatrixEntry"><span class="type">CoglMatrixEntry</span></a>
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>