Compare commits
255 Commits
OpenSceneG
...
OpenSceneG
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43792651f0 | ||
|
|
fb91677fce | ||
|
|
dab855f141 | ||
|
|
01b510865f | ||
|
|
6c08cc5937 | ||
|
|
7f3fe7baed | ||
|
|
ae233b9392 | ||
|
|
1712176900 | ||
|
|
967e2b7926 | ||
|
|
64d4e6a913 | ||
|
|
ae33aeed8a | ||
|
|
49bf375b68 | ||
|
|
40a0c1cde2 | ||
|
|
bfd9ec30ca | ||
|
|
599715e1d1 | ||
|
|
3fc3fc060f | ||
|
|
29199a9a68 | ||
|
|
b8a76a0ce0 | ||
|
|
a927748a73 | ||
|
|
5d53cb13d5 | ||
|
|
aa3766ca70 | ||
|
|
b5743c1c9f | ||
|
|
894800115c | ||
|
|
0574e17eaa | ||
|
|
9e1362445c | ||
|
|
a1af64be80 | ||
|
|
f02caa5371 | ||
|
|
6d1a94c785 | ||
|
|
1163ebb25b | ||
|
|
4563195a18 | ||
|
|
00ca996576 | ||
|
|
7ab4faeae1 | ||
|
|
4e90ccb13a | ||
|
|
5c70f4828f | ||
|
|
bdcba7220c | ||
|
|
cfa9c3682f | ||
|
|
8f8f217ee7 | ||
|
|
ec0faff644 | ||
|
|
201e73c3c1 | ||
|
|
cb3868872e | ||
|
|
9f45b89722 | ||
|
|
18b8d05d1f | ||
|
|
ae10c4ef89 | ||
|
|
6222373479 | ||
|
|
5be809ab04 | ||
|
|
da79cd85e4 | ||
|
|
211764ca2d | ||
|
|
8041a24a4f | ||
|
|
b011470dfe | ||
|
|
3155b1722c | ||
|
|
40fc0eb263 | ||
|
|
38e68ed7f1 | ||
|
|
15fd3bdcc2 | ||
|
|
1858366514 | ||
|
|
241efbaa33 | ||
|
|
5c6c51c887 | ||
|
|
817780e67c | ||
|
|
7ed9ef7db0 | ||
|
|
12d20ee257 | ||
|
|
2bed6a2dca | ||
|
|
315e749cce | ||
|
|
0b5d743411 | ||
|
|
0029d8fc46 | ||
|
|
a5d6c1a6a3 | ||
|
|
65f85fee6d | ||
|
|
df14b9980a | ||
|
|
7ba85b16db | ||
|
|
bda1350be4 | ||
|
|
31f2e7902f | ||
|
|
e89336a306 | ||
|
|
9a8abe7fee | ||
|
|
01b27a9fb2 | ||
|
|
21f735d653 | ||
|
|
4dfa7485c1 | ||
|
|
7bbc1c419b | ||
|
|
ab029febbd | ||
|
|
d5d19ac1a4 | ||
|
|
44da3958c3 | ||
|
|
26e3f00882 | ||
|
|
fb6e1d4d9f | ||
|
|
e4fa4f9119 | ||
|
|
a9c1dd1a4a | ||
|
|
102e5c2439 | ||
|
|
264746a5c2 | ||
|
|
dfa3c9a2c9 | ||
|
|
b795e65a39 | ||
|
|
b1dbb9e96b | ||
|
|
4f6add4c14 | ||
|
|
edb1eede40 | ||
|
|
9cccbcd7b7 | ||
|
|
1bf529b391 | ||
|
|
83b84eb2f4 | ||
|
|
90325a5895 | ||
|
|
c2bc684eb2 | ||
|
|
5b439806ce | ||
|
|
5574c50607 | ||
|
|
31cb807db3 | ||
|
|
3326c26a60 | ||
|
|
8d70cc0b0f | ||
|
|
3558d1d010 | ||
|
|
be47c9f44a | ||
|
|
6dab8c3380 | ||
|
|
bbc8e7b58c | ||
|
|
9d8c98395e | ||
|
|
abbf13d7bf | ||
|
|
431c34024c | ||
|
|
ba50def217 | ||
|
|
7592acf224 | ||
|
|
62f5a4d3bc | ||
|
|
0c345e76d4 | ||
|
|
d4ec341573 | ||
|
|
371778e0e7 | ||
|
|
ca58e0db21 | ||
|
|
a6e017dc3c | ||
|
|
e843836292 | ||
|
|
e7447a46be | ||
|
|
ec23bf1b1c | ||
|
|
285240fd2d | ||
|
|
bf5cad7a0c | ||
|
|
c81ba225c9 | ||
|
|
79967399fe | ||
|
|
adced1b3dc | ||
|
|
0e64a4773a | ||
|
|
f86dbaed74 | ||
|
|
6612b98ddb | ||
|
|
67ef3fd2c5 | ||
|
|
4ae4b9fdf5 | ||
|
|
e1c5969b0e | ||
|
|
029c114c4c | ||
|
|
bc7f1cf5ac | ||
|
|
34c458f075 | ||
|
|
7e84617d24 | ||
|
|
aab533c046 | ||
|
|
b2e40572e5 | ||
|
|
f175cad6d8 | ||
|
|
2d2b13361b | ||
|
|
aa7b0becf7 | ||
|
|
4f3e2c2e82 | ||
|
|
ebee4b6721 | ||
|
|
e383ef95bc | ||
|
|
2741c38c0d | ||
|
|
a15b93432a | ||
|
|
3d4ff7ae02 | ||
|
|
cc3f8eba8b | ||
|
|
5802844f52 | ||
|
|
98c3d362e5 | ||
|
|
9c6f1ac45a | ||
|
|
3e340bb23d | ||
|
|
1bbcc0ea44 | ||
|
|
b3f1204c64 | ||
|
|
df731d8244 | ||
|
|
29857b3b19 | ||
|
|
b608c191c1 | ||
|
|
d3d0c28f61 | ||
|
|
c78d065d51 | ||
|
|
171bc9da21 | ||
|
|
2bb480759f | ||
|
|
4ff8df73bc | ||
|
|
8631eaaf40 | ||
|
|
ed2aa7c90f | ||
|
|
8cd7d36982 | ||
|
|
d843de261e | ||
|
|
c60cff5eb6 | ||
|
|
18726b72ea | ||
|
|
04e10363bb | ||
|
|
ee4d49c398 | ||
|
|
a6774396bd | ||
|
|
c37b478ed6 | ||
|
|
339026a0f2 | ||
|
|
e68110f303 | ||
|
|
1490271272 | ||
|
|
8faa9d3f63 | ||
|
|
8297d8f0cb | ||
|
|
439c3a866b | ||
|
|
8954964c32 | ||
|
|
7e75fa6a66 | ||
|
|
ced46026e5 | ||
|
|
36ba62e69a | ||
|
|
721505f7c9 | ||
|
|
e4eb3896dd | ||
|
|
98df276818 | ||
|
|
c3bad2bd04 | ||
|
|
e4ad3d311d | ||
|
|
fc05e7d8b1 | ||
|
|
d58a21ca5f | ||
|
|
03e08d7918 | ||
|
|
6ce7cc9d6a | ||
|
|
2646423be7 | ||
|
|
625ea05d3f | ||
|
|
f963397726 | ||
|
|
7c97bab944 | ||
|
|
89052bec27 | ||
|
|
99120af181 | ||
|
|
166f949592 | ||
|
|
145d93073c | ||
|
|
db00cb1613 | ||
|
|
1420393b00 | ||
|
|
440445aa8b | ||
|
|
07bccafd05 | ||
|
|
6df979f8c8 | ||
|
|
aef27c4387 | ||
|
|
d3061ac0f7 | ||
|
|
4adc16bcdd | ||
|
|
6a051be85a | ||
|
|
cbb9881003 | ||
|
|
be40ac8aad | ||
|
|
919a1e5286 | ||
|
|
85acee5dcc | ||
|
|
77326d2c17 | ||
|
|
ea3b08526d | ||
|
|
437377b5d5 | ||
|
|
c7f2e570ed | ||
|
|
b9540fc9f1 | ||
|
|
fa8de3058f | ||
|
|
1194f8941c | ||
|
|
1a922f0f28 | ||
|
|
ce1d7c0c90 | ||
|
|
3c50ac6f04 | ||
|
|
b783a7468e | ||
|
|
4e2c17ee02 | ||
|
|
578a910ad0 | ||
|
|
e0f4fb0952 | ||
|
|
6ad6bf8b5a | ||
|
|
0b702d27de | ||
|
|
d3f2c6e505 | ||
|
|
12d62940bc | ||
|
|
ffcece130a | ||
|
|
e2d7743a80 | ||
|
|
6298312cf0 | ||
|
|
1a3a801857 | ||
|
|
5ee4a99de0 | ||
|
|
9097925163 | ||
|
|
f29ddb0e05 | ||
|
|
96cd49d43a | ||
|
|
cd666f61e8 | ||
|
|
1224e0883a | ||
|
|
fde95d5ccf | ||
|
|
d0e12bd379 | ||
|
|
9acbe3e44f | ||
|
|
eb9b99b5ec | ||
|
|
42f06bf81a | ||
|
|
76dd3698ce | ||
|
|
a571574a1c | ||
|
|
223c603a8c | ||
|
|
91716f6e06 | ||
|
|
b8345534c5 | ||
|
|
33cba8392a | ||
|
|
2ab6a762c8 | ||
|
|
cc68950e7a | ||
|
|
59c1483fb9 | ||
|
|
cb37bf2446 | ||
|
|
3a34e2869b | ||
|
|
849333d43e | ||
|
|
a15813c4a7 | ||
|
|
a606fd688c |
87
AUTHORS.txt
87
AUTHORS.txt
@@ -1,6 +1,6 @@
|
|||||||
OpenSceneGraph Library 2.8.0
|
OpenSceneGraph Library 2.8.2
|
||||||
|
|
||||||
364 Contributors:
|
373 Contributors:
|
||||||
|
|
||||||
Firstname Surname
|
Firstname Surname
|
||||||
-----------------
|
-----------------
|
||||||
@@ -9,9 +9,9 @@ Don Burns
|
|||||||
Marco Jez
|
Marco Jez
|
||||||
Paul Martz
|
Paul Martz
|
||||||
Mike Weiblen
|
Mike Weiblen
|
||||||
|
Mathias Fr<46>hlich
|
||||||
Eric Wing
|
Eric Wing
|
||||||
Stephan Huber
|
Stephan Huber
|
||||||
Mathias Fr<46>hlich
|
|
||||||
Brede Johansen
|
Brede Johansen
|
||||||
Geoff Michel
|
Geoff Michel
|
||||||
Farshid Lashkari
|
Farshid Lashkari
|
||||||
@@ -26,67 +26,70 @@ Luigi Calori
|
|||||||
Trajce Nikolov
|
Trajce Nikolov
|
||||||
Mike Wittman
|
Mike Wittman
|
||||||
Wojciech Lewandowski
|
Wojciech Lewandowski
|
||||||
|
Paul Melis
|
||||||
Colin McDonald
|
Colin McDonald
|
||||||
Andy Skinner
|
Andy Skinner
|
||||||
Roger James
|
Roger James
|
||||||
Pavel Moloshtan
|
Pavel Moloshtan
|
||||||
|
Mattias Helsing
|
||||||
Tom Jolley
|
Tom Jolley
|
||||||
Jeremy Moles
|
Jeremy Moles
|
||||||
Paul Melis
|
|
||||||
Norman Vine
|
|
||||||
Mattias Helsing
|
|
||||||
Jason Beverage
|
Jason Beverage
|
||||||
|
Norman Vine
|
||||||
|
Cedric Pinson
|
||||||
Art Tevs
|
Art Tevs
|
||||||
Alberto Farre
|
Alberto Farre
|
||||||
|
Roland Smeenk
|
||||||
|
Michael Platings
|
||||||
Andr<EFBFBD> Garneau
|
Andr<EFBFBD> Garneau
|
||||||
Ruben Lopez
|
Ruben Lopez
|
||||||
Randall Hopper
|
Randall Hopper
|
||||||
Michael Platings
|
|
||||||
Cedric Pinson
|
|
||||||
Adrian Egli
|
|
||||||
Olaf Flebbe
|
|
||||||
Jason Daly
|
Jason Daly
|
||||||
J.P. Delport
|
J.P. Delport
|
||||||
|
Adrian Egli
|
||||||
|
Olaf Flebbe
|
||||||
|
Mathieu Marache
|
||||||
Gideon May
|
Gideon May
|
||||||
Don Tidrow
|
Don Tidrow
|
||||||
Sherman Wilcox
|
Sherman Wilcox
|
||||||
Romano Jos<6F> Magacho da Silva
|
Romano Jos<6F> Magacho da Silva
|
||||||
Roland Smeenk
|
|
||||||
Per Fahlberg
|
Per Fahlberg
|
||||||
Michael Gronager
|
Michael Gronager
|
||||||
Mathieu Marache
|
|
||||||
Joakim Simonsson
|
Joakim Simonsson
|
||||||
David Spilling
|
David Spilling
|
||||||
Daniel Sj<53>lie
|
Daniel Sj<53>lie
|
||||||
Chris Hanson
|
Chris Hanson
|
||||||
Philip Lowman
|
|
||||||
Alberto Luaces
|
Alberto Luaces
|
||||||
Melchior Franz
|
Philip Lowman
|
||||||
Chris Denham
|
Chris Denham
|
||||||
|
Melchior Franz
|
||||||
|
Lionel Lagarde
|
||||||
|
David Fries
|
||||||
|
Bryan Thrall
|
||||||
|
Terry Welsh
|
||||||
Serge Lages
|
Serge Lages
|
||||||
Joran Jessurun
|
Joran Jessurun
|
||||||
Frederic Marmond
|
Frederic Marmond
|
||||||
David Fries
|
|
||||||
Boris Bralo
|
Boris Bralo
|
||||||
Yefei He
|
Yefei He
|
||||||
Tim Moore
|
Tim Moore
|
||||||
Terry Welsh
|
|
||||||
Stephane Lamoliatte
|
Stephane Lamoliatte
|
||||||
Sondra Iverson
|
Sondra Iverson
|
||||||
Rune Schmidt Jensen
|
Rune Schmidt Jensen
|
||||||
Rainer Oder
|
Rainer Oder
|
||||||
|
Neil Groves
|
||||||
Mike Connell
|
Mike Connell
|
||||||
|
Martin Aumueller
|
||||||
Mario Valle
|
Mario Valle
|
||||||
Gordon Tomlinson
|
Gordon Tomlinson
|
||||||
Gino van den Bergen
|
Gino van den Bergen
|
||||||
Carlo Camporesi
|
Carlo Camporesi
|
||||||
Bryan Thrall
|
|
||||||
Ben Discoe
|
Ben Discoe
|
||||||
Andreas Ekstrand
|
Andreas Ekstrand
|
||||||
|
Thibault Genessay
|
||||||
|
Sukender
|
||||||
Sasa Bistrovic
|
Sasa Bistrovic
|
||||||
Neil Groves
|
|
||||||
Martin Naylor
|
Martin Naylor
|
||||||
Martin Aumueller
|
|
||||||
Markus Trenkwalder
|
Markus Trenkwalder
|
||||||
Loic Dachary
|
Loic Dachary
|
||||||
Joseph Steel
|
Joseph Steel
|
||||||
@@ -96,7 +99,6 @@ Jan Ciger
|
|||||||
Glenn Waldron
|
Glenn Waldron
|
||||||
Brad Colbert
|
Brad Colbert
|
||||||
Vivek Rajan
|
Vivek Rajan
|
||||||
Thibault Genessay
|
|
||||||
Sean Spicer
|
Sean Spicer
|
||||||
Ravi Mathur
|
Ravi Mathur
|
||||||
Peter Hrenka
|
Peter Hrenka
|
||||||
@@ -105,7 +107,6 @@ Neil Salter
|
|||||||
Mihai Radu
|
Mihai Radu
|
||||||
Michael Hartman
|
Michael Hartman
|
||||||
Luc Frauciel
|
Luc Frauciel
|
||||||
Lionel Lagarde
|
|
||||||
Laurens Voerman
|
Laurens Voerman
|
||||||
David Guthrie
|
David Guthrie
|
||||||
Corbin Holtz
|
Corbin Holtz
|
||||||
@@ -114,11 +115,12 @@ Blasius Czink
|
|||||||
Toshiyuki Takahei
|
Toshiyuki Takahei
|
||||||
Thom DeCarlo
|
Thom DeCarlo
|
||||||
Tatsuhiro Nishioka
|
Tatsuhiro Nishioka
|
||||||
Sukender
|
|
||||||
Simon Julier
|
Simon Julier
|
||||||
Sebastien Grignard
|
Sebastien Grignard
|
||||||
Romano Magacho
|
Romano Magacho
|
||||||
Richard Schmidt
|
Richard Schmidt
|
||||||
|
Riccardo Corsi
|
||||||
|
Ralf Habacker
|
||||||
Paul de Repentigny
|
Paul de Repentigny
|
||||||
Liang Aibin
|
Liang Aibin
|
||||||
Leandro Motta Barros
|
Leandro Motta Barros
|
||||||
@@ -134,10 +136,9 @@ Uwe Woessner
|
|||||||
Tony Horrobin
|
Tony Horrobin
|
||||||
Sohey Yamamoto
|
Sohey Yamamoto
|
||||||
Rudolf Wiedemann
|
Rudolf Wiedemann
|
||||||
Riccardo Corsi
|
|
||||||
Ralf Habacker
|
|
||||||
Rafa Gaitan
|
Rafa Gaitan
|
||||||
Phil Atkin
|
Phil Atkin
|
||||||
|
Miguel Escriva
|
||||||
Mattias Linde
|
Mattias Linde
|
||||||
Maria Ten
|
Maria Ten
|
||||||
Ken Sewell
|
Ken Sewell
|
||||||
@@ -145,9 +146,11 @@ Julian Ortiz
|
|||||||
Jeremy Bell
|
Jeremy Bell
|
||||||
Jaromir Vitek
|
Jaromir Vitek
|
||||||
James French
|
James French
|
||||||
|
Gary Quinn
|
||||||
Garrett Potts
|
Garrett Potts
|
||||||
Gabor Dorka
|
Gabor Dorka
|
||||||
Fabio Mierlo
|
Fabio Mierlo
|
||||||
|
Fabien Lavignotte
|
||||||
Doug McCorkle
|
Doug McCorkle
|
||||||
Donn Mielcarek
|
Donn Mielcarek
|
||||||
Donald Cipperly
|
Donald Cipperly
|
||||||
@@ -165,6 +168,7 @@ Wang Rui
|
|||||||
Tugkan Calapoglu
|
Tugkan Calapoglu
|
||||||
Tim Daoust
|
Tim Daoust
|
||||||
Terrex
|
Terrex
|
||||||
|
Tanguy Fautr<74>
|
||||||
Sylvain Marie
|
Sylvain Marie
|
||||||
Steve Lunsford
|
Steve Lunsford
|
||||||
Stephane Simon
|
Stephane Simon
|
||||||
@@ -172,16 +176,22 @@ Stephan Eilemann
|
|||||||
Stanislav Blinov
|
Stanislav Blinov
|
||||||
Sergey Leontyev
|
Sergey Leontyev
|
||||||
Sebastian Messerschmidt
|
Sebastian Messerschmidt
|
||||||
|
Rene Molenaar
|
||||||
Ralf Kern
|
Ralf Kern
|
||||||
|
Pierre Haritchabalet
|
||||||
Perry Miller
|
Perry Miller
|
||||||
|
Paul Obermeier
|
||||||
|
Neil Hughes
|
||||||
Nathan Monteleone
|
Nathan Monteleone
|
||||||
Miguel Escriva
|
Morn<EFBFBD> Pistorius
|
||||||
Michael Henheffer
|
Michael Henheffer
|
||||||
Michael Guerrero
|
Michael Guerrero
|
||||||
Maya Leonard
|
Maya Leonard
|
||||||
Max Bandazian
|
Max Bandazian
|
||||||
Mathew May
|
Mathew May
|
||||||
|
Martin Spott
|
||||||
Martijn Kragtwijk
|
Martijn Kragtwijk
|
||||||
|
Konstantin Sinitsyn
|
||||||
Kevin Moiule
|
Kevin Moiule
|
||||||
Keith Steffen
|
Keith Steffen
|
||||||
Katharina Plugge
|
Katharina Plugge
|
||||||
@@ -196,9 +206,11 @@ Gustavo Wagner
|
|||||||
Guillaume Chouvenc
|
Guillaume Chouvenc
|
||||||
Gerrick Bivins
|
Gerrick Bivins
|
||||||
George Tarantilis
|
George Tarantilis
|
||||||
|
Frederic Bouvier
|
||||||
Ferdi Smit
|
Ferdi Smit
|
||||||
Ewe Woessner
|
Ewe Woessner
|
||||||
Erik den Dekker
|
Erik den Dekker
|
||||||
|
Emmanuel Roche
|
||||||
Edgar Ellis
|
Edgar Ellis
|
||||||
Don Leich
|
Don Leich
|
||||||
David Ergo
|
David Ergo
|
||||||
@@ -225,8 +237,6 @@ Tomas Hnilica
|
|||||||
Tino Schwarze
|
Tino Schwarze
|
||||||
Thomas Weidner
|
Thomas Weidner
|
||||||
Thom Carlo
|
Thom Carlo
|
||||||
Tery Welsh
|
|
||||||
Tanguy Fautr<74>
|
|
||||||
Steven Thomas
|
Steven Thomas
|
||||||
Simon Hammett
|
Simon Hammett
|
||||||
Sid Byce
|
Sid Byce
|
||||||
@@ -234,13 +244,14 @@ Shuxing Xiao
|
|||||||
Shane Arnott
|
Shane Arnott
|
||||||
Sebastien Kuntz
|
Sebastien Kuntz
|
||||||
Ruth Lang
|
Ruth Lang
|
||||||
|
Ruben Smelik
|
||||||
|
Ross Anderson
|
||||||
Ronny Krueger
|
Ronny Krueger
|
||||||
Robert Swain
|
Robert Swain
|
||||||
Rob Bloemkool
|
Rob Bloemkool
|
||||||
Rick Pingry
|
Rick Pingry
|
||||||
Rick Appleton
|
Rick Appleton
|
||||||
Ricard Schmidt
|
Ricard Schmidt
|
||||||
Rene Molenaar
|
|
||||||
Reinhard Sainitzer
|
Reinhard Sainitzer
|
||||||
Rein Kadijk
|
Rein Kadijk
|
||||||
Raymond de Vries
|
Raymond de Vries
|
||||||
@@ -249,9 +260,10 @@ Qing Shen
|
|||||||
Piotr Rak
|
Piotr Rak
|
||||||
Philipp Siemoleit
|
Philipp Siemoleit
|
||||||
Philipp M<>chler
|
Philipp M<>chler
|
||||||
|
Petr Salinger
|
||||||
Paul Palumbo
|
Paul Palumbo
|
||||||
Paul Obermeier
|
|
||||||
Paul Fredrikson
|
Paul Fredrikson
|
||||||
|
Paul Fotheringham
|
||||||
Patrick Hartling
|
Patrick Hartling
|
||||||
Parag Chaudhur
|
Parag Chaudhur
|
||||||
Panagiotis Papadakos
|
Panagiotis Papadakos
|
||||||
@@ -259,10 +271,8 @@ Panagiotis Koutsourakis
|
|||||||
Orhun Birsoy
|
Orhun Birsoy
|
||||||
Ole-Morten Duesund
|
Ole-Morten Duesund
|
||||||
Nicolas Brodu
|
Nicolas Brodu
|
||||||
Neil Hughes
|
|
||||||
Nathan Cournia
|
Nathan Cournia
|
||||||
Morten Haukness
|
Morten Haukness
|
||||||
Morn<EFBFBD> Pistorius
|
|
||||||
Mirko Viviani
|
Mirko Viviani
|
||||||
Mikkel Gjøl
|
Mikkel Gjøl
|
||||||
Mike Garrity
|
Mike Garrity
|
||||||
@@ -278,13 +288,11 @@ Matt Burke
|
|||||||
Mathia Walker
|
Mathia Walker
|
||||||
Mason Menninger
|
Mason Menninger
|
||||||
Martins Innus
|
Martins Innus
|
||||||
Martin Spott
|
|
||||||
Martin Amueller
|
|
||||||
Mario Guimaraes
|
Mario Guimaraes
|
||||||
Marin Lavery
|
Marin Lavery
|
||||||
Marco Lehmann
|
Marco Lehmann
|
||||||
Marcin Prus
|
Marcin Prus
|
||||||
Maceij Krol
|
Maciej Krol
|
||||||
Lukas Diduch
|
Lukas Diduch
|
||||||
Louis Hamilton
|
Louis Hamilton
|
||||||
Lilin Xiong
|
Lilin Xiong
|
||||||
@@ -303,28 +311,28 @@ John Donovan
|
|||||||
John Davis
|
John Davis
|
||||||
John Argentieri
|
John Argentieri
|
||||||
Joan Abadie
|
Joan Abadie
|
||||||
Jeoen den Dekker
|
Jeroen den Dekker
|
||||||
Jean-Christophe Lombardo
|
Jean-Christophe Lombardo
|
||||||
Jay Zuckerman
|
Jay Zuckerman
|
||||||
Jason Howlett
|
Jason Howlett
|
||||||
Jason Ballenger
|
Jason Ballenger
|
||||||
J.E. Hoffmann
|
J.E. Hoffmann
|
||||||
|
Humar Carmona
|
||||||
Henrique Bucher
|
Henrique Bucher
|
||||||
Hautio Jari
|
Hautio Jari
|
||||||
Guillaume Millet
|
Guillaume Millet
|
||||||
Graeme Harkness
|
Graeme Harkness
|
||||||
|
Glen Waldron
|
||||||
Gian Lorenzetto
|
Gian Lorenzetto
|
||||||
George Papagiannakis
|
George Papagiannakis
|
||||||
Gary Quinn
|
|
||||||
Galen Faidley
|
Galen Faidley
|
||||||
Frederic Bouvier
|
|
||||||
Frank Warmerdam
|
Frank Warmerdam
|
||||||
|
Frank Midgley
|
||||||
Frank Lindeman
|
Frank Lindeman
|
||||||
Frank Lichtenheld
|
Frank Lichtenheld
|
||||||
Ferdinand Cornelissen
|
Ferdinand Cornelissen
|
||||||
Fabien Lavignotte
|
Fajran Iman
|
||||||
Fabien Dachicourt
|
Fabien Dachicourt
|
||||||
Emmanuel Roche
|
|
||||||
Edmond Gheury
|
Edmond Gheury
|
||||||
Ed Ralston
|
Ed Ralston
|
||||||
Duvan Cope
|
Duvan Cope
|
||||||
@@ -338,6 +346,7 @@ Danny Valente
|
|||||||
Daniel Stien
|
Daniel Stien
|
||||||
Dan Minor
|
Dan Minor
|
||||||
Cyril Brulebois
|
Cyril Brulebois
|
||||||
|
Cory Riddell
|
||||||
Clay Fowler
|
Clay Fowler
|
||||||
Chuck Sembroski
|
Chuck Sembroski
|
||||||
Chuck Seberion
|
Chuck Seberion
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
@@ -28,12 +30,12 @@ PROJECT(OpenSceneGraph)
|
|||||||
|
|
||||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
||||||
SET(OPENSCENEGRAPH_MINOR_VERSION 8)
|
SET(OPENSCENEGRAPH_MINOR_VERSION 8)
|
||||||
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
|
SET(OPENSCENEGRAPH_PATCH_VERSION 3)
|
||||||
SET(OPENSCENEGRAPH_SOVERSION 55)
|
SET(OPENSCENEGRAPH_SOVERSION 65)
|
||||||
|
|
||||||
# set to 0 when not a release candidate, non zero means that any generated
|
# set to 0 when not a release candidate, non zero means that any generated
|
||||||
# svn tags will be treated as release candidates of given number
|
# svn tags will be treated as release candidates of given number
|
||||||
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 1)
|
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0)
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
||||||
|
|
||||||
@@ -81,8 +83,9 @@ ENDIF(CMAKE_SYSTEM MATCHES IRIX)
|
|||||||
OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making svn branches, tags, updating ChangeLog." OFF)
|
OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making svn branches, tags, updating ChangeLog." OFF)
|
||||||
IF (OSG_MAINTAINER)
|
IF (OSG_MAINTAINER)
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_SVN "trunk")
|
#SET(OPENSCENEGRAPH_SVN "trunk")
|
||||||
#SET(OPENSCENEGRAPH_SVN "branches")
|
SET(OPENSCENEGRAPH_SVN "branches")
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
|
SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -96,7 +99,7 @@ IF (OSG_MAINTAINER)
|
|||||||
IF (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
IF (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||||
SET(SVNSOURCEDIR ${SVNTRUNKDIR})
|
SET(SVNSOURCEDIR ${SVNTRUNKDIR})
|
||||||
ELSE (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
ELSE (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||||
SET(SVNSOURCEDIR ${SVNBRANCH_DIR}/${OPENSCENEGRAPH_BRANCH})
|
SET(SVNSOURCEDIR ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH})
|
||||||
ENDIF(OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
ENDIF(OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||||
|
|
||||||
|
|
||||||
@@ -130,7 +133,7 @@ IF (OSG_MAINTAINER)
|
|||||||
|
|
||||||
ADD_CUSTOM_TARGET(ChangeLog
|
ADD_CUSTOM_TARGET(ChangeLog
|
||||||
COMMAND ${SVNCOMMAND} update
|
COMMAND ${SVNCOMMAND} update
|
||||||
COMMAND ${GENERATELOGS}
|
COMMAND ${GENERATELOGS} ${SVNSOURCEDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(OSG_MAINTAINER)
|
ENDIF(OSG_MAINTAINER)
|
||||||
@@ -262,6 +265,8 @@ MARK_AS_ADVANCED(OSG_DISABLE_MSVC_WARNINGS)
|
|||||||
|
|
||||||
OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON)
|
OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON)
|
||||||
|
|
||||||
|
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Set Config file
|
# Set Config file
|
||||||
|
|
||||||
@@ -292,17 +297,19 @@ FIND_PACKAGE(Inventor)
|
|||||||
FIND_PACKAGE(Jasper)
|
FIND_PACKAGE(Jasper)
|
||||||
FIND_PACKAGE(OpenEXR)
|
FIND_PACKAGE(OpenEXR)
|
||||||
FIND_PACKAGE(COLLADA)
|
FIND_PACKAGE(COLLADA)
|
||||||
|
FIND_PACKAGE(FBX)
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
FIND_PACKAGE(Xine)
|
FIND_PACKAGE(Xine)
|
||||||
FIND_PACKAGE(OpenVRML)
|
FIND_PACKAGE(OpenVRML)
|
||||||
FIND_PACKAGE(Performer)
|
FIND_PACKAGE(Performer)
|
||||||
FIND_PACKAGE(ZLIB)
|
|
||||||
FIND_PACKAGE(GDAL)
|
FIND_PACKAGE(GDAL)
|
||||||
FIND_PACKAGE(CURL)
|
FIND_PACKAGE(CURL)
|
||||||
FIND_PACKAGE(ZLIB)
|
|
||||||
FIND_PACKAGE(ITK)
|
FIND_PACKAGE(ITK)
|
||||||
FIND_PACKAGE(LibVNCServer)
|
FIND_PACKAGE(LibVNCServer)
|
||||||
FIND_PACKAGE(OurDCMTK)
|
FIND_PACKAGE(OurDCMTK)
|
||||||
|
FIND_PACKAGE(OpenAL)
|
||||||
FIND_PACKAGE(XUL)
|
FIND_PACKAGE(XUL)
|
||||||
|
FIND_PACKAGE(FFmpeg)
|
||||||
|
|
||||||
#use pkg-config to find various modues
|
#use pkg-config to find various modues
|
||||||
INCLUDE(FindPkgConfig OPTIONAL)
|
INCLUDE(FindPkgConfig OPTIONAL)
|
||||||
@@ -547,14 +554,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
# errors instead of warnings for certain issues, including superfluous
|
# errors instead of warnings for certain issues, including superfluous
|
||||||
# semicolons and commas, and the use of long long. -fpermissive seems
|
# semicolons and commas, and the use of long long. -fpermissive seems
|
||||||
# to be the workaround.
|
# to be the workaround.
|
||||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive)
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive)
|
||||||
|
|
||||||
IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
# Previous included -Wformat=2 in OSG_AGGRESSIVE_WARNING_FLAGS but had to remove it due to standard library errors
|
||||||
|
|
||||||
# disable the "warning: format not a string literal and no format arguments" emited from std library ostream support
|
|
||||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wformat=0)
|
|
||||||
|
|
||||||
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|
||||||
|
|
||||||
|
|
||||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
@@ -575,7 +577,14 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
# This part is for the CMake menu option to toggle the warnings on/off.
|
# This part is for the CMake menu option to toggle the warnings on/off.
|
||||||
# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
|
# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
|
||||||
IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
||||||
OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ON)
|
|
||||||
|
IF (APPLE)
|
||||||
|
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF)
|
||||||
|
ELSE(APPLE)
|
||||||
|
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS})
|
||||||
MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS)
|
MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS)
|
||||||
|
|
||||||
IF(OSG_USE_AGGRESSIVE_WARNINGS)
|
IF(OSG_USE_AGGRESSIVE_WARNINGS)
|
||||||
|
|||||||
@@ -55,12 +55,13 @@ ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES SEARCHPATHLIST DEBUGS
|
|||||||
|
|
||||||
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
||||||
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
|
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
|
||||||
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
|
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235;freetype237" ${OSG_3RDPARTY_BIN} "_D")
|
||||||
IF(FREETYPE_FOUND)
|
IF(FREETYPE_FOUND)
|
||||||
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
||||||
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
|
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
|
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||||
ENDIF(FREETYPE_FOUND)
|
ENDIF(FREETYPE_FOUND)
|
||||||
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D")
|
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D")
|
||||||
FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
|
FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
|
||||||
|
|||||||
@@ -13,7 +13,21 @@
|
|||||||
#
|
#
|
||||||
# Created by Robert Osfield.
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory")
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
SET(COLLADA_BUILDNAME "mac")
|
||||||
|
ELSEIF(MINGW)
|
||||||
|
SET(COLLADA_BUILDNAME "mingw")
|
||||||
|
ELSEIF(MSVC90)
|
||||||
|
SET(COLLADA_BUILDNAME "vc9")
|
||||||
|
ELSE(APPLE)
|
||||||
|
SET(COLLADA_BUILDNAME "vc8")
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
||||||
|
${COLLADA_DOM_ROOT}/include
|
||||||
$ENV{COLLADA_DIR}/include
|
$ENV{COLLADA_DIR}/include
|
||||||
$ENV{COLLADA_DIR}
|
$ENV{COLLADA_DIR}
|
||||||
$ENV{OSGDIR}/include
|
$ENV{OSGDIR}/include
|
||||||
@@ -34,9 +48,10 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
||||||
NAMES collada_dom collada14dom libcollada14dom21
|
NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
||||||
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
$ENV{COLLADA_DIR}
|
$ENV{COLLADA_DIR}
|
||||||
@@ -58,9 +73,10 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
||||||
NAMES collada_dom-d collada14dom-d libcollada14dom21-d
|
NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
||||||
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
$ENV{COLLADA_DIR}
|
$ENV{COLLADA_DIR}
|
||||||
@@ -82,9 +98,10 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
||||||
NAMES collada_dom-s collada14dom-s libcollada14dom21-s
|
NAMES libcollada14dom21-s libcollada14dom22-s
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
||||||
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
$ENV{COLLADA_DIR}
|
$ENV{COLLADA_DIR}
|
||||||
@@ -106,9 +123,10 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
||||||
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd
|
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd libcollada14dom22-sd
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
||||||
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
$ENV{COLLADA_DIR}
|
$ENV{COLLADA_DIR}
|
||||||
@@ -129,6 +147,111 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
/usr/freeware/lib64
|
/usr/freeware/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# find extra libraries that the static linking requires
|
||||||
|
|
||||||
|
FIND_PACKAGE(LibXml2)
|
||||||
|
IF (LIBXML2_FOUND)
|
||||||
|
SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
|
||||||
|
ELSE(LIBXML2_FOUND)
|
||||||
|
IF(WIN32)
|
||||||
|
FIND_LIBRARY(COLLADA_LIBXML_LIBRARY
|
||||||
|
NAMES libxml2
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||||
|
)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
ENDIF(LIBXML2_FOUND)
|
||||||
|
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
|
IF (ZLIB_FOUND)
|
||||||
|
SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY})
|
||||||
|
ELSE(ZLIB_FOUND)
|
||||||
|
IF(WIN32)
|
||||||
|
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
||||||
|
NAMES zlib
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||||
|
)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
||||||
|
NAMES pcrecpp
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
||||||
|
NAMES pcrecpp-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
||||||
|
NAMES pcre
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
||||||
|
NAMES pcre-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
||||||
|
NAMES minizip
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
||||||
|
NAMES minizip-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
|
NAMES libboost_filesystem boost_filesystem
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
||||||
|
NAMES libboost_filesystem-d boost_filesystem-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
||||||
|
NAMES libboost_system boost_system
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
||||||
|
NAMES libboost_system-d boost_system-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
SET(COLLADA_FOUND "NO")
|
SET(COLLADA_FOUND "NO")
|
||||||
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||||
IF (COLLADA_INCLUDE_DIR)
|
IF (COLLADA_INCLUDE_DIR)
|
||||||
|
|||||||
51
CMakeModules/FindFBX.cmake
Normal file
51
CMakeModules/FindFBX.cmake
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Locate FBX
|
||||||
|
# This module defines:
|
||||||
|
# FBX_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# FBX_LIBRARY, FBX_LIBRARY_DEBUG
|
||||||
|
# FBX_FOUND
|
||||||
|
#
|
||||||
|
# $FBX_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$FBX_DIR
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2010.2" CACHE PATH "Location of FBX SDK directory")
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(FBX_ROOT $ENV{FBX_DIR} CACHE PATH "Location of FBX SDK directory")
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
SET(FBX_LIBNAME "libfbxsdk_gcc4_ub")
|
||||||
|
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
SET(FBX_LIBNAME "libfbxsdk_gcc4")#TODO: libs are provided for GCC 3.4 & 4.0 in both 32 and 64 bit versions, but I don't know how to confgure that here.
|
||||||
|
ELSEIF(MSVC71)
|
||||||
|
SET(FBX_LIBNAME "fbxsdk_md2003")
|
||||||
|
ELSEIF(MSVC80)
|
||||||
|
SET(FBX_LIBNAME "fbxsdk_md2005")
|
||||||
|
ELSEIF(MSVC90 OR MSVC_VER>1500)
|
||||||
|
SET(FBX_LIBNAME "fbxsdk_md2008")
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
IF(CMAKE_CL_64)
|
||||||
|
SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64)
|
||||||
|
ENDIF(CMAKE_CL_64)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME})
|
||||||
|
ELSE(APPLE)
|
||||||
|
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
|
||||||
|
${FBX_ROOT}/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(FBX_LIBRARY ${FBX_LIBNAME} ${FBX_ROOT}/lib)
|
||||||
|
|
||||||
|
FIND_LIBRARY(FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG} ${FBX_ROOT}/lib)
|
||||||
|
|
||||||
|
IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
|
||||||
|
SET(FBX_FOUND "YES")
|
||||||
|
ELSE(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
|
||||||
|
SET(FBX_FOUND "NO")
|
||||||
|
ENDIF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
|
||||||
165
CMakeModules/FindFFmpeg.cmake
Normal file
165
CMakeModules/FindFFmpeg.cmake
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
# Locate ffmpeg
|
||||||
|
# This module defines
|
||||||
|
# FFMPEG_LIBRARIES
|
||||||
|
# FFMPEG_FOUND, if false, do not try to link to ffmpeg
|
||||||
|
# FFMPEG_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $FFMPEG_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$FFMPEG_DIR
|
||||||
|
#
|
||||||
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
|
||||||
|
#In ffmpeg code, old version use "#include <header.h>" and newer use "#include <libname/header.h>"
|
||||||
|
#In OSG ffmpeg plugin, we use "#include <header.h>" for compatibility with old version of ffmpeg
|
||||||
|
|
||||||
|
#We have to search the path which contain the header.h (usefull for old version)
|
||||||
|
#and search the path which contain the libname/header.h (usefull for new version)
|
||||||
|
|
||||||
|
#Then we need to include ${FFMPEG_libname_INCLUDE_DIRS} (in old version case, use by ffmpeg header and osg plugin code)
|
||||||
|
# (in new version case, use by ffmpeg header)
|
||||||
|
#and ${FFMPEG_libname_INCLUDE_DIRS/libname} (in new version case, use by osg plugin code)
|
||||||
|
|
||||||
|
|
||||||
|
# Macro to find header and lib directories
|
||||||
|
# example: FFMPEG_FIND(AVFORMAT avformat avformat.h)
|
||||||
|
MACRO(FFMPEG_FIND varname shortname headername)
|
||||||
|
# old version of ffmpeg put header in $prefix/include/[ffmpeg]
|
||||||
|
# so try to find header in include directory
|
||||||
|
|
||||||
|
FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS lib${shortname}/${headername}
|
||||||
|
PATHS
|
||||||
|
${FFMPEG_ROOT}/include
|
||||||
|
$ENV{FFMPEG_DIR}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
/usr/freeware/include
|
||||||
|
PATH_SUFFIXES ffmpeg
|
||||||
|
DOC "Location of FFMPEG Headers"
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS ${headername}
|
||||||
|
PATHS
|
||||||
|
${FFMPEG_ROOT}/include
|
||||||
|
$ENV{FFMPEG_DIR}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
/usr/freeware/include
|
||||||
|
PATH_SUFFIXES ffmpeg
|
||||||
|
DOC "Location of FFMPEG Headers"
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES
|
||||||
|
NAMES ${shortname}
|
||||||
|
PATHS
|
||||||
|
${FFMPEG_ROOT}/lib
|
||||||
|
$ENV{FFMPEG_DIR}/lib
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/local/lib64
|
||||||
|
/usr/lib
|
||||||
|
/usr/lib64
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
DOC "Location of FFMPEG Libraries"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS)
|
||||||
|
SET(FFMPEG_${varname}_FOUND 1)
|
||||||
|
ENDIF(FFMPEG_${varname}_LIBRARIES AND FFMPEG_${varname}_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
ENDMACRO(FFMPEG_FIND)
|
||||||
|
|
||||||
|
SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG")
|
||||||
|
|
||||||
|
# find stdint.h
|
||||||
|
IF(WIN32)
|
||||||
|
|
||||||
|
FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h
|
||||||
|
PATHS
|
||||||
|
${FFMPEG_ROOT}/include
|
||||||
|
$ENV{FFMPEG_DIR}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
/usr/freeware/include
|
||||||
|
PATH_SUFFIXES ffmpeg
|
||||||
|
DOC "Location of FFMPEG stdint.h Header"
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (FFMPEG_STDINT_INCLUDE_DIR)
|
||||||
|
SET(STDINT_OK TRUE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
ELSE()
|
||||||
|
|
||||||
|
SET(STDINT_OK TRUE)
|
||||||
|
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
|
||||||
|
FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
|
||||||
|
FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
|
||||||
|
FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
|
||||||
|
FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here.
|
||||||
|
|
||||||
|
SET(FFMPEG_FOUND "NO")
|
||||||
|
# Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional.
|
||||||
|
IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND STDINT_OK)
|
||||||
|
|
||||||
|
SET(FFMPEG_FOUND "YES")
|
||||||
|
|
||||||
|
SET(FFMPEG_INCLUDE_DIRS
|
||||||
|
${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat
|
||||||
|
${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/libavdevice
|
||||||
|
${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/libavcodec
|
||||||
|
${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavutil
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (${FFMPEG_STDINT_INCLUDE_DIR})
|
||||||
|
SET(FFMPEG_INCLUDE_DIRS
|
||||||
|
${FFMPEG_INCLUDE_DIRS}
|
||||||
|
${FFMPEG_STDINT_INCLUDE_DIR}
|
||||||
|
${FFMPEG_STDINT_INCLUDE_DIR}/libavformat
|
||||||
|
${FFMPEG_STDINT_INCLUDE_DIR}/libavdevice
|
||||||
|
${FFMPEG_STDINT_INCLUDE_DIR}/libavcodec
|
||||||
|
${FFMPEG_STDINT_INCLUDE_DIR}/libavutil
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
# Note we don't add FFMPEG_LIBSWSCALE_LIBRARIES here, it will be added if found later.
|
||||||
|
SET(FFMPEG_LIBRARIES
|
||||||
|
${FFMPEG_LIBAVFORMAT_LIBRARIES}
|
||||||
|
${FFMPEG_LIBAVDEVICE_LIBRARIES}
|
||||||
|
${FFMPEG_LIBAVCODEC_LIBRARIES}
|
||||||
|
${FFMPEG_LIBAVUTIL_LIBRARIES})
|
||||||
|
|
||||||
|
ELSE ()
|
||||||
|
|
||||||
|
# MESSAGE(STATUS "Could not find FFMPEG")
|
||||||
|
|
||||||
|
ENDIF()
|
||||||
@@ -1,10 +1,41 @@
|
|||||||
# - Locate Inventor
|
#
|
||||||
|
# Find Open Inventor
|
||||||
|
#
|
||||||
# This module defines:
|
# This module defines:
|
||||||
# INVENTOR_FOUND, if false, do not try to link against Inventor.
|
# INVENTOR_FOUND, if false, do not try to link against Inventor.
|
||||||
# INVENTOR_INCLUDE_DIR, where to find headers.
|
# INVENTOR_INCLUDE_DIR, where to find headers.
|
||||||
# INVENTOR_LIBRARY, the library to link against.
|
# INVENTOR_LIBRARY, the library to link against.
|
||||||
# INVENTOR_LIBRARY_DEBUG, the debug library to link against.
|
# INVENTOR_LIBRARY_DEBUG, the debug library to link against.
|
||||||
|
# INVENTOR_SOWIN_LIBRARY, the SoWin library - window binding library for Inventor
|
||||||
|
# INVENTOR_SOWIN_LIBRARY, the SoWin debug library
|
||||||
|
# INVENTOR_SOXT_LIBRARY, the SoXt library - window binding library for Inventor
|
||||||
|
# INVENTOR_SOXT_LIBRARY, the SoXt debug library
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Inventor
|
||||||
|
#
|
||||||
|
# notes:
|
||||||
|
# - Coin is honored over SGI Inventor
|
||||||
|
# - Coin is detected by coin-config script, COINDIR environment variable,
|
||||||
|
# and finally standard system locations are searched
|
||||||
|
# - SGI Inventor is searched at standard system locations only
|
||||||
|
#
|
||||||
|
|
||||||
|
# coin-config tells much of Coin instalation (if present)
|
||||||
|
execute_process (COMMAND coin-config --prefix
|
||||||
|
OUTPUT_VARIABLE COIN_PREFIX
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# try to find Inventor includes (priority paths)
|
||||||
|
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
|
||||||
|
${COIN_PREFIX}/include
|
||||||
|
$ENV{COINDIR}/include
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find Inventor includes (regular paths)
|
||||||
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
|
FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/include
|
/usr/include
|
||||||
@@ -12,52 +43,164 @@ FIND_PATH(INVENTOR_INCLUDE_DIR Inventor/So.h
|
|||||||
/opt/local/include
|
/opt/local/include
|
||||||
/opt/csw/include
|
/opt/csw/include
|
||||||
/opt/include
|
/opt/include
|
||||||
$ENV{COINDIR}/include
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(INVENTOR_LIBRARY
|
# default Inventor lib search paths
|
||||||
NAMES coin2 Coin
|
SET(INVENTOR_LIB_SEARCH_PATH
|
||||||
PATHS
|
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/sw/lib
|
/sw/lib
|
||||||
/opt/local/lib
|
/opt/local/lib
|
||||||
/opt/csw/lib
|
/opt/csw/lib
|
||||||
/opt/lib
|
/opt/lib
|
||||||
$ENV{COINDIR}/lib
|
|
||||||
)
|
)
|
||||||
IF(NOT INVENTOR_LIBRARY)
|
|
||||||
# If we can't find libCoin try libInventor
|
|
||||||
FIND_LIBRARY(INVENTOR_LIBRARY
|
|
||||||
NAMES Inventor
|
|
||||||
PATHS
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/csw/lib
|
|
||||||
/opt/lib
|
|
||||||
)
|
|
||||||
ENDIF(NOT INVENTOR_LIBRARY)
|
|
||||||
|
|
||||||
|
# try to find Coin release lib (priority paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
|
||||||
|
NAMES coin5 coin4 coin3 coin2 coin1 Coin
|
||||||
|
PATHS ${COIN_PREFIX}/lib
|
||||||
|
$ENV{COINDIR}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find Coin release lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
|
||||||
|
NAMES coin5 coin4 coin3 coin2 coin1 Coin
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SGI Inventor lib
|
||||||
|
FIND_LIBRARY(INVENTOR_LIBRARY_RELEASE
|
||||||
|
NAMES Inventor
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find Coin debug lib (priority paths)
|
||||||
FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
|
FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
|
||||||
NAMES coin2d
|
NAMES coin5d coin4d coin3d coin2d coin1d
|
||||||
PATHS
|
PATHS ${COIN_PREFIX}/lib
|
||||||
/usr/local/lib
|
$ENV{COINDIR}/lib
|
||||||
/usr/lib
|
NO_DEFAULT_PATH
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/csw/lib
|
|
||||||
/opt/lib
|
|
||||||
$ENV{COINDIR}/lib
|
|
||||||
)
|
)
|
||||||
IF(NOT INVENTOR_LIBRARY_DEBUG)
|
|
||||||
IF(INVENTOR_LIBRARY)
|
|
||||||
SET(INVENTOR_LIBRARY_DEBUG ${INVENTOR_LIBRARY})
|
|
||||||
ENDIF(INVENTOR_LIBRARY)
|
|
||||||
ENDIF(NOT INVENTOR_LIBRARY_DEBUG)
|
|
||||||
|
|
||||||
|
# try to find Coin debug lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
|
||||||
|
NAMES coin5d coin4d coin3d coin2d coin1d
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# set release to debug if only debug found
|
||||||
|
IF(NOT INVENTOR_LIBRARY_RELEASE AND INVENTOR_LIBRARY_DEBUG)
|
||||||
|
SET(INVENTOR_LIBRARY_RELEASE ${INVENTOR_LIBRARY_DEBUG})
|
||||||
|
ENDIF(NOT INVENTOR_LIBRARY_RELEASE AND INVENTOR_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
# set debug to release (if only release found)
|
||||||
|
IF(NOT INVENTOR_LIBRARY_DEBUG AND INVENTOR_LIBRARY_RELEASE)
|
||||||
|
SET(INVENTOR_LIBRARY_DEBUG ${INVENTOR_LIBRARY_RELEASE})
|
||||||
|
ENDIF(NOT INVENTOR_LIBRARY_DEBUG AND INVENTOR_LIBRARY_RELEASE)
|
||||||
|
|
||||||
|
# INVENTOR_LIBRARY
|
||||||
|
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||||
|
SET(INVENTOR_LIBRARY
|
||||||
|
optimized ${INVENTOR_LIBRARY_RELEASE}
|
||||||
|
debug ${INVENTOR_LIBRARY_DEBUG})
|
||||||
|
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||||
|
SET(INVENTOR_LIBRARY
|
||||||
|
${INVENTOR_LIBRARY_RELEASE})
|
||||||
|
ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
|
# set INVENTOR_FOUND appropriately
|
||||||
SET(INVENTOR_FOUND "NO")
|
SET(INVENTOR_FOUND "NO")
|
||||||
IF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
|
IF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
|
||||||
SET(INVENTOR_FOUND "YES")
|
SET(INVENTOR_FOUND "YES")
|
||||||
ENDIF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
|
ENDIF(INVENTOR_INCLUDE_DIR AND INVENTOR_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# SoWin
|
||||||
|
#
|
||||||
|
# notes: SoWin is searched by COINDIR environment variable
|
||||||
|
# (as expected to be located at Windows platform)
|
||||||
|
|
||||||
|
# try to find SoWin lib (priority paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY
|
||||||
|
NAMES sowin1
|
||||||
|
PATHS $ENV{COINDIR}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoWin lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY
|
||||||
|
NAMES sowin1
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoWin debug lib (priority paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY_DEBUG
|
||||||
|
NAMES sowin1d
|
||||||
|
PATHS $ENV{COINDIR}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoWin debug lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOWIN_LIBRARY_DEBUG
|
||||||
|
NAMES sowin1d
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# SoWin debug library defaults to non-debug lib
|
||||||
|
IF(NOT INVENTOR_SOWIN_LIBRARY_DEBUG)
|
||||||
|
IF(INVENTOR_SOWIN_LIBRARY)
|
||||||
|
SET(INVENTOR_SOWIN_LIBRARY_DEBUG INVENTOR_SOWIN_LIBRARY)
|
||||||
|
ENDIF(INVENTOR_SOWIN_LIBRARY)
|
||||||
|
ENDIF(NOT INVENTOR_SOWIN_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# SoXt
|
||||||
|
#
|
||||||
|
# notes:
|
||||||
|
# - SoXt is detected by soxt-config script (as expected by
|
||||||
|
# Coin's SoXt on Linux/Unix) and on standard system locations
|
||||||
|
# - SGI's InventorXt support is missing now
|
||||||
|
#
|
||||||
|
|
||||||
|
# soxt-config tells much of SoXt instalation (if present)
|
||||||
|
execute_process (COMMAND soxt-config --prefix
|
||||||
|
OUTPUT_VARIABLE SOXT_PREFIX
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# try to find SoXt lib (priority paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOXT_LIBRARY
|
||||||
|
NAMES soxt1 SoXt
|
||||||
|
PATHS ${SOXT_PREFIX}/lib
|
||||||
|
$ENV{COINDIR}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoXt lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOXT_LIBRARY
|
||||||
|
NAMES soxt1 SoXt
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoXt debug lib (priority paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOXT_LIBRARY_DEBUG
|
||||||
|
NAMES soxt1d
|
||||||
|
PATHS ${SOXT_PREFIX}/lib
|
||||||
|
$ENV{COINDIR}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find SoXt debug lib (regular paths)
|
||||||
|
FIND_LIBRARY(INVENTOR_SOXT_LIBRARY_DEBUG
|
||||||
|
NAMES soxt1d
|
||||||
|
PATHS ${INVENTOR_LIB_SEARCH_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
# SoXt debug library defaults to non-debug lib
|
||||||
|
IF(NOT INVENTOR_SOXT_LIBRARY_DEBUG)
|
||||||
|
IF(INVENTOR_SOXT_LIBRARY)
|
||||||
|
SET(INVENTOR_SOXT_LIBRARY_DEBUG INVENTOR_SOXT_LIBRARY)
|
||||||
|
ENDIF(INVENTOR_SOXT_LIBRARY)
|
||||||
|
ENDIF(NOT INVENTOR_SOXT_LIBRARY_DEBUG)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
||||||
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
|
||||||
${DCMTK_DIR}/config/include
|
${DCMTK_DIR}/config/include
|
||||||
${DCMTK_DIR}/include
|
${DCMTK_DIR}/include
|
||||||
/usr/local/include/dcmtk/config
|
/usr/local/include/dcmtk/config
|
||||||
@@ -31,6 +32,7 @@ FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
||||||
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
|
||||||
${DCMTK_DIR}/ofstd/include
|
${DCMTK_DIR}/ofstd/include
|
||||||
${DCMTK_DIR}/include/ofstd
|
${DCMTK_DIR}/include/ofstd
|
||||||
/usr/local/include/dcmtk/ofstd
|
/usr/local/include/dcmtk/ofstd
|
||||||
@@ -54,6 +56,7 @@ FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
|||||||
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
||||||
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmdata
|
||||||
${DCMTK_DIR}/dcmdata/include
|
${DCMTK_DIR}/dcmdata/include
|
||||||
${DCMTK_DIR}/include/dcmdata
|
${DCMTK_DIR}/include/dcmdata
|
||||||
/usr/local/include/dcmtk/dcmdata
|
/usr/local/include/dcmtk/dcmdata
|
||||||
@@ -77,6 +80,7 @@ FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
|||||||
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
||||||
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimgle
|
||||||
${DCMTK_DIR}/dcmimgle/include
|
${DCMTK_DIR}/dcmimgle/include
|
||||||
${DCMTK_DIR}/include/dcmimgle
|
${DCMTK_DIR}/include/dcmimgle
|
||||||
/usr/local/include/dcmtk/dcmimgle
|
/usr/local/include/dcmtk/dcmimgle
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
|
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
|
||||||
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
|
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
|
||||||
$ENV{QUICKTIME_DIR}/include
|
$ENV{QUICKTIME_DIR}/include
|
||||||
$ENV{QUICKTIME_DIR}
|
$ENV{QUICKTIME_DIR}
|
||||||
@@ -39,11 +39,24 @@ ELSE(APPLE)
|
|||||||
PATH_SUFFIXES lib64 lib
|
PATH_SUFFIXES lib64 lib
|
||||||
)
|
)
|
||||||
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
SET(QUICKTIME_FOUND "NO")
|
SET(QUICKTIME_FOUND "NO")
|
||||||
IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
|
IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
|
||||||
SET(QUICKTIME_FOUND "YES")
|
SET(QUICKTIME_FOUND "YES")
|
||||||
ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
#Quicktime is not supported under 64bit OSX build so we need to detect it and disable it.
|
||||||
|
#First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch
|
||||||
|
IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
SET(QUICKTIME_FOUND "NO")
|
||||||
|
ELSE()
|
||||||
|
#Otherwise check to see if 64-bit is explicitly called for.
|
||||||
|
LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
|
||||||
|
IF(NOT has64Compile EQUAL -1)
|
||||||
|
SET(QUICKTIME_FOUND "NO")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Locate gdal
|
# Locate XUL
|
||||||
# This module defines
|
# This module defines
|
||||||
# XUL_LIBRARIES
|
# XUL_LIBRARIES
|
||||||
# XUL_FOUND, if false, do not try to link to gdal
|
# XUL_FOUND, if false, do not try to link to gdal
|
||||||
@@ -9,7 +9,55 @@
|
|||||||
#
|
#
|
||||||
# Created by Robert Osfield.
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
#use pkg-config to find various modues
|
||||||
|
INCLUDE(FindPkgConfig OPTIONAL)
|
||||||
|
|
||||||
|
IF(PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
INCLUDE(FindPkgConfig)
|
||||||
|
|
||||||
|
pkg_check_modules(XULRUNNER_XPCOM xulrunner-xpcom<=1.8.9)
|
||||||
|
pkg_check_modules(XULRUNNER_JS xulrunner-js)
|
||||||
|
pkg_check_modules(XULRUNNER_NSPR xulrunner-nspr)
|
||||||
|
pkg_check_modules(XULRUNNER_NSS xulrunner-nss)
|
||||||
|
|
||||||
|
ENDIF(PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
# Added check to make sure that nsIBaseWindow.h is available, as it's not a standard part the of 1.8.x SDK
|
||||||
|
FIND_PATH(NSIBASEWINDOW_INCLUDE_DIR widget/nsIBaseWindow.h
|
||||||
|
PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
|
||||||
|
$ENV{OSG_DIR}/include/xulrunner
|
||||||
|
$ENV{OSG_DIR}/include
|
||||||
|
$ENV{OSG_DIR}/xulrunner
|
||||||
|
$ENV{OSG_DIR}
|
||||||
|
$ENV{OSGDIR}/include/xulrunner
|
||||||
|
$ENV{OSGDIR}/include
|
||||||
|
$ENV{OSGDIR}/xulrunner
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/include/xulrunner
|
||||||
|
$ENV{OSG_ROOT}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include/xulrunner
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include/xulrunner
|
||||||
|
/usr/include
|
||||||
|
/sw/include/xulrunner # Fink
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include/xulrunner # DarwinPorts
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include/xulrunner # Blastwave
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include/xulrunner
|
||||||
|
/opt/include
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include/xulrunner
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
|
/usr/freeware/include/xulrunner
|
||||||
|
/usr/freeware/include
|
||||||
|
)
|
||||||
|
|
||||||
FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
||||||
|
PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
|
||||||
$ENV{OSG_DIR}/include/xulrunner
|
$ENV{OSG_DIR}/include/xulrunner
|
||||||
$ENV{OSG_DIR}/include
|
$ENV{OSG_DIR}/include
|
||||||
$ENV{OSG_DIR}/xulrunner
|
$ENV{OSG_DIR}/xulrunner
|
||||||
@@ -41,6 +89,7 @@ FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
||||||
|
PATHS ${XULRUNNER_NSPR_INCLUDE_DIRS}
|
||||||
$ENV{OSG_DIR}/include/nspr
|
$ENV{OSG_DIR}/include/nspr
|
||||||
$ENV{OSG_DIR}/include
|
$ENV{OSG_DIR}/include
|
||||||
$ENV{OSG_DIR}/nspr
|
$ENV{OSG_DIR}/nspr
|
||||||
@@ -72,6 +121,7 @@ FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
||||||
|
PATHS ${XULRUNNER_JS_INCLUDE_DIRS}
|
||||||
$ENV{OSG_DIR}/include/mozjs
|
$ENV{OSG_DIR}/include/mozjs
|
||||||
$ENV{OSG_DIR}/include
|
$ENV{OSG_DIR}/include
|
||||||
$ENV{OSG_DIR}/mozjs
|
$ENV{OSG_DIR}/mozjs
|
||||||
@@ -129,10 +179,13 @@ FIND_PATH(XUL_DIR
|
|||||||
/usr/freeware/lib64
|
/usr/freeware/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
MACRO(FIND_XUL_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
MACRO(FIND_XUL_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||||
|
|
||||||
FIND_LIBRARY(${MYLIBRARY}
|
FIND_LIBRARY(${MYLIBRARY}
|
||||||
|
PATHS ${XULRUNNER_XPCOM_LIBRARY_DIRS}
|
||||||
|
PATHS ${XULRUNNER_JS_LIBRARY_DIRS}
|
||||||
|
PATHS ${XULRUNNER_NSPR_LIBRARY_DIRS}
|
||||||
|
PATHS ${XULRUNNER_NSS_LIBRARY_DIRS}
|
||||||
NAMES ${MYLIBRARYNAME}
|
NAMES ${MYLIBRARYNAME}
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{OSG_DIR}/lib
|
$ENV{OSG_DIR}/lib
|
||||||
@@ -170,13 +223,13 @@ FIND_XUL_LIBRARY(XUL_NSS_LIBRARY nss3)
|
|||||||
|
|
||||||
|
|
||||||
SET(XUL_FOUND "NO")
|
SET(XUL_FOUND "NO")
|
||||||
IF(XUL_LIBRARY AND XUL_INCLUDE_DIR)
|
IF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
|
||||||
|
|
||||||
SET(XUL_FOUND "YES")
|
SET(XUL_FOUND "YES")
|
||||||
SET(XUL_LIBRARIES ${XUL_LIBRARY} ${XUL_MOZJS_LIBRARY} ${XUL_XPCOM_LIBRARY} ${XUL_PLUGIN_LIBRARY} ${XUL_NSS_LIBRARY})
|
SET(XUL_LIBRARIES ${XUL_LIBRARY} ${XUL_MOZJS_LIBRARY} ${XUL_XPCOM_LIBRARY} ${XUL_PLUGIN_LIBRARY} ${XUL_NSS_LIBRARY})
|
||||||
SET(XUL_INCLUDE_DIRS ${XUL_INCLUDE_DIR} ${NSPR_INCLUDE_DIR} ${MOZJS_INCLUDE_DIR})
|
SET(XUL_INCLUDE_DIRS ${XUL_INCLUDE_DIR} ${NSPR_INCLUDE_DIR} ${MOZJS_INCLUDE_DIR})
|
||||||
|
|
||||||
ENDIF(XUL_LIBRARY AND XUL_INCLUDE_DIR)
|
ENDIF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
|
||||||
|
|
||||||
# MESSAGE("XUL_INCLUDE_DIR " ${XUL_INCLUDE_DIR})
|
# MESSAGE("XUL_INCLUDE_DIR " ${XUL_INCLUDE_DIR})
|
||||||
# MESSAGE("XUL_LIBRARIES " ${XUL_LIBRARIES})
|
# MESSAGE("XUL_LIBRARIES " ${XUL_LIBRARIES})
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(ZLIB_LIBRARY
|
FIND_LIBRARY(ZLIB_LIBRARY
|
||||||
NAMES z libz
|
NAMES z libz zlib
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{ZLIB_DIR}/lib
|
$ENV{ZLIB_DIR}/lib
|
||||||
$ENV{ZLIB_DIR}
|
$ENV{ZLIB_DIR}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
# require i386 so this is for the future
|
# require i386 so this is for the future
|
||||||
IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
||||||
SET(SYSTEM_ARCH "i386")
|
SET(SYSTEM_ARCH "i386")
|
||||||
ELSE("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
ELSE()
|
||||||
SET(SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
SET(SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
ENDIF()
|
||||||
|
|
||||||
# set a default system name - use CMake setting (Linux|Windows|...)
|
# set a default system name - use CMake setting (Linux|Windows|...)
|
||||||
SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||||
@@ -26,30 +26,34 @@ SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
|||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
IF(CMAKE_CL_64)
|
IF(CMAKE_CL_64)
|
||||||
SET(SYSTEM_NAME "win64")
|
SET(SYSTEM_NAME "win64")
|
||||||
ELSE(CMAKE_CL_64)
|
ELSE()
|
||||||
SET(SYSTEM_NAME "win32")
|
SET(SYSTEM_NAME "win32")
|
||||||
ENDIF(CMAKE_CL_64)
|
ENDIF()
|
||||||
ENDIF(MSVC)
|
ENDIF()
|
||||||
# Guess the compiler (is this desired for other platforms than windows?)
|
# Guess the compiler (is this desired for other platforms than windows?)
|
||||||
IF(NOT DEFINED OSG_CPACK_COMPILER)
|
IF(NOT DEFINED OSG_CPACK_COMPILER)
|
||||||
INCLUDE(OsgDetermineCompiler)
|
INCLUDE(OsgDetermineCompiler)
|
||||||
ENDIF(NOT DEFINED OSG_CPACK_COMPILER)
|
ENDIF()
|
||||||
|
|
||||||
# expose the compiler setting to the user
|
# expose the compiler setting to the user
|
||||||
SET(OSG_CPACK_COMPILER "${OSG_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames")
|
SET(OSG_CPACK_COMPILER "${OSG_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames")
|
||||||
|
|
||||||
IF(OSG_CPACK_COMPILER)
|
IF(OSG_CPACK_COMPILER)
|
||||||
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER})
|
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER})
|
||||||
ELSE(OSG_CPACK_COMPILER)
|
ELSE()
|
||||||
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH})
|
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH})
|
||||||
ENDIF(OSG_CPACK_COMPILER)
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
## variables that apply to all packages
|
## variables that apply to all packages
|
||||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENSCENEGRAPH_VERSION}")
|
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENSCENEGRAPH_VERSION}")
|
||||||
|
|
||||||
# these goes for all platforms. Setting these stops the CPack.cmake script from generating options about other package compression formats (.z .tz, etc.)
|
# these goes for all platforms. Setting these stops the CPack.cmake script from generating options about other package compression formats (.z .tz, etc.)
|
||||||
SET(CPACK_GENERATOR "TGZ")
|
IF(WIN32)
|
||||||
|
SET(CPACK_GENERATOR "ZIP")
|
||||||
|
ELSE()
|
||||||
|
SET(CPACK_GENERATOR "TGZ")
|
||||||
|
ENDIF()
|
||||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||||
|
|
||||||
|
|
||||||
@@ -57,15 +61,15 @@ SET(CPACK_SOURCE_GENERATOR "TGZ")
|
|||||||
IF(MSVC_IDE)
|
IF(MSVC_IDE)
|
||||||
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
|
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
|
||||||
SET(PACKAGE_TARGET_PREFIX "Package ")
|
SET(PACKAGE_TARGET_PREFIX "Package ")
|
||||||
ELSE(MSVC_IDE)
|
ELSE()
|
||||||
# on un*x an empty CMAKE_BUILD_TYPE means release
|
# on un*x an empty CMAKE_BUILD_TYPE means release
|
||||||
IF(CMAKE_BUILD_TYPE)
|
IF(CMAKE_BUILD_TYPE)
|
||||||
SET(OSG_CPACK_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
SET(OSG_CPACK_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
||||||
ELSE(CMAKE_BUILD_TYPE)
|
ELSE()
|
||||||
SET(OSG_CPACK_CONFIGURATION "Release")
|
SET(OSG_CPACK_CONFIGURATION "Release")
|
||||||
ENDIF(CMAKE_BUILD_TYPE)
|
ENDIF()
|
||||||
SET(PACKAGE_TARGET_PREFIX "package_")
|
SET(PACKAGE_TARGET_PREFIX "package_")
|
||||||
ENDIF(MSVC_IDE)
|
ENDIF()
|
||||||
|
|
||||||
# Get all defined components
|
# Get all defined components
|
||||||
GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
|
GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
|
||||||
@@ -74,7 +78,7 @@ IF(NOT CPACK_COMPONENTS_ALL)
|
|||||||
# I set it manually to be the packages that can always be packaged
|
# I set it manually to be the packages that can always be packaged
|
||||||
MESSAGE("When building packages please consider using cmake version 2.6.1 or above")
|
MESSAGE("When building packages please consider using cmake version 2.6.1 or above")
|
||||||
SET(CPACK_COMPONENTS_ALL libopenscenegraph libopenthreads openscenegraph libopenscenegraph-dev libopenthreads-dev)
|
SET(CPACK_COMPONENTS_ALL libopenscenegraph libopenthreads openscenegraph libopenscenegraph-dev libopenthreads-dev)
|
||||||
ENDIF(NOT CPACK_COMPONENTS_ALL)
|
ENDIF()
|
||||||
|
|
||||||
# Create a target that will be used to generate all packages defined below
|
# Create a target that will be used to generate all packages defined below
|
||||||
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
||||||
@@ -86,12 +90,12 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
|||||||
# the doc packages don't need a system-arch specification
|
# the doc packages don't need a system-arch specification
|
||||||
IF(${package} MATCHES -doc)
|
IF(${package} MATCHES -doc)
|
||||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
||||||
ELSE(${package} MATCHES -doc)
|
ELSE()
|
||||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION}-${OSG_CPACK_SYSTEM_SPEC_STRING}-${OSG_CPACK_CONFIGURATION})
|
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION}-${OSG_CPACK_SYSTEM_SPEC_STRING}-${OSG_CPACK_CONFIGURATION})
|
||||||
IF(NOT DYNAMIC_OPENSCENEGRAPH)
|
IF(NOT DYNAMIC_OPENSCENEGRAPH)
|
||||||
SET(OSG_PACKAGE_FILE_NAME ${OSG_PACKAGE_FILE_NAME}-static)
|
SET(OSG_PACKAGE_FILE_NAME ${OSG_PACKAGE_FILE_NAME}-static)
|
||||||
ENDIF(NOT DYNAMIC_OPENSCENEGRAPH)
|
ENDIF()
|
||||||
ENDIF(${package} MATCHES -doc)
|
ENDIF()
|
||||||
|
|
||||||
CONFIGURE_FILE("${OpenSceneGraph_SOURCE_DIR}/CMakeModules/OsgCPackConfig.cmake.in" "${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake" IMMEDIATE)
|
CONFIGURE_FILE("${OpenSceneGraph_SOURCE_DIR}/CMakeModules/OsgCPackConfig.cmake.in" "${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake" IMMEDIATE)
|
||||||
|
|
||||||
@@ -100,25 +104,32 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
|||||||
# This is naive and will probably need fixing eventually
|
# This is naive and will probably need fixing eventually
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
SET(MOVE_COMMAND "move")
|
SET(MOVE_COMMAND "move")
|
||||||
ELSE(MSVC)
|
ELSE()
|
||||||
SET(MOVE_COMMAND "mv")
|
SET(MOVE_COMMAND "mv")
|
||||||
ENDIF(MSVC)
|
ENDIF()
|
||||||
|
|
||||||
|
# Set in and out archive filenames. Windows = zip, others = tar.gz
|
||||||
|
IF(WIN32)
|
||||||
|
SET(ARCHIVE_EXT "zip")
|
||||||
|
ELSE()
|
||||||
|
SET(ARCHIVE_EXT "tar.gz")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Create a target that creates the current package
|
# Create a target that creates the current package
|
||||||
# and rename the package to give it proper filename
|
# and rename the package to give it proper filename
|
||||||
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
|
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_TARGETNAME}
|
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_TARGETNAME}
|
||||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||||
COMMENT "Run CPack packaging for ${package_name}..."
|
COMMENT "Run CPack packaging for ${package_name}..."
|
||||||
)
|
)
|
||||||
# Add the exact same custom command to the all package generating target.
|
# Add the exact same custom command to the all package generating target.
|
||||||
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
|
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
|
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
|
||||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||||
)
|
)
|
||||||
ENDMACRO(GENERATE_PACKAGING_TARGET)
|
ENDMACRO(GENERATE_PACKAGING_TARGET)
|
||||||
|
|
||||||
@@ -130,4 +141,4 @@ GENERATE_PACKAGING_TARGET(openscenegraph-all)
|
|||||||
FOREACH(package ${CPACK_COMPONENTS_ALL})
|
FOREACH(package ${CPACK_COMPONENTS_ALL})
|
||||||
SET(OSG_CPACK_COMPONENT ${package})
|
SET(OSG_CPACK_COMPONENT ${package})
|
||||||
GENERATE_PACKAGING_TARGET(${package})
|
GENERATE_PACKAGING_TARGET(${package})
|
||||||
ENDFOREACH(package ${CPACK_COMPONENTS_ALL})
|
ENDFOREACH()
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ set(CTEST_PROJECT_NAME "OpenSceneGraph")
|
|||||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 CET")
|
set(CTEST_NIGHTLY_START_TIME "00:00:00 CET")
|
||||||
|
|
||||||
set(CTEST_DROP_METHOD "http")
|
set(CTEST_DROP_METHOD "http")
|
||||||
set(CTEST_DROP_SITE "www.cdash.org")
|
set(CTEST_DROP_SITE "cdash.openscenegraph.org")
|
||||||
set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=OpenSceneGraph")
|
set(CTEST_DROP_LOCATION "/submit.php?project=OpenSceneGraph")
|
||||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
|
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
|
||||||
or later.
|
or later.
|
||||||
|
|
||||||
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid in the wxWindows
|
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid
|
||||||
section below. The LGPL in the final section of this license.
|
out in the wxWindows section below. The LGPL is contained in the
|
||||||
|
final section of this license.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -187,7 +188,7 @@ modification follow. Pay close attention to the difference between a
|
|||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
0. This License Agreement applies to any software library or other
|
||||||
|
|||||||
178
NEWS.txt
178
NEWS.txt
@@ -1,52 +1,101 @@
|
|||||||
OSG News
|
OSG News
|
||||||
========
|
========
|
||||||
|
|
||||||
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
= !OpenSceneGraph 2.8.2 release - bug fix release =
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 4th February 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 28th July 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8.2, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 2.8 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 2.8.2 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
|
|
||||||
=== Updates include: ===
|
=== Updates between 2.8.2 and 2.8.1 releases include: ===
|
||||||
|
|
||||||
|
* Build fixes for:
|
||||||
|
* !RedHat Enterprise Linux
|
||||||
|
* Building of dicom plugin with ITK under Linux
|
||||||
|
* Crash fixes to:
|
||||||
|
* crash during window destruction under Windows when using closing a MFC based !GraphicsWindow
|
||||||
|
* deadlock under Windows due threading issues with atomic operations in Win32 Barrier implementation
|
||||||
|
* !OpenFlight plugin crashed due to not handling spaces at the end of option strings
|
||||||
|
* !OpenFlight plugin crashed when exported scene graphs contain no TexEnv objects
|
||||||
|
* osganimationtimeline crashed when example model was not found
|
||||||
|
* Bug fixes to :
|
||||||
|
* vertical anchor in osgWidget::Widow was inverted
|
||||||
|
* bsp an mdl plugins to better handling transparency and lighting
|
||||||
|
* computation of sector range in osgSim::!LightPoint
|
||||||
|
* extension checking of FBO packed stencil support
|
||||||
|
* position of tabs at corners of manipulators
|
||||||
|
* threading bug in .osg plugin that occurred during multi-threaded initialization
|
||||||
|
* alignment of Text what setting alignment after assign text string
|
||||||
|
* loading of compressed texture arrays
|
||||||
|
* texture generate mipmap for non power of two textures
|
||||||
|
* regression in X11 key symbol remapping, improved support for Russian keyboards
|
||||||
|
* regression of !StencilMask setting in !RenderStage
|
||||||
|
* small memory leak in X11 usage
|
||||||
|
* Transform::computeBound() double !BoundingSphere support
|
||||||
|
* Resize handling when master and slave Cameras share the same !GraphicsContext
|
||||||
|
* Handling of locale in plugins and env var parsing so it always follows the '.' decimal place convention regardless of the desktop/application locale.
|
||||||
|
|
||||||
|
=== Updates between 2.8.1 and 2.8.0 releases include: ===
|
||||||
|
|
||||||
|
* Build fixes under FreeBSD and IBM AIX, and RedHat Enterprise Linux
|
||||||
|
* Improved compatibility with SWIG wrapper building
|
||||||
|
* Crash fixes in osg::State, osg::Geometry and osgWidget
|
||||||
|
* Bug fixes to :
|
||||||
|
* draw instanced support
|
||||||
|
* Optimizer - MergeGeometryVisitor, RemoveLoadedProxyNodesVisitor and SpatializeGroupsVistor
|
||||||
|
* hdr image loader
|
||||||
|
* handling of opacity maps in 3ds loader
|
||||||
|
* dxf loader
|
||||||
|
* frame buffer object
|
||||||
|
* cursor/event handling in windows
|
||||||
|
* windows threading
|
||||||
|
* memory leak in Collada loader
|
||||||
|
* fixes to display lists/vbo creation that prevent crash under ATI drivers
|
||||||
|
* subface PolygonOffset setting in OpenFlight
|
||||||
|
* osgconv --formats under OSX
|
||||||
|
* osgTerrain::Layer bounding volume calculation
|
||||||
|
|
||||||
|
=== Updates between 2.8 and 2.6 include: ===
|
||||||
|
|
||||||
* New osgVolume library for volume rendering, with support for:
|
* New osgVolume library for volume rendering, with support for:
|
||||||
* High quality GPU based Ray tracing
|
* High quality GPU based Ray tracing
|
||||||
* Transfer functions
|
* Transfer functions
|
||||||
* Per pixel lighting
|
* Per pixel lighting
|
||||||
* Iso surface rendering
|
* Iso surface rendering
|
||||||
* Maximum Intensity rendering
|
* Maximum Intensity Projection rendering
|
||||||
* non power of two 3d texture and 3d texture compression
|
* Non-power-of-two 3D textures, and 3D texture compression
|
||||||
* DICOM loader for reading dicom medical data
|
* DICOM loading for reading dicom medical data
|
||||||
* New osgAnimation library for character and scene animation.
|
* New osgAnimation library for character and scene animation.
|
||||||
* New plugin for reading Biovision hierarchical files (.BVH) to generate character motion animations.
|
* New plugin for reading Biovision hierarchical files (.BVH) to generate character motion animations.
|
||||||
* New osgShadow support for Light Space Perspective Shadow Maps (LispSM).
|
* New osgShadow support for Light Space Perspective Shadow Maps (LispSM).
|
||||||
* Three new scene graph widgets for placing traditional 2D capability into fully interactive 3D scenes:
|
* Three new scene graph widgets for placing traditional 2D capability into fully interactive 3D scenes:
|
||||||
* PDF widget support (based on libPoppler)
|
* PDF widget (based on libPoppler)
|
||||||
* VNC client widget support (based on libVNCServer)
|
* VNC client widget (based on libVNCServer)
|
||||||
* Internet browser client widget support (based on Gecko/UBrowser)
|
* Internet browser client widget (based on Gecko/UBrowser)
|
||||||
* New plugins for loading Half-Life 2 maps and models.
|
* New plugins for loading Half-Life 2 maps and models.
|
||||||
* New plugin for loaded exr, high dynamic range imagery
|
* New plugin for loading EXR, high dynamic range imagery
|
||||||
* Improvements to !DatabasePager tailored for low latency paging.
|
* Improvements to !DatabasePager, tailored for low latency paging.
|
||||||
* Improved runtime stats collection and on screen reporting.
|
* Improved runtime stats collection and on screen reporting.
|
||||||
* Performance improvements through optimization of matrix operations.
|
* Performance improvements through optimization of matrix operations.
|
||||||
* Support for the OpenGL draw instanced extension.
|
* Support for the OpenGL "draw instanced" extension.
|
||||||
|
* Support for zlib compressed native .ive and .gz files
|
||||||
* Improvements to COLLADA support.
|
* Improvements to COLLADA support.
|
||||||
* Build reporting using CDash
|
* Build reporting using CDash
|
||||||
* New packing support using CPack
|
* New packaging support using CPack
|
||||||
* A wide range of build and bug fixes
|
* A wide range of build and bug fixes
|
||||||
|
|
||||||
=== Downloads and Licensing ===
|
=== Downloads and Licensing ===
|
||||||
!OpenSceneGraph is open-source so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
!OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
||||||
|
|
||||||
!OpenSceneGraph is released under the [http://www.openscenegraph.org/projects/osg/wiki/Legal OpenSceneGraph Public License], which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the !OpenSceneGraph libraries without restricting the licensing of the user's software.
|
!OpenSceneGraph is released under the [http://www.openscenegraph.org/projects/osg/wiki/Legal OpenSceneGraph Public License], which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the !OpenSceneGraph libraries without restricting the licensing of the user's software.
|
||||||
|
|
||||||
=== !OpenSceneGraph Books now available ===
|
=== !OpenSceneGraph Books now available ===
|
||||||
|
|
||||||
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual books can be found at [http://www.osgbooks.com OsgBooks].
|
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual, books can be found at [http://www.osgbooks.com OsgBooks].
|
||||||
|
|
||||||
=== Professional support and services ===
|
=== Professional support and services ===
|
||||||
!OpenSceneGraph project is backed up with professional services by [http://openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
!OpenSceneGraph project is backed up with professional services by [http://www.openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
||||||
|
|
||||||
* Confidential Professional Support
|
* Confidential Professional Support
|
||||||
* Bespoke development
|
* Bespoke development
|
||||||
@@ -56,12 +105,101 @@ The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as Eng
|
|||||||
=== Community support and contributions ===
|
=== Community support and contributions ===
|
||||||
The diverse and growing community of over 2000 developers is centred around the public osg-users mailing list, where members discuss how best to use !OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
The diverse and growing community of over 2000 developers is centred around the public osg-users mailing list, where members discuss how best to use !OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
||||||
|
|
||||||
The !OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the [http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/TwoPointEight 364 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
The !OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the [http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/TwoPointEight 365 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
About !OpenSceneGraph:[[BR]]
|
About !OpenSceneGraph: [[BR]]
|
||||||
!OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
The !OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
||||||
|
Further information, screenshots, downloads, documentation, and support links can be found on the !OpenSceneGraph project website http://www.openscenegraph.org.
|
||||||
|
|
||||||
|
About !OpenSceneGraph Professional Services:[[BR]]
|
||||||
|
!OpenSceneGraph Professional Services, founded by project lead Robert Osfield in April 2001, is based in Callander, Perhshire, Scotland, and provides professional services on top of !OpenSceneGraph. Further information about the services it provides can be found at http://www.openscenegraph.com.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
= !OpenSceneGraph 2.8.1 release - bug fix release =
|
||||||
|
|
||||||
|
PERTHSHIRE, Scotland - 19th May 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8.1, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
|
The !OpenSceneGraph 2.8.1 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
|
|
||||||
|
=== Updates between 2.8.1 and 2.8.0 releases include: ===
|
||||||
|
|
||||||
|
* Build fixes under FreeBSD and IBM AIX, and RedHat Enterprise Linux.
|
||||||
|
* Improved compatibility with SWIG wrapper building
|
||||||
|
* Crash fixes in osg::State, osg::Geometry and osgWidget.
|
||||||
|
* Bug fixes to :
|
||||||
|
* draw instanced support
|
||||||
|
* Optimizer - MergeGeometryVisitor, RemoveLoadedProxyNodesVisitor and SpatializeGroupsVistor
|
||||||
|
* hdr image loader
|
||||||
|
* handling of opacity maps in 3ds loader
|
||||||
|
* dxf loader
|
||||||
|
* frame buffer object
|
||||||
|
* cursor/event handling in windows
|
||||||
|
* windows threading
|
||||||
|
* memory leak in Collada loader
|
||||||
|
* fixes to display lists/vbo creation that prevent crash under ATI drivers
|
||||||
|
* subface PolygonOffset setting in OpenFlight
|
||||||
|
* osgconv --formats under OSX
|
||||||
|
* osgTerrain::Layer bounding volume calculation.
|
||||||
|
|
||||||
|
=== Updates between 2.8 and 2.6 include: ===
|
||||||
|
|
||||||
|
* New osgVolume library for volume rendering, with support for:
|
||||||
|
* High quality GPU based Ray tracing
|
||||||
|
* Transfer functions
|
||||||
|
* Per pixel lighting
|
||||||
|
* Iso surface rendering
|
||||||
|
* Maximum Intensity Projection rendering
|
||||||
|
* Non-power-of-two 3D textures, and 3D texture compression
|
||||||
|
* DICOM loading for reading dicom medical data
|
||||||
|
* New osgAnimation library for character and scene animation.
|
||||||
|
* New plugin for reading Biovision hierarchical files (.BVH) to generate character motion animations.
|
||||||
|
* New osgShadow support for Light Space Perspective Shadow Maps (LispSM).
|
||||||
|
* Three new scene graph widgets for placing traditional 2D capability into fully interactive 3D scenes:
|
||||||
|
* PDF widget (based on libPoppler)
|
||||||
|
* VNC client widget (based on libVNCServer)
|
||||||
|
* Internet browser client widget (based on Gecko/UBrowser)
|
||||||
|
* New plugins for loading Half-Life 2 maps and models.
|
||||||
|
* New plugin for loading EXR, high dynamic range imagery
|
||||||
|
* Improvements to !DatabasePager, tailored for low latency paging.
|
||||||
|
* Improved runtime stats collection and on screen reporting.
|
||||||
|
* Performance improvements through optimization of matrix operations.
|
||||||
|
* Support for the OpenGL "draw instanced" extension.
|
||||||
|
* Support for zlib compressed native .ive and .gz files
|
||||||
|
* Improvements to COLLADA support.
|
||||||
|
* Build reporting using CDash
|
||||||
|
* New packaging support using CPack
|
||||||
|
* A wide range of build and bug fixes
|
||||||
|
|
||||||
|
=== Downloads and Licensing ===
|
||||||
|
!OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
||||||
|
|
||||||
|
!OpenSceneGraph is released under the [http://www.openscenegraph.org/projects/osg/wiki/Legal OpenSceneGraph Public License], which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the !OpenSceneGraph libraries without restricting the licensing of the user's software.
|
||||||
|
|
||||||
|
=== !OpenSceneGraph Books now available ===
|
||||||
|
|
||||||
|
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual, books can be found at [http://www.osgbooks.com OsgBooks].
|
||||||
|
|
||||||
|
=== Professional support and services ===
|
||||||
|
!OpenSceneGraph project is backed up with professional services by [http://www.openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
||||||
|
|
||||||
|
* Confidential Professional Support
|
||||||
|
* Bespoke development
|
||||||
|
* Consultancy
|
||||||
|
* Training
|
||||||
|
|
||||||
|
=== Community support and contributions ===
|
||||||
|
The diverse and growing community of over 2000 developers is centred around the public osg-users mailing list, where members discuss how best to use !OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
||||||
|
|
||||||
|
The !OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the [http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/TwoPointEight 365 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
About !OpenSceneGraph: [[BR]]
|
||||||
|
The !OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
||||||
Further information, screenshots, downloads, documentation, and support links can be found on the !OpenSceneGraph project website http://www.openscenegraph.org.
|
Further information, screenshots, downloads, documentation, and support links can be found on the !OpenSceneGraph project website http://www.openscenegraph.org.
|
||||||
|
|
||||||
About !OpenSceneGraph Professional Services:[[BR]]
|
About !OpenSceneGraph Professional Services:[[BR]]
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ REM trees.
|
|||||||
REM mew 2004-07-16
|
REM mew 2004-07-16
|
||||||
|
|
||||||
cd ..\..
|
cd ..\..
|
||||||
set PATH=%CD%\OpenThreads\bin\win32;%CD%\OpenSceneGraph\bin\win32;%CD%\3rdParty\bin;%PATH%
|
set PATH=%CD%\OpenThreads\bin\win32;%CD%\bin;%CD%\3rdParty\bin;%PATH%
|
||||||
set OSG_FILE_PATH=%CD%\OpenSceneGraph-Data;%CD%\OpenSceneGraph-Data\Images;%CD%\OpenSceneGraph-Data\fonts;%OSG_FILE_PATH%
|
set OSG_FILE_PATH=%CD%\OpenSceneGraph-Data;%OSG_FILE_PATH%
|
||||||
|
|
||||||
REM uncomment one of these for your desired notify level...
|
REM uncomment one of these for your desired notify level...
|
||||||
rem set OSG_NOTIFY_LEVEL=ALWAYS
|
rem set OSG_NOTIFY_LEVEL=ALWAYS
|
||||||
|
|||||||
@@ -12,10 +12,9 @@ subscribe to our public mailing list:
|
|||||||
http://www.openscenegraph.org/projects/osg/wiki/MailingLists
|
http://www.openscenegraph.org/projects/osg/wiki/MailingLists
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Robert Osfield.
|
Robert Osfield.
|
||||||
Project Lead.
|
Project Lead.
|
||||||
4th Februaru 2009.
|
28th July 2009.
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,13 @@
|
|||||||
#define _OPENTHREADS_CONFIG
|
#define _OPENTHREADS_CONFIG
|
||||||
|
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
|
#define _OPENTHREADS_ATOMIC_USE_MUTEX
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_5)
|
#if defined(MAC_OS_X_VERSION_10_5)
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||||
#define _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
|
#define _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
|
||||||
|
#undef _OPENTHREADS_ATOMIC_USE_MUTEX
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* #undef _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS */
|
/* #undef _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS */
|
||||||
|
|||||||
Binary file not shown.
@@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>English</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>OpenThreads</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string></string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>org.OpenThreads.OpenThreads</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>FMWK</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>2.2.0</string>
|
|
||||||
<key>CSResourcesFileMapped</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,449 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 42;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
00DAF8AA0BBE1A0E00EFEB98 /* Block in Headers */ = {isa = PBXBuildFile; fileRef = 00DAF8A70BBE1A0E00EFEB98 /* Block */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
00DAF8AB0BBE1A0F00EFEB98 /* ReadWriteMutex in Headers */ = {isa = PBXBuildFile; fileRef = 00DAF8A80BBE1A0E00EFEB98 /* ReadWriteMutex */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
00DAF8AC0BBE1A0F00EFEB98 /* ReentrantMutex in Headers */ = {isa = PBXBuildFile; fileRef = 00DAF8A90BBE1A0E00EFEB98 /* ReentrantMutex */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
8D07F2BE0486CC7A007CD1D0 /* OpenThreads_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32BAE0B70371A74B00C91783 /* OpenThreads_Prefix.pch */; };
|
|
||||||
8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
|
|
||||||
8D07F2C40486CC7A007CD1D0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB77AAFE841565C02AAC07 /* Carbon.framework */; };
|
|
||||||
BE11833405D6FE3900EB53E5 /* PThreadBarrierPrivateData.h in Headers */ = {isa = PBXBuildFile; fileRef = BE11832C05D6FE3800EB53E5 /* PThreadBarrierPrivateData.h */; };
|
|
||||||
BE11833605D6FE3900EB53E5 /* PThreadConditionPrivateData.h in Headers */ = {isa = PBXBuildFile; fileRef = BE11832E05D6FE3800EB53E5 /* PThreadConditionPrivateData.h */; };
|
|
||||||
BE11833805D6FE3900EB53E5 /* PThreadMutexPrivateData.h in Headers */ = {isa = PBXBuildFile; fileRef = BE11833005D6FE3800EB53E5 /* PThreadMutexPrivateData.h */; };
|
|
||||||
BE11833905D6FE3900EB53E5 /* PThreadPrivateData.h in Headers */ = {isa = PBXBuildFile; fileRef = BE11833105D6FE3800EB53E5 /* PThreadPrivateData.h */; };
|
|
||||||
BE11835105D7022C00EB53E5 /* PThread.c++ in Sources */ = {isa = PBXBuildFile; fileRef = BE11832A05D6FE3800EB53E5 /* PThread.c++ */; };
|
|
||||||
BE11835205D7022C00EB53E5 /* PThreadBarrier.c++ in Sources */ = {isa = PBXBuildFile; fileRef = BE11832B05D6FE3800EB53E5 /* PThreadBarrier.c++ */; };
|
|
||||||
BE11835405D7022C00EB53E5 /* PThreadCondition.c++ in Sources */ = {isa = PBXBuildFile; fileRef = BE11832D05D6FE3800EB53E5 /* PThreadCondition.c++ */; };
|
|
||||||
BE11835605D7022C00EB53E5 /* PThreadMutex.c++ in Sources */ = {isa = PBXBuildFile; fileRef = BE11832F05D6FE3800EB53E5 /* PThreadMutex.c++ */; };
|
|
||||||
BE11837D05D7083B00EB53E5 /* Barrier in Headers */ = {isa = PBXBuildFile; fileRef = BE11836E05D7082A00EB53E5 /* Barrier */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
BE11837E05D7083B00EB53E5 /* Condition in Headers */ = {isa = PBXBuildFile; fileRef = BE11836F05D7082A00EB53E5 /* Condition */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
BE11837F05D7083B00EB53E5 /* Exports in Headers */ = {isa = PBXBuildFile; fileRef = BE11837005D7082A00EB53E5 /* Exports */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
BE11838005D7083B00EB53E5 /* Mutex in Headers */ = {isa = PBXBuildFile; fileRef = BE11837105D7082A00EB53E5 /* Mutex */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
BE11838105D7083B00EB53E5 /* ScopedLock in Headers */ = {isa = PBXBuildFile; fileRef = BE11837205D7082A00EB53E5 /* ScopedLock */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
BE11838205D7083B00EB53E5 /* Thread in Headers */ = {isa = PBXBuildFile; fileRef = BE11837305D7082A00EB53E5 /* Thread */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
00DAF8A70BBE1A0E00EFEB98 /* Block */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Block; path = ../../include/OpenThreads/Block; sourceTree = SOURCE_ROOT; };
|
|
||||||
00DAF8A80BBE1A0E00EFEB98 /* ReadWriteMutex */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = ReadWriteMutex; path = ../../include/OpenThreads/ReadWriteMutex; sourceTree = SOURCE_ROOT; };
|
|
||||||
00DAF8A90BBE1A0E00EFEB98 /* ReentrantMutex */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = ReentrantMutex; path = ../../include/OpenThreads/ReentrantMutex; sourceTree = SOURCE_ROOT; };
|
|
||||||
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
|
||||||
08FB77AAFE841565C02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
|
|
||||||
32BAE0B70371A74B00C91783 /* OpenThreads_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenThreads_Prefix.pch; sourceTree = SOURCE_ROOT; };
|
|
||||||
8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
|
||||||
8D07F2C80486CC7A007CD1D0 /* OpenThreads.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OpenThreads.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
BE11832A05D6FE3800EB53E5 /* PThread.c++ */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "PThread.c++"; path = "../../src/OpenThreads/pthreads/PThread.c++"; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11832B05D6FE3800EB53E5 /* PThreadBarrier.c++ */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "PThreadBarrier.c++"; path = "../../src/OpenThreads/pthreads/PThreadBarrier.c++"; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11832C05D6FE3800EB53E5 /* PThreadBarrierPrivateData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PThreadBarrierPrivateData.h; path = ../../src/OpenThreads/pthreads/PThreadBarrierPrivateData.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11832D05D6FE3800EB53E5 /* PThreadCondition.c++ */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "PThreadCondition.c++"; path = "../../src/OpenThreads/pthreads/PThreadCondition.c++"; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11832E05D6FE3800EB53E5 /* PThreadConditionPrivateData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PThreadConditionPrivateData.h; path = ../../src/OpenThreads/pthreads/PThreadConditionPrivateData.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11832F05D6FE3800EB53E5 /* PThreadMutex.c++ */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "PThreadMutex.c++"; path = "../../src/OpenThreads/pthreads/PThreadMutex.c++"; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11833005D6FE3800EB53E5 /* PThreadMutexPrivateData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PThreadMutexPrivateData.h; path = ../../src/OpenThreads/pthreads/PThreadMutexPrivateData.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11833105D6FE3800EB53E5 /* PThreadPrivateData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PThreadPrivateData.h; path = ../../src/OpenThreads/pthreads/PThreadPrivateData.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11836E05D7082A00EB53E5 /* Barrier */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = Barrier; path = ../../include/OpenThreads/Barrier; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11836F05D7082A00EB53E5 /* Condition */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = Condition; path = ../../include/OpenThreads/Condition; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11837005D7082A00EB53E5 /* Exports */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = Exports; path = ../../include/OpenThreads/Exports; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11837105D7082A00EB53E5 /* Mutex */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = Mutex; path = ../../include/OpenThreads/Mutex; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11837205D7082A00EB53E5 /* ScopedLock */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = ScopedLock; path = ../../include/OpenThreads/ScopedLock; sourceTree = SOURCE_ROOT; };
|
|
||||||
BE11837305D7082A00EB53E5 /* Thread */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 30; name = Thread; path = ../../include/OpenThreads/Thread; sourceTree = SOURCE_ROOT; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
8D07F2C40486CC7A007CD1D0 /* Carbon.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
034768DDFF38A45A11DB9C8B /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
8D07F2C80486CC7A007CD1D0 /* OpenThreads.framework */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
0867D691FE84028FC02AAC07 /* OpenThreads */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
BE11833F05D7005800EB53E5 /* Header */,
|
|
||||||
08FB77ACFE841707C02AAC07 /* Source */,
|
|
||||||
089C1665FE841158C02AAC07 /* Resources */,
|
|
||||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
|
|
||||||
034768DDFF38A45A11DB9C8B /* Products */,
|
|
||||||
);
|
|
||||||
name = OpenThreads;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
08FB77AAFE841565C02AAC07 /* Carbon.framework */,
|
|
||||||
);
|
|
||||||
name = "External Frameworks and Libraries";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
089C1665FE841158C02AAC07 /* Resources */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
8D07F2C70486CC7A007CD1D0 /* Info.plist */,
|
|
||||||
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
|
|
||||||
);
|
|
||||||
name = Resources;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
08FB77ACFE841707C02AAC07 /* Source */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
BE11832A05D6FE3800EB53E5 /* PThread.c++ */,
|
|
||||||
BE11832B05D6FE3800EB53E5 /* PThreadBarrier.c++ */,
|
|
||||||
BE11832C05D6FE3800EB53E5 /* PThreadBarrierPrivateData.h */,
|
|
||||||
BE11832D05D6FE3800EB53E5 /* PThreadCondition.c++ */,
|
|
||||||
BE11832E05D6FE3800EB53E5 /* PThreadConditionPrivateData.h */,
|
|
||||||
BE11832F05D6FE3800EB53E5 /* PThreadMutex.c++ */,
|
|
||||||
BE11833005D6FE3800EB53E5 /* PThreadMutexPrivateData.h */,
|
|
||||||
BE11833105D6FE3800EB53E5 /* PThreadPrivateData.h */,
|
|
||||||
32BAE0B70371A74B00C91783 /* OpenThreads_Prefix.pch */,
|
|
||||||
);
|
|
||||||
name = Source;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
BE11833F05D7005800EB53E5 /* Header */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
BE11835905D7027D00EB53E5 /* OpenThreads */,
|
|
||||||
);
|
|
||||||
name = Header;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
BE11835905D7027D00EB53E5 /* OpenThreads */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
BE11836E05D7082A00EB53E5 /* Barrier */,
|
|
||||||
00DAF8A70BBE1A0E00EFEB98 /* Block */,
|
|
||||||
BE11836F05D7082A00EB53E5 /* Condition */,
|
|
||||||
BE11837005D7082A00EB53E5 /* Exports */,
|
|
||||||
BE11837105D7082A00EB53E5 /* Mutex */,
|
|
||||||
00DAF8A80BBE1A0E00EFEB98 /* ReadWriteMutex */,
|
|
||||||
00DAF8A90BBE1A0E00EFEB98 /* ReentrantMutex */,
|
|
||||||
BE11837205D7082A00EB53E5 /* ScopedLock */,
|
|
||||||
BE11837305D7082A00EB53E5 /* Thread */,
|
|
||||||
);
|
|
||||||
name = OpenThreads;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXHeadersBuildPhase section */
|
|
||||||
8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
|
|
||||||
isa = PBXHeadersBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
00DAF8AA0BBE1A0E00EFEB98 /* Block in Headers */,
|
|
||||||
00DAF8AB0BBE1A0F00EFEB98 /* ReadWriteMutex in Headers */,
|
|
||||||
00DAF8AC0BBE1A0F00EFEB98 /* ReentrantMutex in Headers */,
|
|
||||||
BE11837D05D7083B00EB53E5 /* Barrier in Headers */,
|
|
||||||
BE11837E05D7083B00EB53E5 /* Condition in Headers */,
|
|
||||||
BE11837F05D7083B00EB53E5 /* Exports in Headers */,
|
|
||||||
BE11838005D7083B00EB53E5 /* Mutex in Headers */,
|
|
||||||
BE11838105D7083B00EB53E5 /* ScopedLock in Headers */,
|
|
||||||
BE11838205D7083B00EB53E5 /* Thread in Headers */,
|
|
||||||
8D07F2BE0486CC7A007CD1D0 /* OpenThreads_Prefix.pch in Headers */,
|
|
||||||
BE11833405D6FE3900EB53E5 /* PThreadBarrierPrivateData.h in Headers */,
|
|
||||||
BE11833605D6FE3900EB53E5 /* PThreadConditionPrivateData.h in Headers */,
|
|
||||||
BE11833805D6FE3900EB53E5 /* PThreadMutexPrivateData.h in Headers */,
|
|
||||||
BE11833905D6FE3900EB53E5 /* PThreadPrivateData.h in Headers */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXHeadersBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
8D07F2BC0486CC7A007CD1D0 /* OpenThreads */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 0011012F0873634F0015C576 /* Build configuration list for PBXNativeTarget "OpenThreads" */;
|
|
||||||
buildPhases = (
|
|
||||||
8D07F2BD0486CC7A007CD1D0 /* Headers */,
|
|
||||||
8D07F2BF0486CC7A007CD1D0 /* Resources */,
|
|
||||||
8D07F2C10486CC7A007CD1D0 /* Sources */,
|
|
||||||
8D07F2C30486CC7A007CD1D0 /* Frameworks */,
|
|
||||||
8D07F2C50486CC7A007CD1D0 /* Rez */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = OpenThreads;
|
|
||||||
productInstallPath = "$(HOME)/Library/Frameworks";
|
|
||||||
productName = OpenThreads;
|
|
||||||
productReference = 8D07F2C80486CC7A007CD1D0 /* OpenThreads.framework */;
|
|
||||||
productType = "com.apple.product-type.framework";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
0867D690FE84028FC02AAC07 /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
buildConfigurationList = 001101330873634F0015C576 /* Build configuration list for PBXProject "OpenThreads" */;
|
|
||||||
hasScannedForEncodings = 1;
|
|
||||||
mainGroup = 0867D691FE84028FC02AAC07 /* OpenThreads */;
|
|
||||||
productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
targets = (
|
|
||||||
8D07F2BC0486CC7A007CD1D0 /* OpenThreads */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXResourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXRezBuildPhase section */
|
|
||||||
8D07F2C50486CC7A007CD1D0 /* Rez */ = {
|
|
||||||
isa = PBXRezBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXRezBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
8D07F2C10486CC7A007CD1D0 /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
BE11835105D7022C00EB53E5 /* PThread.c++ in Sources */,
|
|
||||||
BE11835205D7022C00EB53E5 /* PThreadBarrier.c++ in Sources */,
|
|
||||||
BE11835405D7022C00EB53E5 /* PThreadCondition.c++ in Sources */,
|
|
||||||
BE11835605D7022C00EB53E5 /* PThreadMutex.c++ in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
|
||||||
089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
089C1667FE841158C02AAC07 /* English */,
|
|
||||||
);
|
|
||||||
name = InfoPlist.strings;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXVariantGroup section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
001101300873634F0015C576 /* Development */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUGGING_SYMBOLS = YES;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
FRAMEWORK_VERSION = A;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
|
||||||
GCC_ENABLE_TRIGRAPHS = NO;
|
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
|
||||||
GCC_PREFIX_HEADER = OpenThreads_Prefix.pch;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
|
||||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
|
||||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
|
||||||
INFOPLIST_FILE = Info.plist;
|
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
|
||||||
LIBRARY_STYLE = Dynamic;
|
|
||||||
MACH_O_TYPE = mh_dylib;
|
|
||||||
OTHER_CFLAGS = "";
|
|
||||||
OTHER_LDFLAGS = (
|
|
||||||
"-seg1addr",
|
|
||||||
0x1FF00000,
|
|
||||||
);
|
|
||||||
PRODUCT_NAME = OpenThreads;
|
|
||||||
SECTORDER_FLAGS = "";
|
|
||||||
SYMROOT = ../OpenSceneGraph/build;
|
|
||||||
WARNING_CFLAGS = (
|
|
||||||
"-Wmost",
|
|
||||||
"-Wno-four-char-constants",
|
|
||||||
"-Wno-unknown-pragmas",
|
|
||||||
);
|
|
||||||
WRAPPER_EXTENSION = framework;
|
|
||||||
ZERO_LINK = YES;
|
|
||||||
};
|
|
||||||
name = Development;
|
|
||||||
};
|
|
||||||
001101310873634F0015C576 /* Deployment */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
COPY_PHASE_STRIP = YES;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
FRAMEWORK_VERSION = A;
|
|
||||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
|
||||||
GCC_ENABLE_TRIGRAPHS = NO;
|
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
|
||||||
GCC_PREFIX_HEADER = OpenThreads_Prefix.pch;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
|
||||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
|
||||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
|
||||||
INFOPLIST_FILE = Info.plist;
|
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
|
||||||
LIBRARY_STYLE = Dynamic;
|
|
||||||
MACH_O_TYPE = mh_dylib;
|
|
||||||
OTHER_CFLAGS = "";
|
|
||||||
OTHER_LDFLAGS = (
|
|
||||||
"-seg1addr",
|
|
||||||
0x1FF00000,
|
|
||||||
);
|
|
||||||
PRODUCT_NAME = OpenThreads;
|
|
||||||
SECTORDER_FLAGS = "";
|
|
||||||
STRIP_INSTALLED_PRODUCT = YES;
|
|
||||||
WARNING_CFLAGS = (
|
|
||||||
"-Wmost",
|
|
||||||
"-Wno-four-char-constants",
|
|
||||||
"-Wno-unknown-pragmas",
|
|
||||||
);
|
|
||||||
WRAPPER_EXTENSION = framework;
|
|
||||||
ZERO_LINK = NO;
|
|
||||||
};
|
|
||||||
name = Deployment;
|
|
||||||
};
|
|
||||||
001101320873634F0015C576 /* Default */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
FRAMEWORK_VERSION = A;
|
|
||||||
GCC_ENABLE_TRIGRAPHS = NO;
|
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
|
||||||
GCC_PREFIX_HEADER = OpenThreads_Prefix.pch;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
|
||||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
|
|
||||||
GCC_WARN_UNKNOWN_PRAGMAS = NO;
|
|
||||||
INFOPLIST_FILE = Info.plist;
|
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
|
||||||
LIBRARY_STYLE = Dynamic;
|
|
||||||
MACH_O_TYPE = mh_dylib;
|
|
||||||
OTHER_CFLAGS = "";
|
|
||||||
OTHER_LDFLAGS = (
|
|
||||||
"-seg1addr",
|
|
||||||
0x1FF00000,
|
|
||||||
);
|
|
||||||
PRODUCT_NAME = OpenThreads;
|
|
||||||
SECTORDER_FLAGS = "";
|
|
||||||
WARNING_CFLAGS = (
|
|
||||||
"-Wmost",
|
|
||||||
"-Wno-four-char-constants",
|
|
||||||
"-Wno-unknown-pragmas",
|
|
||||||
);
|
|
||||||
WRAPPER_EXTENSION = framework;
|
|
||||||
};
|
|
||||||
name = Default;
|
|
||||||
};
|
|
||||||
001101340873634F0015C576 /* Development */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ARCHS = (
|
|
||||||
ppc,
|
|
||||||
i386,
|
|
||||||
);
|
|
||||||
GCC_AUTO_VECTORIZATION = YES;
|
|
||||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
|
||||||
GCC_MODEL_TUNING = G5;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
../../include,
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
PREBINDING = NO;
|
|
||||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
|
||||||
STRIP_STYLE = "non-global";
|
|
||||||
};
|
|
||||||
name = Development;
|
|
||||||
};
|
|
||||||
001101350873634F0015C576 /* Deployment */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ARCHS = (
|
|
||||||
ppc,
|
|
||||||
i386,
|
|
||||||
);
|
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
|
||||||
GCC_AUTO_VECTORIZATION = YES;
|
|
||||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
|
||||||
GCC_MODEL_TUNING = G5;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = s;
|
|
||||||
HEADER_SEARCH_PATHS = ../../include;
|
|
||||||
PREBINDING = NO;
|
|
||||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
|
||||||
STRIP_STYLE = "non-global";
|
|
||||||
};
|
|
||||||
name = Deployment;
|
|
||||||
};
|
|
||||||
001101360873634F0015C576 /* Default */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ARCHS = (
|
|
||||||
ppc,
|
|
||||||
i386,
|
|
||||||
);
|
|
||||||
GCC_AUTO_VECTORIZATION = YES;
|
|
||||||
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
|
|
||||||
GCC_MODEL_TUNING = G5;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 3;
|
|
||||||
HEADER_SEARCH_PATHS = ../../include;
|
|
||||||
PREBINDING = NO;
|
|
||||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
|
||||||
STRIP_STYLE = "non-global";
|
|
||||||
};
|
|
||||||
name = Default;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
0011012F0873634F0015C576 /* Build configuration list for PBXNativeTarget "OpenThreads" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
001101300873634F0015C576 /* Development */,
|
|
||||||
001101310873634F0015C576 /* Deployment */,
|
|
||||||
001101320873634F0015C576 /* Default */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Default;
|
|
||||||
};
|
|
||||||
001101330873634F0015C576 /* Build configuration list for PBXProject "OpenThreads" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
001101340873634F0015C576 /* Development */,
|
|
||||||
001101350873634F0015C576 /* Deployment */,
|
|
||||||
001101360873634F0015C576 /* Default */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Default;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
//
|
|
||||||
// Prefix header for all source files of the 'OpenThreads' target in the 'OpenThreads' project.
|
|
||||||
//
|
|
||||||
|
|
||||||
//#include <Carbon/Carbon.h>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>BuildVersion</key>
|
|
||||||
<string>38</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>ProjectName</key>
|
|
||||||
<string>CarbonProjectTemplates</string>
|
|
||||||
<key>SourceVersion</key>
|
|
||||||
<string>140000</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -79,7 +79,12 @@ int main( int argc, char **argv )
|
|||||||
else if (fileType==osgDB::DIRECTORY)
|
else if (fileType==osgDB::DIRECTORY)
|
||||||
{
|
{
|
||||||
osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]);
|
osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]);
|
||||||
files.insert(files.end(),directory.begin(),directory.end());
|
osgDB::DirectoryContents::iterator it = directory.begin();
|
||||||
|
while( it != directory.end())
|
||||||
|
{
|
||||||
|
files.push_back(filePath + "/" + (*it));
|
||||||
|
++it;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
SET(TARGET_SRC osgversion.cpp )
|
SET(TARGET_SRC osgversion.cpp )
|
||||||
|
|
||||||
|
IF (OSG_MAINTAINER)
|
||||||
|
SET(TARGET_SRC ${TARGET_SRC} Contributors.cpp )
|
||||||
|
ADD_DEFINITIONS("-DBUILD_CONTRIBUTORS")
|
||||||
|
ENDIF(OSG_MAINTAINER)
|
||||||
|
|
||||||
SET(TARGET_COMMON_LIBRARIES
|
SET(TARGET_COMMON_LIBRARIES
|
||||||
OpenThreads
|
OpenThreads
|
||||||
osg
|
osg
|
||||||
|
|||||||
838
applications/osgversion/Contributors.cpp
Normal file
838
applications/osgversion/Contributors.cpp
Normal file
@@ -0,0 +1,838 @@
|
|||||||
|
// The majority of the application is dedicated to building the
|
||||||
|
// current contribitors list by parsing the ChangeLog, it just takes
|
||||||
|
// one line in the main itself to report the version number.
|
||||||
|
|
||||||
|
#include <set>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <OpenThreads/Version>
|
||||||
|
|
||||||
|
#include <osg/Notify>
|
||||||
|
#include <osg/Version>
|
||||||
|
#include <osg/ArgumentParser>
|
||||||
|
#include <osg/ApplicationUsage>
|
||||||
|
|
||||||
|
#include <osg/Matrix>
|
||||||
|
#include <osg/Plane>
|
||||||
|
#include <osg/BoundingBox>
|
||||||
|
#include <osg/BoundingSphere>
|
||||||
|
|
||||||
|
#include <osgDB/fstream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma setlocale("C")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef pair<string, string> NamePair;
|
||||||
|
typedef map<NamePair, unsigned int> NameMap;
|
||||||
|
typedef vector<string> Words;
|
||||||
|
|
||||||
|
NamePair EmptyNamePair;
|
||||||
|
NamePair NameRobertOsfield("Robert", "Osfield");
|
||||||
|
NamePair NameDonBurns ("Don", "Burns");
|
||||||
|
|
||||||
|
|
||||||
|
const char* validNames[] =
|
||||||
|
{
|
||||||
|
"de",
|
||||||
|
"den",
|
||||||
|
"van"
|
||||||
|
};
|
||||||
|
|
||||||
|
const char* invalidNames[] =
|
||||||
|
{
|
||||||
|
"Added",
|
||||||
|
"AnimationPath",
|
||||||
|
"AnimationPathCallback",
|
||||||
|
"AnimationPathManipulator",
|
||||||
|
"ArgumentParser",
|
||||||
|
"AttrData",
|
||||||
|
"AutoTransform",
|
||||||
|
"AutoTransform.",
|
||||||
|
"Azimuth",
|
||||||
|
"BlenColour(Vec4",
|
||||||
|
"Camera",
|
||||||
|
"CameraBarrierCallback",
|
||||||
|
"CameraNode",
|
||||||
|
"Canvas",
|
||||||
|
"CluserCullingCallback",
|
||||||
|
"ClusterCullingCallback",
|
||||||
|
"CoordinateSystem",
|
||||||
|
"CoordinateSystemNode",
|
||||||
|
"CoordinateSystemNode&",
|
||||||
|
"CopyOp",
|
||||||
|
"Copyright",
|
||||||
|
"Core",
|
||||||
|
"Creator",
|
||||||
|
"CullCallbacks",
|
||||||
|
"CullingSettngs",
|
||||||
|
"CullVisitor",
|
||||||
|
"CullVistor",
|
||||||
|
"Cygwin",
|
||||||
|
"DatabasePager",
|
||||||
|
"DataSet",
|
||||||
|
"DataVariance",
|
||||||
|
"DeleteHandler",
|
||||||
|
"DisplaySettings",
|
||||||
|
"Drawable",
|
||||||
|
"DrawElementsUByte",
|
||||||
|
"Endian",
|
||||||
|
"Escape",
|
||||||
|
"EventQueue",
|
||||||
|
"Face",
|
||||||
|
"Files",
|
||||||
|
"Fixed",
|
||||||
|
"Fixes",
|
||||||
|
"FluidProgram",
|
||||||
|
"FontImplementation",
|
||||||
|
"FrameStats",
|
||||||
|
"Framstamp",
|
||||||
|
"FreeBSD",
|
||||||
|
"Geode",
|
||||||
|
"GeoemtryTechnique",
|
||||||
|
"GeometryTechnique",
|
||||||
|
"GeoSet",
|
||||||
|
"GraphicsContext",
|
||||||
|
"GraphicsContextImplementation",
|
||||||
|
"GraphicsThread",
|
||||||
|
"GraphicsWindowX11",
|
||||||
|
"Group",
|
||||||
|
"Image",
|
||||||
|
"ImageOptions",
|
||||||
|
"Images",
|
||||||
|
"Images/SolarSystem",
|
||||||
|
"ImageStream",
|
||||||
|
"Improved",
|
||||||
|
"IndexBlock",
|
||||||
|
"IndexFaceSets",
|
||||||
|
"IntersectVisitor",
|
||||||
|
"Inventor",
|
||||||
|
"KdTree",
|
||||||
|
"KeyboardMouse",
|
||||||
|
"KeyboardMouseCallback",
|
||||||
|
"LightModel",
|
||||||
|
"LightPointNode",
|
||||||
|
"LineSegment",
|
||||||
|
"LineStipple",
|
||||||
|
"Logos",
|
||||||
|
"LongIDRecord",
|
||||||
|
"Make",
|
||||||
|
"Makefile",
|
||||||
|
"Material",
|
||||||
|
"Matrix",
|
||||||
|
"Matrix*",
|
||||||
|
"MatrixManipulator",
|
||||||
|
"MatrixTransform",
|
||||||
|
"MemoryManager",
|
||||||
|
"MergeGeometryVisitor",
|
||||||
|
"MeshRecord",
|
||||||
|
"Mode",
|
||||||
|
"Mr",
|
||||||
|
"Multigen",
|
||||||
|
"New",
|
||||||
|
"NewCullVisitor",
|
||||||
|
"NodeVisitor",
|
||||||
|
"Object",
|
||||||
|
"OpenDX",
|
||||||
|
"OpenSceneGraph",
|
||||||
|
"OpenSceneGraph-2",
|
||||||
|
"OpenSceneGraph-osgWidget-dev",
|
||||||
|
"OpenThreads",
|
||||||
|
"OperationThread",
|
||||||
|
"Optimizer",
|
||||||
|
"OrientationConverter",
|
||||||
|
"Osfields",
|
||||||
|
"Ouput",
|
||||||
|
"Output",
|
||||||
|
"OveralyNode",
|
||||||
|
"PagedLOD",
|
||||||
|
"PageLOD",
|
||||||
|
"Paging",
|
||||||
|
"ParentList",
|
||||||
|
"Performer",
|
||||||
|
"PickHandler",
|
||||||
|
"PixelDataBufferObject",
|
||||||
|
"PolygonStipple",
|
||||||
|
"PolytopeVisitor",
|
||||||
|
"PrimitiveIndexFunctor",
|
||||||
|
"Prodcuer",
|
||||||
|
"Producer",
|
||||||
|
"ProducerEventCallback",
|
||||||
|
"Program",
|
||||||
|
"Proxy",
|
||||||
|
"ProxyNode",
|
||||||
|
"Quake3",
|
||||||
|
"Quicktime",
|
||||||
|
"ReaderWriters",
|
||||||
|
"ReentrantMutex",
|
||||||
|
"Referenced",
|
||||||
|
"ReferenceFrame",
|
||||||
|
"Removed",
|
||||||
|
"RemoveLoadedProxyNodes",
|
||||||
|
"RenderStage",
|
||||||
|
"RenderTargetFallback",
|
||||||
|
"RenderToTextureStage",
|
||||||
|
"SceneGraphBuilder",
|
||||||
|
"SceneView",
|
||||||
|
"Sequence",
|
||||||
|
"Shape",
|
||||||
|
"SimpleViewer",
|
||||||
|
"SimpleViewer",
|
||||||
|
"SmokeTrailEffect",
|
||||||
|
"Source",
|
||||||
|
"SpotExponent",
|
||||||
|
"State",
|
||||||
|
"StateAttribute",
|
||||||
|
"Stats",
|
||||||
|
"StatsVisitor",
|
||||||
|
"Studio",
|
||||||
|
"Support",
|
||||||
|
"Switch",
|
||||||
|
"TechniqueEventHandler",
|
||||||
|
"TerraPage",
|
||||||
|
"TessellationHints",
|
||||||
|
"TestManipulator",
|
||||||
|
"TestSupportCallback",
|
||||||
|
"TexEnv",
|
||||||
|
"TexMat(Matrix",
|
||||||
|
"Texture",
|
||||||
|
"Texture2DArray",
|
||||||
|
"Texture3D",
|
||||||
|
"TextureCubeMap",
|
||||||
|
"TextureObjectManager",
|
||||||
|
"TextureRectangle",
|
||||||
|
"TextureRectangle(Image*",
|
||||||
|
"TextureType",
|
||||||
|
"Texuture",
|
||||||
|
"TriStripVisitor",
|
||||||
|
"TrPageViewer",
|
||||||
|
"Uniform",
|
||||||
|
"UseFarLineSegments",
|
||||||
|
"UserData",
|
||||||
|
"Valve",
|
||||||
|
"Vec*",
|
||||||
|
"Vec2d",
|
||||||
|
"Vec3d",
|
||||||
|
"Vec4ub",
|
||||||
|
"Version",
|
||||||
|
"VertexData",
|
||||||
|
"View",
|
||||||
|
"Viewer",
|
||||||
|
"ViewPoint",
|
||||||
|
"Viewport",
|
||||||
|
"Viewport",
|
||||||
|
"Visual",
|
||||||
|
"VisualStudio",
|
||||||
|
"WindowData",
|
||||||
|
"Windows",
|
||||||
|
"X",
|
||||||
|
"Xcode",
|
||||||
|
"Y"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct TypoCorrection
|
||||||
|
{
|
||||||
|
const char* original;
|
||||||
|
const char* corrected;
|
||||||
|
};
|
||||||
|
|
||||||
|
TypoCorrection typoCorrections[] =
|
||||||
|
{
|
||||||
|
{"Aderian", "Adrian"},
|
||||||
|
{"Adndre", "Andre"},
|
||||||
|
{"Adrain", "Adrian"},
|
||||||
|
{"Amueller", "Aumueller"},
|
||||||
|
{"Andew", "Andrew"},
|
||||||
|
{"André", "Andr<EFBFBD>"},
|
||||||
|
{"Antione", "Antoine"},
|
||||||
|
{"Antonoine", "Antoine"},
|
||||||
|
{"Atr", "Art"},
|
||||||
|
{"Baverage", "Beverage"},
|
||||||
|
{"Bistroviae", "Bistrovic"},
|
||||||
|
{"Callue", "Callu"},
|
||||||
|
{"Christaiansen", "Christiansen"},
|
||||||
|
{"Cobin", "Corbin"},
|
||||||
|
{"Comporesi", "Camporesi"},
|
||||||
|
{"Connel", "Connell"},
|
||||||
|
{"Cullu", "Callu"},
|
||||||
|
{"Daneil", "Daniel"},
|
||||||
|
{"Daust", "Daoust"},
|
||||||
|
{"Daved", "David"},
|
||||||
|
{"Drederic", "Frederic"},
|
||||||
|
{"Eileman", "Eilemann"},
|
||||||
|
{"Elgi", "Egli"},
|
||||||
|
{"Fabian", "Fabien"},
|
||||||
|
{"Fautre", "Fautr<EFBFBD>"},
|
||||||
|
{"Frashid", "Farshid"},
|
||||||
|
{"Fred", "Frederic"},
|
||||||
|
{"Fredrick", "Frederic"},
|
||||||
|
{"Fredric", "Frederic"},
|
||||||
|
{"Froechlich", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Froehilch", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Froehlich", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Froelich", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Froenlich", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Fröhlich", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Fruciel", "Frauciel"},
|
||||||
|
{"García", "Garcea"},
|
||||||
|
{"Garrat", "Garrett"},
|
||||||
|
{"Garret", "Garrett"},
|
||||||
|
{"Geof", "Geoff"},
|
||||||
|
{"Giatan", "Gaitan"},
|
||||||
|
{"Gronenger", "Gronager"},
|
||||||
|
{"Gronger", "Gronager"},
|
||||||
|
{"Haritchablaet", "Haritchabalet"},
|
||||||
|
{"Hebelin", "Herbelin"},
|
||||||
|
{"Heirtlein", "Hertlein"},
|
||||||
|
{"Heirtlein", "Hertlein"},
|
||||||
|
{"Hertleinm", "Hertlein"},
|
||||||
|
{"Hertlien", "Hertlein"},
|
||||||
|
{"Hi", "He"},
|
||||||
|
{"Hooper", "Hopper"},
|
||||||
|
{"Inverson", "Iverson"},
|
||||||
|
{"Iversion", "Iverson"},
|
||||||
|
{"Jean-Sebastein", "Jean-Sebastien"},
|
||||||
|
{"Jean-Sebastian", "Jean-Sebastien"},
|
||||||
|
{"Jean-Sebastirn", "Jean-Sebastien"},
|
||||||
|
{"Jea-Sebastien", "Jean-Sebastien"},
|
||||||
|
{"Johhansen", "Johansen"},
|
||||||
|
{"Johnansen", "Johansen"},
|
||||||
|
{"Johnasen", "Johansen"},
|
||||||
|
{"Jolly", "Jolley"},
|
||||||
|
{"Jose", "Jos<EFBFBD>"},
|
||||||
|
{"José", "Jos<EFBFBD>"},
|
||||||
|
{"Joson", "Jason"},
|
||||||
|
{"J", "Jos<EFBFBD>"},
|
||||||
|
{"Keuhne", "Kuehne"},
|
||||||
|
{"Kheune", "Kuehne"},
|
||||||
|
{"Lagrade", "Lagarde"},
|
||||||
|
{"Largade", "Lagarde"},
|
||||||
|
{"Larshkari", "Lashkari"},
|
||||||
|
{"Lashakari", "Lashkari"},
|
||||||
|
{"Lashari", "Lashkari"},
|
||||||
|
{"Lasharki", "Lashkari"},
|
||||||
|
{"Laskari", "Lashkari"},
|
||||||
|
{"Leandowski", "Lewandowski"},
|
||||||
|
{"Lawandowski", "Lewandowski"},
|
||||||
|
{"Lucas", "Luaces"},
|
||||||
|
{"Lugi", "Luigi"},
|
||||||
|
{"Lweandowski", "Lewandowski"},
|
||||||
|
{"Maceij", "Maciej"},
|
||||||
|
{"Machler", "M<EFBFBD>chler"},
|
||||||
|
{"Macro", "Marco"},
|
||||||
|
{"Maechler", "M<EFBFBD>chler"},
|
||||||
|
{"Mahai", "Mihai"},
|
||||||
|
{"Mammond", "Marmond"},
|
||||||
|
{"March", "Marco"},
|
||||||
|
{"Martsz", "Martz"},
|
||||||
|
{"Marz", "Martz"},
|
||||||
|
{"Matz", "Martz"},
|
||||||
|
{"Melchoir", "Melchior"},
|
||||||
|
{"Mellis", "Melis"},
|
||||||
|
{"Messerschimdt", "Messerschmidt"},
|
||||||
|
{"Micheal", "Michael"},
|
||||||
|
{"Mihair", "Mihai"},
|
||||||
|
{"Molishtan", "Moloshtan"},
|
||||||
|
{"Molishtan", "Moloshtan"},
|
||||||
|
{"Moloshton", "Moloshtan"},
|
||||||
|
{"Morné", "Morn<EFBFBD>"},
|
||||||
|
{"Morne", "Morn<EFBFBD>"},
|
||||||
|
{"Moule", "Moiule"},
|
||||||
|
{"Narache", "Marache"},
|
||||||
|
{"Nicklov", "Nikolov"},
|
||||||
|
{"Nickolov", "Nikolov"},
|
||||||
|
{"Olad", "Olaf"},
|
||||||
|
{"Olar", "Olaf"},
|
||||||
|
{"Oritz", "Ortiz"},
|
||||||
|
{"Osfeld", "Osfield"},
|
||||||
|
{"Osfied", "Osfield"},
|
||||||
|
{"Pail", "Paul"},
|
||||||
|
{"Rajce", "Trajce"},
|
||||||
|
{"Randal", "Randall"},
|
||||||
|
{"Robet", "Robert"},
|
||||||
|
{"Rodger", "Roger"},
|
||||||
|
{"Rolad", "Roland"},
|
||||||
|
{"Rucard", "Richard"},
|
||||||
|
{"Sekender", "Sukender"},
|
||||||
|
{"Sewel", "Sewell"},
|
||||||
|
{"Simmonson", "Simonsson"},
|
||||||
|
{"Simmonsson", "Simonsson"},
|
||||||
|
{"Sjolie", "Sj<EFBFBD>lie"},
|
||||||
|
{"Sjölie", "Sj<EFBFBD>lie"},
|
||||||
|
{"Skinnder", "Skinner"},
|
||||||
|
{"Sokolosky", "Sokolowsky"},
|
||||||
|
{"Sokolowky", "Sokolowsky"},
|
||||||
|
{"Sokolowki", "Sokolowsky"},
|
||||||
|
{"Sokolowski", "Sokolowsky"},
|
||||||
|
{"Sokolsky", "Sokolowsky"},
|
||||||
|
{"Sokolwsky", "Sokolowsky"},
|
||||||
|
{"Sonda", "Sondra"},
|
||||||
|
{"Stansilav", "Stanislav"},
|
||||||
|
{"Stefan", "Stephan"},
|
||||||
|
{"Stell", "Steel"},
|
||||||
|
{"Sylvan", "Sylvain"},
|
||||||
|
{"Takeahei", "Takahei"},
|
||||||
|
{"Takehei", "Takahei"},
|
||||||
|
{"Tery", "Terry"},
|
||||||
|
{"Tarantilils", "Tarantilis"},
|
||||||
|
{"Trastenjak", "Trstenjak"},
|
||||||
|
{"Urlich", "Ulrich"},
|
||||||
|
{"Vines", "Vine"},
|
||||||
|
{"Waldrom", "Waldron"},
|
||||||
|
{"Wedner", "Weidner"},
|
||||||
|
{"Weidemann", "Wiedemann"},
|
||||||
|
{"Wieblen", "Weiblen"},
|
||||||
|
{"Woesnner", "Woessner"},
|
||||||
|
{"Wojchiech", "Wojciech"},
|
||||||
|
{"Wojiech", "Wojciech"},
|
||||||
|
{"Xennon", "Hanson"},
|
||||||
|
{"Yefrei", "Yefei"},
|
||||||
|
{"Yfei", "Yefei"}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct NameCorrection
|
||||||
|
{
|
||||||
|
const char* originalFirst;
|
||||||
|
const char* originalSecond;
|
||||||
|
const char* correctedFirst;
|
||||||
|
const char* correctedSecond;
|
||||||
|
};
|
||||||
|
|
||||||
|
NameCorrection nameCorrections[] =
|
||||||
|
{
|
||||||
|
{"Marc", "Sciabica",
|
||||||
|
"Mark", "Sciabica"},
|
||||||
|
{"Jean", "Sebastien",
|
||||||
|
"Jean-Sebastien", "Guay"},
|
||||||
|
{"Michale", "Platings",
|
||||||
|
"Michael", "Platings"},
|
||||||
|
{"Mick", "",
|
||||||
|
"Maik", "Keller"},
|
||||||
|
{"Gary", "Quin",
|
||||||
|
"Gary", "Quinn"},
|
||||||
|
{"BjornHein", "",
|
||||||
|
"Bj<EFBFBD>rn", "Hein"},
|
||||||
|
{"Bjorn", "Hein",
|
||||||
|
"Bj<EFBFBD>rn", "Hein"},
|
||||||
|
{"Erik", "van",
|
||||||
|
"Erik", "den Dekker"},
|
||||||
|
{"Erik", "den",
|
||||||
|
"Erik", "den Dekker"},
|
||||||
|
{"Jeoen", "den",
|
||||||
|
"Jeroen", "den Dekker"},
|
||||||
|
{"John", "Vidar",
|
||||||
|
"John", "Vidar Larring"},
|
||||||
|
{"John", "Vida",
|
||||||
|
"John", "Vidar Larring"},
|
||||||
|
{"Sebastien", "Messerschmidt",
|
||||||
|
"Sebastian", "Messerschmidt"},
|
||||||
|
{"Mattias", "Fr<EFBFBD>hlich",
|
||||||
|
"Mathias", "Fr<EFBFBD>hlich"},
|
||||||
|
{"Mathias", "Helsing",
|
||||||
|
"Mattias", "Helsing"},
|
||||||
|
{"Jose", "Delport",
|
||||||
|
"J.P.", "Delport"},
|
||||||
|
{"Jos<EFBFBD>", "Delport",
|
||||||
|
"J.P.", "Delport"},
|
||||||
|
{"Franz", "Melchior",
|
||||||
|
"Melchior", "Franz"},
|
||||||
|
{"Glen", "Waldon",
|
||||||
|
"Glenn", "Waldron"},
|
||||||
|
{"Ralf", "Karn",
|
||||||
|
"Ralf", "Kern"},
|
||||||
|
{"Donny", "Cipperly",
|
||||||
|
"Donald", "Cipperly"},
|
||||||
|
{"Gino", "van",
|
||||||
|
"Gino", "van den Bergen"},
|
||||||
|
{"Radu", "Mihai",
|
||||||
|
"Mihai", "Radu"},
|
||||||
|
{"Art", "Trevs",
|
||||||
|
"Art", "Tevs"},
|
||||||
|
{"Tim", "More",
|
||||||
|
"Tim", "Moore"},
|
||||||
|
{"Andre", "Garneau",
|
||||||
|
"Andr<EFBFBD>", "Garneau"},
|
||||||
|
{"Eric", "Hammil",
|
||||||
|
"Chris", "Hanson"},
|
||||||
|
{"Paul", "de",
|
||||||
|
"Paul", "de Repentigny"},
|
||||||
|
{"Raymond", "de",
|
||||||
|
"Raymond", "de Vries"},
|
||||||
|
{"Nick", "",
|
||||||
|
"Trajce", "Nikolov"},
|
||||||
|
{"Daniel", "",
|
||||||
|
"Daniel", "Sj<EFBFBD>lie"},
|
||||||
|
{"Julia", "Ortiz",
|
||||||
|
"Julian", "Ortiz"},
|
||||||
|
{"Rune", "Schmidt",
|
||||||
|
"Rune", "Schmidt Jensen"},
|
||||||
|
{"Romano", "Jos<EFBFBD>",
|
||||||
|
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
||||||
|
{"Rommano", "Silva",
|
||||||
|
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
||||||
|
{"Leandro", "Motta",
|
||||||
|
"Leandro", "Motta Barros"},
|
||||||
|
{"A", "Botorabi",
|
||||||
|
"Ali", "Botorabi"},
|
||||||
|
{"Waltice", "",
|
||||||
|
"Walter", "J. Altice"},
|
||||||
|
{"Drew", "",
|
||||||
|
"Drew", "Whitehouse"},
|
||||||
|
{"Douglas", "A",
|
||||||
|
"Douglas", "A. Pouk"},
|
||||||
|
{"Colin", "MacDonald",
|
||||||
|
"Colin", "McDonald"},
|
||||||
|
{"Nikolov", "Trajce",
|
||||||
|
"Trajce", "Nikolov"},
|
||||||
|
{"Frauciel", "Luc",
|
||||||
|
"Luc", "Frauciel"},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool validName(const string& first)
|
||||||
|
{
|
||||||
|
// Check for valid names
|
||||||
|
for (unsigned int i = 0; i < sizeof(validNames) / sizeof(char*); ++i)
|
||||||
|
{
|
||||||
|
if (first == validNames[i])
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (first.empty()) return false;
|
||||||
|
|
||||||
|
if (first[0] < 'A' || first[0] > 'Z') return false;
|
||||||
|
|
||||||
|
if (first.size() >= 2 && (first[1] < 'a' || first[1] > 'z') && (first[1] != '.') && (first[1] != ',')) return false;
|
||||||
|
|
||||||
|
// Check for invalid names
|
||||||
|
for (unsigned int i = 0; i < sizeof(invalidNames) / sizeof(char*); ++i)
|
||||||
|
{
|
||||||
|
if (first == invalidNames[i])
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default to a valid name
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string typoCorrection(const string& name)
|
||||||
|
{
|
||||||
|
// Loop over all known typo corrections
|
||||||
|
for (unsigned int i = 0; i < sizeof(typoCorrections) / sizeof(TypoCorrection); ++i)
|
||||||
|
{
|
||||||
|
// If a typo is found
|
||||||
|
if (name == typoCorrections[i].original)
|
||||||
|
{
|
||||||
|
// Return the correction
|
||||||
|
return typoCorrections[i].corrected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void nameCorrection(NamePair& name)
|
||||||
|
{
|
||||||
|
// Loop over all known name corrections
|
||||||
|
for (unsigned int i = 0; i < sizeof(nameCorrections) / sizeof(NameCorrection); ++i)
|
||||||
|
{
|
||||||
|
// If a matching name is found
|
||||||
|
if (name.first == nameCorrections[i].originalFirst &&
|
||||||
|
name.second == nameCorrections[i].originalSecond)
|
||||||
|
{
|
||||||
|
// Return the correction
|
||||||
|
name.first = nameCorrections[i].correctedFirst;
|
||||||
|
name.second = nameCorrections[i].correctedSecond;
|
||||||
|
|
||||||
|
// Early out, since we don't want corrections of corrections
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void lastValidCharacter(const string& name, unsigned int& pos, char c)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < pos; ++i)
|
||||||
|
{
|
||||||
|
if (name[i] == c)
|
||||||
|
{
|
||||||
|
pos = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void lastValidCharacter(const string& name, unsigned int& last)
|
||||||
|
{
|
||||||
|
lastValidCharacter(name, last, '.');
|
||||||
|
lastValidCharacter(name, last, ',');
|
||||||
|
lastValidCharacter(name, last, '\'');
|
||||||
|
lastValidCharacter(name, last, '/');
|
||||||
|
lastValidCharacter(name, last, '\\');
|
||||||
|
lastValidCharacter(name, last, ':');
|
||||||
|
lastValidCharacter(name, last, ';');
|
||||||
|
lastValidCharacter(name, last, ')');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NamePair createName(const string& first, const string& second)
|
||||||
|
{
|
||||||
|
if (first.empty()) return EmptyNamePair;
|
||||||
|
|
||||||
|
// cout << "first = " << first << " second = " << second << endl;
|
||||||
|
|
||||||
|
unsigned int last = first.size();
|
||||||
|
lastValidCharacter(first, last);
|
||||||
|
|
||||||
|
if (last == 0) return EmptyNamePair;
|
||||||
|
|
||||||
|
string name;
|
||||||
|
|
||||||
|
name.append(first.begin(), first.begin() + last);
|
||||||
|
|
||||||
|
if (!validName(name)) return EmptyNamePair;
|
||||||
|
|
||||||
|
name = typoCorrection(name);
|
||||||
|
|
||||||
|
if (second.empty() ||
|
||||||
|
!validName(second))
|
||||||
|
{
|
||||||
|
// filter any single or two letter words as unlike to be names.
|
||||||
|
if (name.size() <= 2) return EmptyNamePair;
|
||||||
|
|
||||||
|
return NamePair(name, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
last = second.size();
|
||||||
|
|
||||||
|
lastValidCharacter(second, last);
|
||||||
|
|
||||||
|
if (last > 0)
|
||||||
|
{
|
||||||
|
string surname(second.begin(), second.begin() + last);
|
||||||
|
|
||||||
|
if (validName(surname))
|
||||||
|
{
|
||||||
|
surname = typoCorrection(surname);
|
||||||
|
return NamePair(name, surname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// filter any single or two letter words as unlike to be names.
|
||||||
|
if (name.size() <= 2) return EmptyNamePair;
|
||||||
|
|
||||||
|
return NamePair(name, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool submissionsSequence(const Words& words, unsigned int& i)
|
||||||
|
{
|
||||||
|
if (i + 1 >= words.size()) return false;
|
||||||
|
|
||||||
|
if (words[i] == "From" ||
|
||||||
|
words[i] == "from" ||
|
||||||
|
words[i] == "From:" ||
|
||||||
|
words[i] == "from:" ||
|
||||||
|
words[i] == "Merged" ||
|
||||||
|
words[i] == "Integrated") return true;
|
||||||
|
|
||||||
|
if (i + 2 >= words.size()) return false;
|
||||||
|
|
||||||
|
if (words[i] == "submitted" && words[i + 1] == "by")
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (words[i] == "Folded" && words[i + 1] == "in")
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (words[i] == "Rolled" && words[i + 1] == "in")
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (words[i] == "Checked" && words[i + 1] == "in")
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i + 3 >= words.size()) return false;
|
||||||
|
|
||||||
|
if (words[i] == "sent" && words[i + 1] == "in" && words[i + 2] == "by")
|
||||||
|
{
|
||||||
|
i += 2;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void readContributors(NameMap& names, const string& file)
|
||||||
|
{
|
||||||
|
osgDB::ifstream fin(file.c_str());
|
||||||
|
|
||||||
|
Words words;
|
||||||
|
while(fin)
|
||||||
|
{
|
||||||
|
string keyword;
|
||||||
|
fin >> keyword;
|
||||||
|
words.push_back(keyword);
|
||||||
|
}
|
||||||
|
|
||||||
|
string blank_string;
|
||||||
|
|
||||||
|
for(unsigned int i = 0; i < words.size(); ++i)
|
||||||
|
{
|
||||||
|
if (submissionsSequence(words, i))
|
||||||
|
{
|
||||||
|
if (i + 2 < words.size() && validName(words[i + 1]))
|
||||||
|
{
|
||||||
|
NamePair name = createName(words[i + 1], words[i + 2]);
|
||||||
|
nameCorrection(name);
|
||||||
|
if (!name.first.empty()) ++names[name];
|
||||||
|
i += 2;
|
||||||
|
}
|
||||||
|
else if (i + 1 < words.size() && validName(words[i + 1]))
|
||||||
|
{
|
||||||
|
NamePair name = createName(words[i + 1], blank_string);
|
||||||
|
nameCorrection(name);
|
||||||
|
if (!name.first.empty()) ++names[name];
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (words[i] == "robert")
|
||||||
|
{
|
||||||
|
++names[NameRobertOsfield];
|
||||||
|
}
|
||||||
|
else if (words[i] == "don")
|
||||||
|
{
|
||||||
|
++names[NameDonBurns];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// reassign fisrt name entries to their full names entries
|
||||||
|
if (names.size() > 1)
|
||||||
|
{
|
||||||
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); )
|
||||||
|
{
|
||||||
|
if (itr->first.second.empty())
|
||||||
|
{
|
||||||
|
NameMap::iterator next_itr = itr;
|
||||||
|
++next_itr;
|
||||||
|
|
||||||
|
if (next_itr != names.end() && itr->first.first == next_itr->first.first)
|
||||||
|
{
|
||||||
|
next_itr->second += itr->second;
|
||||||
|
names.erase(itr);
|
||||||
|
itr = next_itr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove the double entries from Robert's contributions
|
||||||
|
if (names.size() > 1)
|
||||||
|
{
|
||||||
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
||||||
|
{
|
||||||
|
if (itr->first != NameRobertOsfield && itr->first != NameDonBurns)
|
||||||
|
{
|
||||||
|
names[NameRobertOsfield] -= itr->second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void buildContributors(NameMap& names)
|
||||||
|
{
|
||||||
|
// top five contributors
|
||||||
|
++names[NamePair("Robert", "Osfield")];
|
||||||
|
++names[NamePair("Don", "Burns")];
|
||||||
|
++names[NamePair("Marco", "Jez")];
|
||||||
|
++names[NamePair("Mike", "Weiblen")];
|
||||||
|
++names[NamePair("Geoff", "Michel")];
|
||||||
|
++names[NamePair("Ben", "van Basten")];
|
||||||
|
|
||||||
|
// contributors that don't appear in the ChangeLog due to their contributions
|
||||||
|
// being before CVS started for the OSG, or before the name logging began.
|
||||||
|
++names[NamePair("Karsten", "Weiss")];
|
||||||
|
++names[NamePair("Graeme", "Harkness")];
|
||||||
|
++names[NamePair("Axel", "Volley")];
|
||||||
|
++names[NamePair("Nikolaus", "Hanekamp")];
|
||||||
|
++names[NamePair("Kristopher", "Bixler")];
|
||||||
|
++names[NamePair("Tanguy", "Fautr<EFBFBD>")];
|
||||||
|
++names[NamePair("J.E.", "Hoffmann")];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void printContributors(const std::string& changeLog, bool printNumEntries)
|
||||||
|
{
|
||||||
|
NameMap names;
|
||||||
|
buildContributors(names);
|
||||||
|
if (!changeLog.empty())
|
||||||
|
{
|
||||||
|
readContributors(names, changeLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef multimap<unsigned int, NamePair> SortedNameMap;
|
||||||
|
|
||||||
|
SortedNameMap sortedNames;
|
||||||
|
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
||||||
|
{
|
||||||
|
sortedNames.insert(SortedNameMap::value_type(itr->second, itr->first));
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << names.size() << " Contributors:" << endl << endl;
|
||||||
|
|
||||||
|
if (printNumEntries)
|
||||||
|
{
|
||||||
|
cout << "Entries Firstname Surname" << endl;
|
||||||
|
cout << "-------------------------" << endl;
|
||||||
|
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
||||||
|
{
|
||||||
|
cout << sitr->first << "\t" << sitr->second.first << " " << sitr->second.second << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cout << "Firstname Surname" << endl;
|
||||||
|
cout << "-----------------" << endl;
|
||||||
|
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
||||||
|
{
|
||||||
|
cout << sitr->second.first << " " << sitr->second.second << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,7 @@ FILE_VERSION_FILTER =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
QUIET = NO
|
QUIET = YES
|
||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ SHOW_USED_FILES = YES
|
|||||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||||
|
|
||||||
QUIET = NO
|
QUIET = YES
|
||||||
|
|
||||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ FILE_VERSION_FILTER =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
QUIET = NO
|
QUIET = YES
|
||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ LAYOUT_FILE =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
QUIET = NO
|
QUIET = YES
|
||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ LAYOUT_FILE =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
QUIET = NO
|
QUIET = YES
|
||||||
WARNINGS = YES
|
WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osglogicop)
|
ADD_SUBDIRECTORY(osglogicop)
|
||||||
ADD_SUBDIRECTORY(osglogo)
|
ADD_SUBDIRECTORY(osglogo)
|
||||||
ADD_SUBDIRECTORY(osgmanipulator)
|
ADD_SUBDIRECTORY(osgmanipulator)
|
||||||
ADD_SUBDIRECTORY(osgmemorytest)
|
|
||||||
ADD_SUBDIRECTORY(osgmotionblur)
|
ADD_SUBDIRECTORY(osgmotionblur)
|
||||||
ADD_SUBDIRECTORY(osgmovie)
|
ADD_SUBDIRECTORY(osgmovie)
|
||||||
ADD_SUBDIRECTORY(osgmultiplerendertargets)
|
ADD_SUBDIRECTORY(osgmultiplerendertargets)
|
||||||
@@ -108,10 +107,10 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgtexture3D)
|
ADD_SUBDIRECTORY(osgtexture3D)
|
||||||
ADD_SUBDIRECTORY(osgtexturerectangle)
|
ADD_SUBDIRECTORY(osgtexturerectangle)
|
||||||
ADD_SUBDIRECTORY(osgthirdpersonview)
|
ADD_SUBDIRECTORY(osgthirdpersonview)
|
||||||
ADD_SUBDIRECTORY(osgunittests)
|
|
||||||
ADD_SUBDIRECTORY(osgvertexprogram)
|
ADD_SUBDIRECTORY(osgvertexprogram)
|
||||||
ADD_SUBDIRECTORY(osgvolume)
|
ADD_SUBDIRECTORY(osgvolume)
|
||||||
ADD_SUBDIRECTORY(osgwindows)
|
ADD_SUBDIRECTORY(osgwindows)
|
||||||
|
ADD_SUBDIRECTORY(osganimationhardware)
|
||||||
ADD_SUBDIRECTORY(osganimationtimeline)
|
ADD_SUBDIRECTORY(osganimationtimeline)
|
||||||
ADD_SUBDIRECTORY(osganimationnode)
|
ADD_SUBDIRECTORY(osganimationnode)
|
||||||
ADD_SUBDIRECTORY(osganimationmakepath)
|
ADD_SUBDIRECTORY(osganimationmakepath)
|
||||||
@@ -135,6 +134,11 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgwidgettable)
|
ADD_SUBDIRECTORY(osgwidgettable)
|
||||||
ADD_SUBDIRECTORY(osgwidgetwindow)
|
ADD_SUBDIRECTORY(osgwidgetwindow)
|
||||||
|
|
||||||
|
IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
|
||||||
|
ADD_SUBDIRECTORY(osgunittests)
|
||||||
|
ADD_SUBDIRECTORY(osgmemorytest)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(osgpdf)
|
ADD_SUBDIRECTORY(osgpdf)
|
||||||
|
|
||||||
IF (BUILD_OSG_WRAPPERS)
|
IF (BUILD_OSG_WRAPPERS)
|
||||||
@@ -161,9 +165,13 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgviewerWX)
|
ADD_SUBDIRECTORY(osgviewerWX)
|
||||||
ENDIF(wxWidgets_FOUND)
|
ENDIF(wxWidgets_FOUND)
|
||||||
|
|
||||||
IF (QT_FOUND AND QT_QTOPENGL_LIBRARY)
|
IF (QT_FOUND)
|
||||||
ADD_SUBDIRECTORY(osgviewerQT)
|
OPTION(BUILD_QT_EXAMPLES "Enable the build of the examples that depend on Qt" ON)
|
||||||
ENDIF(QT_FOUND AND QT_QTOPENGL_LIBRARY)
|
|
||||||
|
IF (BUILD_QT_EXAMPLES AND QT_QTOPENGL_LIBRARY)
|
||||||
|
ADD_SUBDIRECTORY(osgviewerQT)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (FLTK_FOUND)
|
IF (FLTK_FOUND)
|
||||||
ADD_SUBDIRECTORY(osgviewerFLTK)
|
ADD_SUBDIRECTORY(osgviewerFLTK)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout<<"Error: could not found file '"<<filename<<"'"<<std::endl;
|
std::cout<<"Error: could not find file '"<<filename<<"'"<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
3
examples/osganimationhardware/CMakeLists.txt
Normal file
3
examples/osganimationhardware/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SET(TARGET_SRC osganimationhardware.cpp )
|
||||||
|
SET(TARGET_ADDED_LIBRARIES osgAnimation )
|
||||||
|
SETUP_EXAMPLE(osganimationhardware)
|
||||||
264
examples/osganimationhardware/osganimationhardware.cpp
Normal file
264
examples/osganimationhardware/osganimationhardware.cpp
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <osgDB/ReadFile>
|
||||||
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
#include <osgGA/TrackballManipulator>
|
||||||
|
#include <osgGA/FlightManipulator>
|
||||||
|
#include <osgGA/DriveManipulator>
|
||||||
|
#include <osgGA/KeySwitchMatrixManipulator>
|
||||||
|
#include <osgGA/StateSetManipulator>
|
||||||
|
#include <osgGA/AnimationPathManipulator>
|
||||||
|
#include <osgGA/TerrainManipulator>
|
||||||
|
#include <osg/Drawable>
|
||||||
|
#include <osg/MatrixTransform>
|
||||||
|
|
||||||
|
#include <osgAnimation/BasicAnimationManager>
|
||||||
|
#include <osgAnimation/RigGeometry>
|
||||||
|
#include <osgAnimation/RigTransformHardware>
|
||||||
|
#include <osgAnimation/AnimationManagerBase>
|
||||||
|
#include <osgAnimation/BoneMapVisitor>
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
static unsigned int getRandomValueinRange(unsigned int v)
|
||||||
|
{
|
||||||
|
return static_cast<unsigned int>((rand() * 1.0 * v)/(RAND_MAX-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Program> program;
|
||||||
|
// show how to override the default RigTransformHardware for customized usage
|
||||||
|
struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
|
||||||
|
{
|
||||||
|
|
||||||
|
void operator()(osgAnimation::RigGeometry& geom)
|
||||||
|
{
|
||||||
|
if (_needInit)
|
||||||
|
if (!init(geom))
|
||||||
|
return;
|
||||||
|
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), geom.getInvMatrixFromSkeletonToGeometry());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool init(osgAnimation::RigGeometry& geom)
|
||||||
|
{
|
||||||
|
osg::Vec3Array* pos = dynamic_cast<osg::Vec3Array*>(geom.getVertexArray());
|
||||||
|
if (!pos) {
|
||||||
|
osg::notify(osg::WARN) << "RigTransformHardware no vertex array in the geometry " << geom.getName() << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!geom.getSkeleton()) {
|
||||||
|
osg::notify(osg::WARN) << "RigTransformHardware no skeleting set in geometry " << geom.getName() << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
osgAnimation::BoneMapVisitor mapVisitor;
|
||||||
|
geom.getSkeleton()->accept(mapVisitor);
|
||||||
|
osgAnimation::BoneMap bm = mapVisitor.getBoneMap();
|
||||||
|
|
||||||
|
if (!createPalette(pos->size(),bm, geom.getVertexInfluenceSet().getVertexToBoneList()))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int attribIndex = 11;
|
||||||
|
int nbAttribs = getNumVertexAttrib();
|
||||||
|
|
||||||
|
// use a global program for all avatar
|
||||||
|
if (!program.valid()) {
|
||||||
|
program = new osg::Program;
|
||||||
|
program->setName("HardwareSkinning");
|
||||||
|
if (!_shader.valid())
|
||||||
|
_shader = osg::Shader::readShaderFile(osg::Shader::VERTEX,"shaders/skinning.vert");
|
||||||
|
|
||||||
|
if (!_shader.valid()) {
|
||||||
|
osg::notify(osg::WARN) << "RigTransformHardware can't load VertexShader" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// replace max matrix by the value from uniform
|
||||||
|
{
|
||||||
|
std::string str = _shader->getShaderSource();
|
||||||
|
std::string toreplace = std::string("MAX_MATRIX");
|
||||||
|
std::size_t start = str.find(toreplace);
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << getMatrixPaletteUniform()->getNumElements();
|
||||||
|
str.replace(start, toreplace.size(), ss.str());
|
||||||
|
_shader->setShaderSource(str);
|
||||||
|
osg::notify(osg::INFO) << "Shader " << str << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
program->addShader(_shader.get());
|
||||||
|
|
||||||
|
for (int i = 0; i < nbAttribs; i++)
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << "boneWeight" << i;
|
||||||
|
program->addBindAttribLocation(ss.str(), attribIndex + i);
|
||||||
|
|
||||||
|
osg::notify(osg::INFO) << "set vertex attrib " << ss.str() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < nbAttribs; i++)
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << "boneWeight" << i;
|
||||||
|
geom.setVertexAttribData(attribIndex + i, osg::Geometry::ArrayData(getVertexAttrib(i),osg::Geometry::BIND_PER_VERTEX));
|
||||||
|
}
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
|
||||||
|
ss->addUniform(getMatrixPaletteUniform());
|
||||||
|
ss->addUniform(new osg::Uniform("nbBonesPerVertex", getNumBonesPerVertex()));
|
||||||
|
ss->setAttributeAndModes(program.get());
|
||||||
|
geom.setStateSet(ss.get());
|
||||||
|
_needInit = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct SetupRigGeometry : public osg::NodeVisitor
|
||||||
|
{
|
||||||
|
bool _hardware;
|
||||||
|
SetupRigGeometry( bool hardware = true) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _hardware(hardware) {}
|
||||||
|
|
||||||
|
void apply(osg::Geode& geode)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
|
||||||
|
apply(*geode.getDrawable(i));
|
||||||
|
}
|
||||||
|
void apply(osg::Drawable& geom)
|
||||||
|
{
|
||||||
|
if (_hardware) {
|
||||||
|
osgAnimation::RigGeometry* rig = dynamic_cast<osgAnimation::RigGeometry*>(&geom);
|
||||||
|
if (rig)
|
||||||
|
rig->setRigTransformImplementation(new MyRigTransformHardware);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (geom.getName() != std::string("BoundingBox")) // we disable compute of bounding box for all geometry except our bounding box
|
||||||
|
geom.setComputeBoundingBoxCallback(new osg::Drawable::ComputeBoundingBoxCallback);
|
||||||
|
// geom.setInitialBound(new osg::Drawable::ComputeBoundingBoxCallback);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
osg::Group* createCharacterInstance(osg::Group* character, bool hardware)
|
||||||
|
{
|
||||||
|
osg::ref_ptr<osg::Group> c ;
|
||||||
|
if (hardware)
|
||||||
|
c = osg::clone(character, osg::CopyOp::DEEP_COPY_ALL & ~osg::CopyOp::DEEP_COPY_PRIMITIVES & ~osg::CopyOp::DEEP_COPY_ARRAYS);
|
||||||
|
else
|
||||||
|
c = osg::clone(character, osg::CopyOp::DEEP_COPY_ALL);
|
||||||
|
|
||||||
|
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(c->getUpdateCallback());
|
||||||
|
|
||||||
|
osgAnimation::BasicAnimationManager* anim = dynamic_cast<osgAnimation::BasicAnimationManager*>(animationManager);
|
||||||
|
const osgAnimation::AnimationList& list = animationManager->getAnimationList();
|
||||||
|
int v = getRandomValueinRange(list.size());
|
||||||
|
if (list[v]->getName() == std::string("MatIpo_ipo")) {
|
||||||
|
anim->playAnimation(list[v].get());
|
||||||
|
v = (v + 1)%list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
anim->playAnimation(list[v].get());
|
||||||
|
|
||||||
|
SetupRigGeometry switcher(hardware);
|
||||||
|
c->accept(switcher);
|
||||||
|
|
||||||
|
return c.release();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main (int argc, char* argv[])
|
||||||
|
{
|
||||||
|
std::cerr << "This example works better with nathan.osg" << std::endl;
|
||||||
|
|
||||||
|
osg::ArgumentParser psr(&argc, argv);
|
||||||
|
|
||||||
|
osgViewer::Viewer viewer(psr);
|
||||||
|
|
||||||
|
bool hardware = true;
|
||||||
|
int maxChar = 10;
|
||||||
|
while (psr.read("--software")) { hardware = false; }
|
||||||
|
while (psr.read("--number", maxChar)) {}
|
||||||
|
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(osgDB::readNodeFiles(psr));
|
||||||
|
if (!root)
|
||||||
|
{
|
||||||
|
std::cout << psr.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
||||||
|
if(!animationManager)
|
||||||
|
{
|
||||||
|
osg::notify(osg::FATAL) << "no AnimationManagerBase found, updateCallback need to animate elements" << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Group> scene = new osg::Group;
|
||||||
|
|
||||||
|
// add the state manipulator
|
||||||
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
|
|
||||||
|
// add the thread model handler
|
||||||
|
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
||||||
|
|
||||||
|
// add the window size toggle handler
|
||||||
|
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
|
||||||
|
|
||||||
|
// add the stats handler
|
||||||
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
|
|
||||||
|
// add the help handler
|
||||||
|
viewer.addEventHandler(new osgViewer::HelpHandler(psr.getApplicationUsage()));
|
||||||
|
|
||||||
|
// add the LOD Scale handler
|
||||||
|
viewer.addEventHandler(new osgViewer::LODScaleHandler);
|
||||||
|
|
||||||
|
// add the screen capture handler
|
||||||
|
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
||||||
|
|
||||||
|
viewer.setSceneData(scene.get());
|
||||||
|
|
||||||
|
viewer.realize();
|
||||||
|
|
||||||
|
double xChar = maxChar;
|
||||||
|
double yChar = xChar * 9.0/16;
|
||||||
|
for (double i = 0.0; i < xChar; i++) {
|
||||||
|
for (double j = 0.0; j < yChar; j++) {
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Group> c = createCharacterInstance(root.get(), hardware);
|
||||||
|
osg::MatrixTransform* tr = new osg::MatrixTransform;
|
||||||
|
tr->setMatrix(osg::Matrix::translate( 2.0 * (i - xChar * .5),
|
||||||
|
0.0,
|
||||||
|
2.0 * (j - yChar * .5)));
|
||||||
|
tr->addChild(c.get());
|
||||||
|
scene->addChild(tr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::cout << "created " << xChar * yChar << " instance" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
|
return viewer.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -18,14 +18,19 @@
|
|||||||
#include <osg/Geode>
|
#include <osg/Geode>
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgGA/TrackballManipulator>
|
#include <osgGA/TrackballManipulator>
|
||||||
|
#include <osgDB/WriteFile>
|
||||||
#include <osgUtil/SmoothingVisitor>
|
#include <osgUtil/SmoothingVisitor>
|
||||||
#include <osg/io_utils>
|
#include <osg/io_utils>
|
||||||
|
|
||||||
#include <osgAnimation/Bone>
|
#include <osgAnimation/Bone>
|
||||||
#include <osgAnimation/Skeleton>
|
#include <osgAnimation/Skeleton>
|
||||||
#include <osgAnimation/RigGeometry>
|
#include <osgAnimation/RigGeometry>
|
||||||
#include <osgAnimation/Skinning>
|
|
||||||
#include <osgAnimation/BasicAnimationManager>
|
#include <osgAnimation/BasicAnimationManager>
|
||||||
|
#include <osgAnimation/UpdateMatrixTransform>
|
||||||
|
#include <osgAnimation/UpdateBone>
|
||||||
|
#include <osgAnimation/StackedTransform>
|
||||||
|
#include <osgAnimation/StackedTranslateElement>
|
||||||
|
#include <osgAnimation/StackedRotateAxisElement>
|
||||||
|
|
||||||
osg::Geode* createAxis()
|
osg::Geode* createAxis()
|
||||||
{
|
{
|
||||||
@@ -59,8 +64,9 @@ osg::Geode* createAxis()
|
|||||||
|
|
||||||
osgAnimation::RigGeometry* createTesselatedBox(int nsplit, float size)
|
osgAnimation::RigGeometry* createTesselatedBox(int nsplit, float size)
|
||||||
{
|
{
|
||||||
osgAnimation::RigGeometry* geometry = new osgAnimation::RigGeometry;
|
osgAnimation::RigGeometry* riggeometry = new osgAnimation::RigGeometry;
|
||||||
|
|
||||||
|
osg::Geometry* geometry = new osg::Geometry;
|
||||||
osg::ref_ptr<osg::Vec3Array> vertices (new osg::Vec3Array());
|
osg::ref_ptr<osg::Vec3Array> vertices (new osg::Vec3Array());
|
||||||
osg::ref_ptr<osg::Vec3Array> colors (new osg::Vec3Array());
|
osg::ref_ptr<osg::Vec3Array> colors (new osg::Vec3Array());
|
||||||
geometry->setVertexArray (vertices.get());
|
geometry->setVertexArray (vertices.get());
|
||||||
@@ -120,7 +126,8 @@ osgAnimation::RigGeometry* createTesselatedBox(int nsplit, float size)
|
|||||||
|
|
||||||
geometry->addPrimitiveSet(new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, array->size(), &array->front()));
|
geometry->addPrimitiveSet(new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, array->size(), &array->front()));
|
||||||
geometry->setUseDisplayList( false );
|
geometry->setUseDisplayList( false );
|
||||||
return geometry;
|
riggeometry->setSourceGeometry(geometry);
|
||||||
|
return riggeometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -164,22 +171,27 @@ int main (int argc, char* argv[])
|
|||||||
osg::ref_ptr<osgAnimation::Skeleton> skelroot = new osgAnimation::Skeleton;
|
osg::ref_ptr<osgAnimation::Skeleton> skelroot = new osgAnimation::Skeleton;
|
||||||
skelroot->setDefaultUpdateCallback();
|
skelroot->setDefaultUpdateCallback();
|
||||||
osg::ref_ptr<osgAnimation::Bone> root = new osgAnimation::Bone;
|
osg::ref_ptr<osgAnimation::Bone> root = new osgAnimation::Bone;
|
||||||
{
|
root->setInvBindMatrixInSkeletonSpace(osg::Matrix::inverse(osg::Matrix::translate(-1,0,0)));
|
||||||
root->setBindMatrixInBoneSpace(osg::Matrix::identity());
|
root->setName("root");
|
||||||
root->setBindMatrixInBoneSpace(osg::Matrix::translate(-1,0,0));
|
osgAnimation::UpdateBone* pRootUpdate = new osgAnimation::UpdateBone("root");
|
||||||
root->setName("root");
|
pRootUpdate->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("translate",osg::Vec3(-1,0,0)));
|
||||||
root->setDefaultUpdateCallback();
|
root->setUpdateCallback(pRootUpdate);
|
||||||
}
|
|
||||||
|
|
||||||
osg::ref_ptr<osgAnimation::Bone> right0 = new osgAnimation::Bone;
|
osg::ref_ptr<osgAnimation::Bone> right0 = new osgAnimation::Bone;
|
||||||
right0->setBindMatrixInBoneSpace(osg::Matrix::translate(1,0,0));
|
right0->setInvBindMatrixInSkeletonSpace(osg::Matrix::inverse(osg::Matrix::translate(0,0,0)));
|
||||||
right0->setName("right0");
|
right0->setName("right0");
|
||||||
right0->setDefaultUpdateCallback("right0");
|
osgAnimation::UpdateBone* pRight0Update = new osgAnimation::UpdateBone("right0");
|
||||||
|
pRight0Update->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("translate", osg::Vec3(1,0,0)));
|
||||||
|
pRight0Update->getStackedTransforms().push_back(new osgAnimation::StackedRotateAxisElement("rotate", osg::Vec3(0,0,1), 0));
|
||||||
|
right0->setUpdateCallback(pRight0Update);
|
||||||
|
|
||||||
osg::ref_ptr<osgAnimation::Bone> right1 = new osgAnimation::Bone;
|
osg::ref_ptr<osgAnimation::Bone> right1 = new osgAnimation::Bone;
|
||||||
right1->setBindMatrixInBoneSpace(osg::Matrix::translate(1,0,0));
|
right1->setInvBindMatrixInSkeletonSpace(osg::Matrix::inverse(osg::Matrix::translate(1,0,0)));
|
||||||
right1->setName("right1");
|
right1->setName("right1");
|
||||||
right1->setDefaultUpdateCallback("right1");
|
osgAnimation::UpdateBone* pRight1Update = new osgAnimation::UpdateBone("right1");
|
||||||
|
pRight1Update->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("translate", osg::Vec3(1,0,0)));
|
||||||
|
pRight1Update->getStackedTransforms().push_back(new osgAnimation::StackedRotateAxisElement("rotate", osg::Vec3(0,0,1), 0));
|
||||||
|
right1->setUpdateCallback(pRight1Update);
|
||||||
|
|
||||||
root->addChild(right0.get());
|
root->addChild(right0.get());
|
||||||
right0->addChild(right1.get());
|
right0->addChild(right1.get());
|
||||||
@@ -191,33 +203,27 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
osgAnimation::Animation* anim = new osgAnimation::Animation;
|
osgAnimation::Animation* anim = new osgAnimation::Animation;
|
||||||
{
|
{
|
||||||
osgAnimation::QuatKeyframeContainer* keys0 = new osgAnimation::QuatKeyframeContainer;
|
osgAnimation::FloatKeyframeContainer* keys0 = new osgAnimation::FloatKeyframeContainer;
|
||||||
osg::Quat rotate;
|
keys0->push_back(osgAnimation::FloatKeyframe(0,0));
|
||||||
rotate.makeRotate(osg::PI_2, osg::Vec3(0,0,1));
|
keys0->push_back(osgAnimation::FloatKeyframe(3,osg::PI_2));
|
||||||
keys0->push_back(osgAnimation::QuatKeyframe(0,osg::Quat(0,0,0,1)));
|
keys0->push_back(osgAnimation::FloatKeyframe(6,osg::PI_2));
|
||||||
keys0->push_back(osgAnimation::QuatKeyframe(3,rotate));
|
osgAnimation::FloatLinearSampler* sampler = new osgAnimation::FloatLinearSampler;
|
||||||
keys0->push_back(osgAnimation::QuatKeyframe(6,rotate));
|
|
||||||
osgAnimation::QuatSphericalLinearSampler* sampler = new osgAnimation::QuatSphericalLinearSampler;
|
|
||||||
sampler->setKeyframeContainer(keys0);
|
sampler->setKeyframeContainer(keys0);
|
||||||
// osgAnimation::AnimationUpdateCallback* cb = dynamic_cast<osgAnimation::AnimationUpdateCallback*>(right0->getUpdateCallback());
|
osgAnimation::FloatLinearChannel* channel = new osgAnimation::FloatLinearChannel(sampler);
|
||||||
osgAnimation::QuatSphericalLinearChannel* channel = new osgAnimation::QuatSphericalLinearChannel(sampler);
|
channel->setName("rotate");
|
||||||
channel->setName("quaternion");
|
|
||||||
channel->setTargetName("right0");
|
channel->setTargetName("right0");
|
||||||
anim->addChannel(channel);
|
anim->addChannel(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
osgAnimation::QuatKeyframeContainer* keys1 = new osgAnimation::QuatKeyframeContainer;
|
osgAnimation::FloatKeyframeContainer* keys1 = new osgAnimation::FloatKeyframeContainer;
|
||||||
osg::Quat rotate;
|
keys1->push_back(osgAnimation::FloatKeyframe(0,0));
|
||||||
rotate.makeRotate(osg::PI_2, osg::Vec3(0,0,1));
|
keys1->push_back(osgAnimation::FloatKeyframe(3,0));
|
||||||
keys1->push_back(osgAnimation::QuatKeyframe(0,osg::Quat(0,0,0,1)));
|
keys1->push_back(osgAnimation::FloatKeyframe(6,osg::PI_2));
|
||||||
keys1->push_back(osgAnimation::QuatKeyframe(3,osg::Quat(0,0,0,1)));
|
osgAnimation::FloatLinearSampler* sampler = new osgAnimation::FloatLinearSampler;
|
||||||
keys1->push_back(osgAnimation::QuatKeyframe(6,rotate));
|
|
||||||
osgAnimation::QuatSphericalLinearSampler* sampler = new osgAnimation::QuatSphericalLinearSampler;
|
|
||||||
sampler->setKeyframeContainer(keys1);
|
sampler->setKeyframeContainer(keys1);
|
||||||
osgAnimation::QuatSphericalLinearChannel* channel = new osgAnimation::QuatSphericalLinearChannel(sampler);
|
osgAnimation::FloatLinearChannel* channel = new osgAnimation::FloatLinearChannel(sampler);
|
||||||
//osgAnimation::AnimationUpdateCallback* cb = dynamic_cast<osgAnimation::AnimationUpdateCallback*>(right1->getUpdateCallback());
|
channel->setName("rotate");
|
||||||
channel->setName("quaternion");
|
|
||||||
channel->setTargetName("right1");
|
channel->setTargetName("right1");
|
||||||
anim->addChannel(channel);
|
anim->addChannel(channel);
|
||||||
}
|
}
|
||||||
@@ -246,15 +252,12 @@ int main (int argc, char* argv[])
|
|||||||
osg::Geode* geode = new osg::Geode;
|
osg::Geode* geode = new osg::Geode;
|
||||||
geode->addDrawable(geom);
|
geode->addDrawable(geom);
|
||||||
skelroot->addChild(geode);
|
skelroot->addChild(geode);
|
||||||
osg::ref_ptr<osg::Vec3Array> src = dynamic_cast<osg::Vec3Array*>(geom->getVertexArray());
|
osg::ref_ptr<osg::Vec3Array> src = dynamic_cast<osg::Vec3Array*>(geom->getSourceGeometry()->getVertexArray());
|
||||||
geom->getOrCreateStateSet()->setMode(GL_LIGHTING, false);
|
geom->getOrCreateStateSet()->setMode(GL_LIGHTING, false);
|
||||||
geom->setDataVariance(osg::Object::DYNAMIC);
|
geom->setDataVariance(osg::Object::DYNAMIC);
|
||||||
|
|
||||||
initVertexMap(root.get(), right0.get(), right1.get(), geom, src.get());
|
initVertexMap(root.get(), right0.get(), right1.get(), geom, src.get());
|
||||||
|
|
||||||
geom->buildVertexSet();
|
|
||||||
geom->buildTransformer(skelroot.get());
|
|
||||||
|
|
||||||
// let's run !
|
// let's run !
|
||||||
viewer.setSceneData( scene );
|
viewer.setSceneData( scene );
|
||||||
viewer.realize();
|
viewer.realize();
|
||||||
@@ -264,6 +267,7 @@ int main (int argc, char* argv[])
|
|||||||
viewer.frame();
|
viewer.frame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osgDB::writeNodeFile(*scene, "skinning.osg");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
#include <osgAnimation/BasicAnimationManager>
|
#include <osgAnimation/BasicAnimationManager>
|
||||||
#include <osgAnimation/Channel>
|
#include <osgAnimation/Channel>
|
||||||
#include <osgAnimation/UpdateCallback>
|
#include <osgAnimation/UpdateMatrixTransform>
|
||||||
|
#include <osgAnimation/StackedTranslateElement>
|
||||||
|
|
||||||
using namespace osgAnimation;
|
using namespace osgAnimation;
|
||||||
|
|
||||||
@@ -74,7 +75,9 @@ int main (int argc, char* argv[])
|
|||||||
osg::ref_ptr<osg::MatrixTransform> trans = new osg::MatrixTransform();
|
osg::ref_ptr<osg::MatrixTransform> trans = new osg::MatrixTransform();
|
||||||
trans->setName("AnimatedNode");
|
trans->setName("AnimatedNode");
|
||||||
trans->setDataVariance(osg::Object::DYNAMIC);
|
trans->setDataVariance(osg::Object::DYNAMIC);
|
||||||
trans->setUpdateCallback(new osgAnimation::UpdateTransform("AnimatedCallback"));
|
osgAnimation::UpdateMatrixTransform* updatecb = new osgAnimation::UpdateMatrixTransform("AnimatedCallback");
|
||||||
|
updatecb->getStackedTransforms().push_back(new osgAnimation::StackedTranslateElement("position"));
|
||||||
|
trans->setUpdateCallback(updatecb);
|
||||||
trans->setMatrix(osg::Matrix::identity());
|
trans->setMatrix(osg::Matrix::identity());
|
||||||
trans->addChild (geode.get());
|
trans->addChild (geode.get());
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -26,15 +26,19 @@
|
|||||||
#include <osgAnimation/Bone>
|
#include <osgAnimation/Bone>
|
||||||
#include <osgAnimation/Skeleton>
|
#include <osgAnimation/Skeleton>
|
||||||
#include <osgAnimation/RigGeometry>
|
#include <osgAnimation/RigGeometry>
|
||||||
#include <osgAnimation/Skinning>
|
|
||||||
#include <osgAnimation/Timeline>
|
#include <osgAnimation/Timeline>
|
||||||
#include <osgAnimation/AnimationManagerBase>
|
#include <osgAnimation/AnimationManagerBase>
|
||||||
#include <osgAnimation/TimelineAnimationManager>
|
#include <osgAnimation/TimelineAnimationManager>
|
||||||
|
|
||||||
|
#include <osgAnimation/ActionStripAnimation>
|
||||||
|
#include <osgAnimation/ActionBlendIn>
|
||||||
|
#include <osgAnimation/ActionBlendOut>
|
||||||
|
#include <osgAnimation/ActionAnimation>
|
||||||
|
|
||||||
|
|
||||||
struct NoseBegin : public osgAnimation::Action::Callback
|
struct NoseBegin : public osgAnimation::Action::Callback
|
||||||
{
|
{
|
||||||
virtual void operator()(osgAnimation::Action* action)
|
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* nv)
|
||||||
{
|
{
|
||||||
std::cout << "sacrebleu, it scratches my nose, let me scratch it" << std::endl;
|
std::cout << "sacrebleu, it scratches my nose, let me scratch it" << std::endl;
|
||||||
std::cout << "process NoseBegin call back " << action->getName() << std::endl << std::endl;
|
std::cout << "process NoseBegin call back " << action->getName() << std::endl << std::endl;
|
||||||
@@ -43,7 +47,7 @@ struct NoseBegin : public osgAnimation::Action::Callback
|
|||||||
|
|
||||||
struct NoseEnd : public osgAnimation::Action::Callback
|
struct NoseEnd : public osgAnimation::Action::Callback
|
||||||
{
|
{
|
||||||
virtual void operator()(osgAnimation::Action* action)
|
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* nv)
|
||||||
{
|
{
|
||||||
std::cout << "shhhrt shrrrrt shhhhhhrrrrt, haaa it's better"<< std::endl;
|
std::cout << "shhhrt shrrrrt shhhhhhrrrrt, haaa it's better"<< std::endl;
|
||||||
std::cout << "process NoseEnd call back " << action->getName() << std::endl << std::endl;
|
std::cout << "process NoseEnd call back " << action->getName() << std::endl << std::endl;
|
||||||
@@ -52,9 +56,9 @@ struct NoseEnd : public osgAnimation::Action::Callback
|
|||||||
|
|
||||||
struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osgAnimation::StripAnimation> _mainLoop;
|
osg::ref_ptr<osgAnimation::ActionStripAnimation> _mainLoop;
|
||||||
osg::ref_ptr<osgAnimation::StripAnimation> _scratchHead;
|
osg::ref_ptr<osgAnimation::ActionStripAnimation> _scratchHead;
|
||||||
osg::ref_ptr<osgAnimation::StripAnimation> _scratchNose;
|
osg::ref_ptr<osgAnimation::ActionStripAnimation> _scratchNose;
|
||||||
osg::ref_ptr<osgAnimation::TimelineAnimationManager> _manager;
|
osg::ref_ptr<osgAnimation::TimelineAnimationManager> _manager;
|
||||||
|
|
||||||
bool _releaseKey;
|
bool _releaseKey;
|
||||||
@@ -69,14 +73,14 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
|||||||
for (osgAnimation::AnimationList::const_iterator it = list.begin(); it != list.end(); it++)
|
for (osgAnimation::AnimationList::const_iterator it = list.begin(); it != list.end(); it++)
|
||||||
map[(*it)->getName()] = *it;
|
map[(*it)->getName()] = *it;
|
||||||
|
|
||||||
_mainLoop = new osgAnimation::StripAnimation(map["Idle_Main"].get(),0.0,0.0);
|
_mainLoop = new osgAnimation::ActionStripAnimation(map["Idle_Main"].get(),0.0,0.0);
|
||||||
_mainLoop->setLoop(0); // means forever
|
_mainLoop->setLoop(0); // means forever
|
||||||
|
|
||||||
_scratchHead = new osgAnimation::StripAnimation(map["Idle_Head_Scratch.02"].get(),0.2,0.3);
|
_scratchHead = new osgAnimation::ActionStripAnimation(map["Idle_Head_Scratch.02"].get(),0.2,0.3);
|
||||||
_scratchHead->setLoop(1); // one time
|
_scratchHead->setLoop(1); // one time
|
||||||
|
|
||||||
map["Idle_Nose_Scratch.01"]->setDuration(10.0); // set this animation duration to 10 seconds
|
map["Idle_Nose_Scratch.01"]->setDuration(10.0); // set this animation duration to 10 seconds
|
||||||
_scratchNose = new osgAnimation::StripAnimation(map["Idle_Nose_Scratch.01"].get(),0.2,0.3);
|
_scratchNose = new osgAnimation::ActionStripAnimation(map["Idle_Nose_Scratch.01"].get(),0.2,0.3);
|
||||||
_scratchNose->setLoop(1); // one time
|
_scratchNose->setLoop(1); // one time
|
||||||
|
|
||||||
// add the main loop at priority 0 at time 0.
|
// add the main loop at priority 0 at time 0.
|
||||||
@@ -157,22 +161,26 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
|||||||
|
|
||||||
int main (int argc, char* argv[])
|
int main (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
std::cerr << "This example workd only with osgAnimation/nathan.osg" << std::endl;
|
std::cerr << "This example works only with nathan.osg" << std::endl;
|
||||||
|
|
||||||
osg::ArgumentParser psr(&argc, argv);
|
osg::ArgumentParser psr(&argc, argv);
|
||||||
|
|
||||||
osgViewer::Viewer viewer(psr);
|
osgViewer::Viewer viewer(psr);
|
||||||
|
|
||||||
std::string file = "osgAnimation/nathan.osg";
|
std::string file = "nathan.osg";
|
||||||
if(argc >= 2)
|
if(argc >= 2)
|
||||||
file = psr[1];
|
file = psr[1];
|
||||||
|
|
||||||
// replace the manager
|
// replace the manager
|
||||||
osg::Group* root = dynamic_cast<osg::Group*>(osgDB::readNodeFile(file));
|
osg::Group* root = dynamic_cast<osg::Group*>(osgDB::readNodeFile(file));
|
||||||
|
if (!root) {
|
||||||
|
osg::notify(osg::FATAL) << "can't read file " << file << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
||||||
if(!animationManager)
|
if(!animationManager)
|
||||||
{
|
{
|
||||||
std::cerr << "Did not found AnimationManagerBase updateCallback needed to animate elements" << std::endl;
|
osg::notify(osg::FATAL) << "Did not find AnimationManagerBase updateCallback needed to animate elements" << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ void AnimtkKeyEventHandler::printUsage() const
|
|||||||
std::cout << (char) _actionKeys.find(Help)->second << " for Help" << std::endl;
|
std::cout << (char) _actionKeys.find(Help)->second << " for Help" << std::endl;
|
||||||
std::cout << (char) _actionKeys.find(List)->second << " for List" << std::endl;
|
std::cout << (char) _actionKeys.find(List)->second << " for List" << std::endl;
|
||||||
std::cout << (char) _actionKeys.find(Play)->second << " for Play" << std::endl;
|
std::cout << (char) _actionKeys.find(Play)->second << " for Play" << std::endl;
|
||||||
std::cout << (char) _actionKeys.find(Next)->second << " for selext Next item" << std::endl;
|
std::cout << (char) _actionKeys.find(Next)->second << " for select Next item" << std::endl;
|
||||||
std::cout << (char) _actionKeys.find(Prev)->second << " for selext Previous item" << std::endl;
|
std::cout << (char) _actionKeys.find(Prev)->second << " for select Previous item" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#if defined(__linux)
|
#if defined(__linux)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#elif defined(__sgi)
|
#elif defined(__sgi)
|
||||||
@@ -164,7 +164,7 @@ void Broadcaster::setHost( const char *hostname )
|
|||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
if( (h = gethostbyname( hostname )) == 0L )
|
if( (h = gethostbyname( hostname )) == 0L )
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Broadcaster::setHost() - Cannot resolv an address for \"%s\".\n", hostname );
|
fprintf( stderr, "Broadcaster::setHost() - Cannot resolve an address for \"%s\".\n", hostname );
|
||||||
_address = 0;
|
_address = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ void CameraPacket::readEventQueue(osgViewer::Viewer& viewer)
|
|||||||
|
|
||||||
void CameraPacket::writeEventQueue(osgViewer::Viewer& viewer)
|
void CameraPacket::writeEventQueue(osgViewer::Viewer& viewer)
|
||||||
{
|
{
|
||||||
osg::notify(osg::INFO)<<"recieved events = "<<_events.size()<<std::endl;
|
osg::notify(osg::INFO)<<"received events = "<<_events.size()<<std::endl;
|
||||||
|
|
||||||
viewer.getEventQueue()->appendEvents(_events);
|
viewer.getEventQueue()->appendEvents(_events);
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ int main( int argc, char **argv )
|
|||||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
|
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets.");
|
arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-s","Set viewer to SLAVE mode, reciving view via packets.");
|
arguments.getApplicationUsage()->addCommandLineOption("-s","Set viewer to SLAVE mode, receiving view via packets.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-n <int>","Socket number to transmit packets");
|
arguments.getApplicationUsage()->addCommandLineOption("-n <int>","Socket number to transmit packets");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-f <float>","Field of view of camera");
|
arguments.getApplicationUsage()->addCommandLineOption("-f <float>","Field of view of camera");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-o <float>","Offset angle of camera");
|
arguments.getApplicationUsage()->addCommandLineOption("-o <float>","Offset angle of camera");
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include <osgUtil/Optimizer>
|
#include <osgUtil/Optimizer>
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
|
|
||||||
@@ -134,14 +136,15 @@ int main( int argc, char **argv )
|
|||||||
// read the scene from the list of file specified commandline args.
|
// read the scene from the list of file specified commandline args.
|
||||||
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
|
||||||
|
|
||||||
if (!scene) return 1;
|
if (!scene)
|
||||||
|
{
|
||||||
|
std::cout << argv[0] << ": requires filename argument." << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// construct the viewer.
|
// construct the viewer.
|
||||||
osgViewer::CompositeViewer viewer(arguments);
|
osgViewer::CompositeViewer viewer(arguments);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (arguments.read("-1"))
|
if (arguments.read("-1"))
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -300,3 +303,4 @@ int main( int argc, char **argv )
|
|||||||
// run the viewer's main frame loop
|
// run the viewer's main frame loop
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ int main(int argc, char** argv)
|
|||||||
// Make sure we have the minimum args...
|
// Make sure we have the minimum args...
|
||||||
if(argc <= 2)
|
if(argc <= 2)
|
||||||
{
|
{
|
||||||
osg::notify(osg::FATAL) << "usage: " << args[0] << " FONTFILE [sizes...]" << std::endl;
|
osg::notify(osg::FATAL) << "usage: " << args[0] << " fontfile size1 [size2 ...]" << std::endl;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -138,3 +138,4 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ int main( int argc, char **argv )
|
|||||||
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Please specify and geo model filename on the command line."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Please specify a geo model filename on the command line."<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ class Xample
|
|||||||
{
|
{
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
Xample() {}
|
||||||
}; // end class Xample
|
}; // end class Xample
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -351,7 +351,6 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// set up the usage document, in case we need to print out how to use this program.
|
// set up the usage document, in case we need to print out how to use this program.
|
||||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
|
|
||||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
|
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
|
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class ContextTest : public MemoryTest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr<<"Error: Unable to create graphis context, problem with running osgViewer-"<<osgViewerGetVersion()<<", cannot create windows/pbuffers."<<std::endl;
|
std::cerr<<"Error: Unable to create graphics context, problem with running osgViewer-"<<osgViewerGetVersion()<<", cannot create windows/pbuffers."<<std::endl;
|
||||||
|
|
||||||
if (_pbuffer) throw "Failed to create PixelBuffer";
|
if (_pbuffer) throw "Failed to create PixelBuffer";
|
||||||
else throw "Failed to create GraphicsWindow";
|
else throw "Failed to create GraphicsWindow";
|
||||||
@@ -406,7 +406,7 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
if (glMemoryTests.empty())
|
if (glMemoryTests.empty())
|
||||||
{
|
{
|
||||||
std::cout<<"Not tests specified, please specify test using the command line options below."<<std::endl<<std::endl;
|
std::cout<<"No tests specified, please specify test using the command line options below."<<std::endl<<std::endl;
|
||||||
|
|
||||||
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
#this file is automatically generated
|
# INCLUDE_DIRECTORIES( ${OPENAL_INCLUDE_DIR} )
|
||||||
|
# SET(TARGET_EXTERNAL_LIBRARIES ${OPENAL_LIBRARY} alut)
|
||||||
|
|
||||||
|
IF (SDL_FOUND)
|
||||||
|
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
||||||
|
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
|
||||||
|
ADD_DEFINITIONS(-DUSE_SDL)
|
||||||
|
IF (MINGW)
|
||||||
|
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF(SDL_FOUND)
|
||||||
|
|
||||||
SET(TARGET_SRC osgmovie.cpp )
|
SET(TARGET_SRC osgmovie.cpp )
|
||||||
SET(TARGET_ADDED_LIBRARIES osgGA )
|
SET(TARGET_ADDED_LIBRARIES osgGA )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
SETUP_EXAMPLE(osgmovie)
|
SETUP_EXAMPLE(osgmovie)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class MovieEventHandler : public osgGA::GUIEventHandler
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
MovieEventHandler():_trackMouse(false) {}
|
||||||
|
|
||||||
void setMouseTracking(bool track) { _trackMouse = track; }
|
void setMouseTracking(bool track) { _trackMouse = track; }
|
||||||
bool getMouseTracking() const { return _trackMouse; }
|
bool getMouseTracking() const { return _trackMouse; }
|
||||||
@@ -116,9 +116,9 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool _playToggle;
|
|
||||||
bool _trackMouse;
|
bool _trackMouse;
|
||||||
ImageStreamList _imageStreamList;
|
ImageStreamList _imageStreamList;
|
||||||
|
unsigned int _seekIncr;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -211,17 +211,16 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
itr!=_imageStreamList.end();
|
itr!=_imageStreamList.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
_playToggle = !_playToggle;
|
osg::ImageStream::StreamStatus playToggle = (*itr)->getStatus();
|
||||||
if ( _playToggle )
|
if (playToggle != osg::ImageStream::PLAYING)
|
||||||
{
|
{
|
||||||
// playing, so pause
|
std::cout<< (*itr).get() << " Play"<<std::endl;
|
||||||
std::cout<<"Play"<<std::endl;
|
|
||||||
(*itr)->play();
|
(*itr)->play();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// playing, so pause
|
// playing, so pause
|
||||||
std::cout<<"Pause"<<std::endl;
|
std::cout<< (*itr).get() << " Pause"<<std::endl;
|
||||||
(*itr)->pause();
|
(*itr)->pause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,12 +232,29 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
itr!=_imageStreamList.end();
|
itr!=_imageStreamList.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
std::cout<<"Restart"<<std::endl;
|
std::cout<< (*itr).get() << " Restart"<<std::endl;
|
||||||
(*itr)->rewind();
|
(*itr)->rewind();
|
||||||
(*itr)->play();
|
(*itr)->play();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (ea.getKey()=='>')
|
||||||
|
{
|
||||||
|
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
||||||
|
itr!=_imageStreamList.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
std::cout<<"Seeking"<<std::endl;
|
||||||
|
if(_seekIncr > 3) _seekIncr = 0;
|
||||||
|
double length = (*itr)->getLength();
|
||||||
|
double t_pos = (length/4.0f)*_seekIncr;
|
||||||
|
//(*itr)->rewind();
|
||||||
|
(*itr)->seek(t_pos);
|
||||||
|
(*itr)->play();
|
||||||
|
_seekIncr++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else if (ea.getKey()=='L')
|
else if (ea.getKey()=='L')
|
||||||
{
|
{
|
||||||
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
||||||
@@ -247,17 +263,53 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
{
|
{
|
||||||
if ( (*itr)->getLoopingMode() == osg::ImageStream::LOOPING)
|
if ( (*itr)->getLoopingMode() == osg::ImageStream::LOOPING)
|
||||||
{
|
{
|
||||||
std::cout<<"Toggle Looping Off"<<std::endl;
|
std::cout<< (*itr).get() << " Toggle Looping Off"<<std::endl;
|
||||||
(*itr)->setLoopingMode( osg::ImageStream::NO_LOOPING );
|
(*itr)->setLoopingMode( osg::ImageStream::NO_LOOPING );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout<<"Toggle Looping On"<<std::endl;
|
std::cout<< (*itr).get() << " Toggle Looping On"<<std::endl;
|
||||||
(*itr)->setLoopingMode( osg::ImageStream::LOOPING );
|
(*itr)->setLoopingMode( osg::ImageStream::LOOPING );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (ea.getKey()=='+')
|
||||||
|
{
|
||||||
|
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
||||||
|
itr!=_imageStreamList.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
double tm = (*itr)->getTimeMultiplier();
|
||||||
|
tm += 0.1;
|
||||||
|
(*itr)->setTimeMultiplier(tm);
|
||||||
|
std::cout << (*itr).get() << " Increase speed rate "<< (*itr)->getTimeMultiplier() << std::endl;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (ea.getKey()=='-')
|
||||||
|
{
|
||||||
|
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
||||||
|
itr!=_imageStreamList.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
double tm = (*itr)->getTimeMultiplier();
|
||||||
|
tm -= 0.1;
|
||||||
|
(*itr)->setTimeMultiplier(tm);
|
||||||
|
std::cout << (*itr).get() << " Decrease speed rate "<< (*itr)->getTimeMultiplier() << std::endl;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (ea.getKey()=='o')
|
||||||
|
{
|
||||||
|
for(ImageStreamList::iterator itr=_imageStreamList.begin();
|
||||||
|
itr!=_imageStreamList.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
std::cout<< (*itr).get() << " Frame rate "<< (*itr)->getFrameRate() <<std::endl;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,6 +324,10 @@ void MovieEventHandler::getUsage(osg::ApplicationUsage& usage) const
|
|||||||
usage.addKeyboardMouseBinding("p","Play/Pause movie");
|
usage.addKeyboardMouseBinding("p","Play/Pause movie");
|
||||||
usage.addKeyboardMouseBinding("r","Restart movie");
|
usage.addKeyboardMouseBinding("r","Restart movie");
|
||||||
usage.addKeyboardMouseBinding("l","Toggle looping of movie");
|
usage.addKeyboardMouseBinding("l","Toggle looping of movie");
|
||||||
|
usage.addKeyboardMouseBinding("+","Increase speed of movie");
|
||||||
|
usage.addKeyboardMouseBinding("-","Decrease speed of movie");
|
||||||
|
usage.addKeyboardMouseBinding("o","Display frame rate of movie");
|
||||||
|
usage.addKeyboardMouseBinding(">","Advance the movie using seek");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -320,6 +376,33 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_SDL
|
||||||
|
|
||||||
|
class SDLAudioSink : public osg::AudioSink
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
SDLAudioSink(osg::AudioStream* audioStream):
|
||||||
|
_started(false),
|
||||||
|
_paused(false),
|
||||||
|
_audioStream(audioStream) {}
|
||||||
|
|
||||||
|
~SDLAudioSink();
|
||||||
|
|
||||||
|
virtual void play();
|
||||||
|
virtual void pause();
|
||||||
|
virtual void stop();
|
||||||
|
|
||||||
|
virtual bool playing() const { return _started && !_paused; }
|
||||||
|
|
||||||
|
|
||||||
|
bool _started;
|
||||||
|
bool _paused;
|
||||||
|
osg::observer_ptr<osg::AudioStream> _audioStream;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
@@ -334,7 +417,9 @@ int main(int argc, char** argv)
|
|||||||
arguments.getApplicationUsage()->addCommandLineOption("--shader","Use shaders to post process the video.");
|
arguments.getApplicationUsage()->addCommandLineOption("--shader","Use shaders to post process the video.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--interactive","Use camera manipulator to allow movement around movie.");
|
arguments.getApplicationUsage()->addCommandLineOption("--interactive","Use camera manipulator to allow movement around movie.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--flip","Flip the movie so top becomes bottom.");
|
arguments.getApplicationUsage()->addCommandLineOption("--flip","Flip the movie so top becomes bottom.");
|
||||||
|
#if defined(WIN32) || defined(__APPLE__)
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit.");
|
arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit.");
|
||||||
|
#endif
|
||||||
|
|
||||||
bool useTextureRectangle = true;
|
bool useTextureRectangle = true;
|
||||||
bool useShader = false;
|
bool useShader = false;
|
||||||
@@ -348,6 +433,7 @@ int main(int argc, char** argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(WIN32) || defined(__APPLE__)
|
||||||
// if user requests devices video capability.
|
// if user requests devices video capability.
|
||||||
if (arguments.read("-devices") || arguments.read("--devices"))
|
if (arguments.read("-devices") || arguments.read("--devices"))
|
||||||
{
|
{
|
||||||
@@ -355,6 +441,7 @@ int main(int argc, char** argv)
|
|||||||
osgDB::readImageFile("devices.live");
|
osgDB::readImageFile("devices.live");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
while (arguments.read("--texture2D")) useTextureRectangle=false;
|
while (arguments.read("--texture2D")) useTextureRectangle=false;
|
||||||
while (arguments.read("--shader")) useShader=true;
|
while (arguments.read("--shader")) useShader=true;
|
||||||
@@ -422,24 +509,63 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
bool xyPlane = fullscreen;
|
bool xyPlane = fullscreen;
|
||||||
|
|
||||||
|
bool useAudioSink = false;
|
||||||
|
while(arguments.read("--audio")) { useAudioSink = true; }
|
||||||
|
|
||||||
|
#if USE_SDL
|
||||||
|
unsigned int numAudioStreamsEnabled = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
for(int i=1;i<arguments.argc();++i)
|
for(int i=1;i<arguments.argc();++i)
|
||||||
{
|
{
|
||||||
if (arguments.isString(i))
|
if (arguments.isString(i))
|
||||||
{
|
{
|
||||||
osg::Image* image = osgDB::readImageFile(arguments[i]);
|
osg::Image* image = osgDB::readImageFile(arguments[i]);
|
||||||
osg::ImageStream* imagestream = dynamic_cast<osg::ImageStream*>(image);
|
osg::ImageStream* imagestream = dynamic_cast<osg::ImageStream*>(image);
|
||||||
if (imagestream) imagestream->play();
|
if (imagestream)
|
||||||
|
{
|
||||||
|
osg::ImageStream::AudioStreams& audioStreams = imagestream->getAudioStreams();
|
||||||
|
if (useAudioSink && !audioStreams.empty())
|
||||||
|
{
|
||||||
|
osg::AudioStream* audioStream = audioStreams[0].get();
|
||||||
|
osg::notify(osg::NOTICE)<<"AudioStream read ["<<audioStream->getName()<<"]"<<std::endl;
|
||||||
|
#if USE_SDL
|
||||||
|
if (numAudioStreamsEnabled==0)
|
||||||
|
{
|
||||||
|
audioStream->setAudioSink(new SDLAudioSink(audioStream));
|
||||||
|
|
||||||
|
++numAudioStreamsEnabled;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
imagestream->play();
|
||||||
|
}
|
||||||
|
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"image->s()"<<image->s()<<" image-t()="<<image->t()<<std::endl;
|
osg::notify(osg::NOTICE)<<"image->s()"<<image->s()<<" image-t()="<<image->t()<<" aspectRatio="<<image->getPixelAspectRatio()<<std::endl;
|
||||||
|
|
||||||
geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane, flip));
|
float width = image->s() * image->getPixelAspectRatio();
|
||||||
|
float height = image->t();
|
||||||
|
|
||||||
bottomright = pos + osg::Vec3(static_cast<float>(image->s()),static_cast<float>(image->t()),0.0f);
|
osg::ref_ptr<osg::Drawable> drawable = myCreateTexturedQuadGeometry(pos, width, height,image, useTextureRectangle, xyPlane, flip);
|
||||||
|
|
||||||
if (xyPlane) pos.y() += image->t()*1.05f;
|
if (image->isImageTranslucent())
|
||||||
else pos.z() += image->t()*1.05f;
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<"Transparent movie, enabling blending."<<std::endl;
|
||||||
|
|
||||||
|
drawable->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON);
|
||||||
|
drawable->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
geode->addDrawable(drawable.get());
|
||||||
|
|
||||||
|
bottomright = pos + osg::Vec3(width,height,0.0f);
|
||||||
|
|
||||||
|
if (xyPlane) pos.y() += height*1.05f;
|
||||||
|
else pos.z() += height*1.05f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -481,7 +607,43 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
viewer.realize();
|
viewer.realize();
|
||||||
|
|
||||||
|
viewer.getCamera()->setClearColor(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
|
||||||
|
|
||||||
|
float screenAspectRatio = 1280.0f/1024.0f;
|
||||||
|
|
||||||
|
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
||||||
|
if (wsi)
|
||||||
|
{
|
||||||
|
unsigned int width, height;
|
||||||
|
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
||||||
|
|
||||||
|
screenAspectRatio = float(width) / float(height);
|
||||||
|
}
|
||||||
|
|
||||||
|
float modelAspectRatio = (bottomright.x()-topleft.x())/(bottomright.y()-topleft.y());
|
||||||
|
|
||||||
viewer.getCamera()->setViewMatrix(osg::Matrix::identity());
|
viewer.getCamera()->setViewMatrix(osg::Matrix::identity());
|
||||||
|
|
||||||
|
|
||||||
|
osg::Vec3 center = (bottomright + topleft)*0.5f;
|
||||||
|
osg::Vec3 dx(bottomright.x()-center.x(), 0.0f, 0.0f);
|
||||||
|
osg::Vec3 dy(0.0f, topleft.y()-center.y(), 0.0f);
|
||||||
|
|
||||||
|
float ratio = modelAspectRatio/screenAspectRatio;
|
||||||
|
|
||||||
|
if (ratio>1.0f)
|
||||||
|
{
|
||||||
|
// use model width as the control on model size.
|
||||||
|
bottomright = center + dx - dy * ratio;
|
||||||
|
topleft = center - dx + dy * ratio;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// use model height as the control on model size.
|
||||||
|
bottomright = center + dx / ratio - dy;
|
||||||
|
topleft = center - dx / ratio + dy;
|
||||||
|
}
|
||||||
|
|
||||||
viewer.getCamera()->setProjectionMatrixAsOrtho2D(topleft.x(),bottomright.x(),topleft.y(),bottomright.y());
|
viewer.getCamera()->setProjectionMatrixAsOrtho2D(topleft.x(),bottomright.x(),topleft.y(),bottomright.y());
|
||||||
|
|
||||||
while(!viewer.done())
|
while(!viewer.done())
|
||||||
@@ -496,3 +658,84 @@ int main(int argc, char** argv)
|
|||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_SDL
|
||||||
|
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
static void soundReadCallback(void * user_data, uint8_t * data, int datalen)
|
||||||
|
{
|
||||||
|
SDLAudioSink * sink = reinterpret_cast<SDLAudioSink*>(user_data);
|
||||||
|
osg::ref_ptr<osg::AudioStream> as = sink->_audioStream.get();
|
||||||
|
if (as.valid())
|
||||||
|
{
|
||||||
|
as->consumeAudioBuffer(data, datalen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDLAudioSink::~SDLAudioSink()
|
||||||
|
{
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLAudioSink::play()
|
||||||
|
{
|
||||||
|
if (_started)
|
||||||
|
{
|
||||||
|
if (_paused)
|
||||||
|
{
|
||||||
|
SDL_PauseAudio(0);
|
||||||
|
_paused = false;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_started = true;
|
||||||
|
_paused = false;
|
||||||
|
|
||||||
|
osg::notify(osg::NOTICE)<<"SDLAudioSink()::startPlaying()"<<std::endl;
|
||||||
|
|
||||||
|
osg::notify(osg::NOTICE)<<" audioFrequency()="<<_audioStream->audioFrequency()<<std::endl;
|
||||||
|
osg::notify(osg::NOTICE)<<" audioNbChannels()="<<_audioStream->audioNbChannels()<<std::endl;
|
||||||
|
osg::notify(osg::NOTICE)<<" audioSampleFormat()="<<_audioStream->audioSampleFormat()<<std::endl;
|
||||||
|
|
||||||
|
SDL_AudioSpec specs = { 0 };
|
||||||
|
SDL_AudioSpec wanted_specs = { 0 };
|
||||||
|
|
||||||
|
wanted_specs.freq = _audioStream->audioFrequency();
|
||||||
|
wanted_specs.format = AUDIO_S16SYS;
|
||||||
|
wanted_specs.channels = _audioStream->audioNbChannels();
|
||||||
|
wanted_specs.silence = 0;
|
||||||
|
wanted_specs.samples = 1024;
|
||||||
|
wanted_specs.callback = soundReadCallback;
|
||||||
|
wanted_specs.userdata = this;
|
||||||
|
|
||||||
|
if (SDL_OpenAudio(&wanted_specs, &specs) < 0)
|
||||||
|
throw "SDL_OpenAudio() failed (" + std::string(SDL_GetError()) + ")";
|
||||||
|
|
||||||
|
SDL_PauseAudio(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLAudioSink::pause()
|
||||||
|
{
|
||||||
|
if (_started)
|
||||||
|
{
|
||||||
|
SDL_PauseAudio(1);
|
||||||
|
_paused = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDLAudioSink::stop()
|
||||||
|
{
|
||||||
|
if (_started)
|
||||||
|
{
|
||||||
|
if (!_paused) SDL_PauseAudio(1);
|
||||||
|
SDL_CloseAudio();
|
||||||
|
|
||||||
|
osg::notify(osg::NOTICE)<<"~SDLAudioSink() destructor, but still playing"<<std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Please specify and model filename on the command line."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Please specify a model filename on the command line."<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -630,6 +630,7 @@ createBox()
|
|||||||
// * Force glBegin/glEnd slow path
|
// * Force glBegin/glEnd slow path
|
||||||
// * Lots of vertices and color data per vertex
|
// * Lots of vertices and color data per vertex
|
||||||
// * No vertex sharing
|
// * No vertex sharing
|
||||||
|
// * Draw the triangles as wireframe
|
||||||
osg::ref_ptr<osg::Node>
|
osg::ref_ptr<osg::Node>
|
||||||
createRandomTriangles( unsigned int num )
|
createRandomTriangles( unsigned int num )
|
||||||
{
|
{
|
||||||
@@ -791,3 +792,4 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -604,7 +604,6 @@ int main(int argc, char** argv)
|
|||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
|
|
||||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||||
|
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|||||||
@@ -600,6 +600,9 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
if (arguments.read("--sv"))
|
if (arguments.read("--sv"))
|
||||||
{
|
{
|
||||||
|
// sv isn't yet thread safe
|
||||||
|
viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
|
||||||
|
|
||||||
// hint to tell viewer to request stencil buffer when setting up windows
|
// hint to tell viewer to request stencil buffer when setting up windows
|
||||||
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
|
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
|
||||||
|
|
||||||
@@ -622,6 +625,9 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
else if (arguments.read("--pssm"))
|
else if (arguments.read("--pssm"))
|
||||||
{
|
{
|
||||||
|
// pssm isn't yet thread safe
|
||||||
|
viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
|
||||||
|
|
||||||
int mapcount = 3;
|
int mapcount = 3;
|
||||||
while (arguments.read("--mapcount", mapcount));
|
while (arguments.read("--mapcount", mapcount));
|
||||||
osg::ref_ptr<osgShadow::ParallelSplitShadowMap> pssm = new osgShadow::ParallelSplitShadowMap(NULL,mapcount);
|
osg::ref_ptr<osgShadow::ParallelSplitShadowMap> pssm = new osgShadow::ParallelSplitShadowMap(NULL,mapcount);
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
// Simple example using GLUT to create an OpenGL window and OSG for rendering.
|
// Simple example using GLUT to create an OpenGL window and OSG for rendering.
|
||||||
// Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp
|
// Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp
|
||||||
|
|
||||||
|
#include <osg/Config>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||||
// disable warning "glutCreateMenu_ATEXIT_HACK' : unreferenced local function has been removed"
|
// disable warning "glutCreateMenu_ATEXIT_HACK' : unreferenced local function has been removed"
|
||||||
#pragma warning( disable : 4505 )
|
#pragma warning( disable : 4505 )
|
||||||
@@ -29,6 +31,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
# include <GLUT/glut.h>
|
# include <GLUT/glut.h>
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -16,6 +16,13 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <osg/Config>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||||
|
// disable warning "'QtConcurrent::BlockSizeManager' : assignment operator could not be generated"
|
||||||
|
#pragma warning( disable : 4512 )
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_QT4
|
#if USE_QT4
|
||||||
|
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
@@ -89,6 +96,10 @@ class QOSGWidget : public QWidget
|
|||||||
void init();
|
void init();
|
||||||
void createContext();
|
void createContext();
|
||||||
|
|
||||||
|
// The GraphincsWindowWin32 implementation already takes care of message handling.
|
||||||
|
// We don't want to relay these on Windows, it will just cause duplicate messages
|
||||||
|
// with further problems downstream (i.e. not being able to throw the trackball
|
||||||
|
#ifndef WIN32
|
||||||
virtual void mouseDoubleClickEvent ( QMouseEvent * event );
|
virtual void mouseDoubleClickEvent ( QMouseEvent * event );
|
||||||
virtual void closeEvent( QCloseEvent * event );
|
virtual void closeEvent( QCloseEvent * event );
|
||||||
virtual void destroyEvent( bool destroyWindow = true, bool destroySubWindows = true);
|
virtual void destroyEvent( bool destroyWindow = true, bool destroySubWindows = true);
|
||||||
@@ -98,7 +109,7 @@ class QOSGWidget : public QWidget
|
|||||||
virtual void mousePressEvent( QMouseEvent* event );
|
virtual void mousePressEvent( QMouseEvent* event );
|
||||||
virtual void mouseReleaseEvent( QMouseEvent* event );
|
virtual void mouseReleaseEvent( QMouseEvent* event );
|
||||||
virtual void mouseMoveEvent( QMouseEvent* event );
|
virtual void mouseMoveEvent( QMouseEvent* event );
|
||||||
|
#endif
|
||||||
osg::ref_ptr<osgViewer::GraphicsWindow> _gw;
|
osg::ref_ptr<osgViewer::GraphicsWindow> _gw;
|
||||||
bool _overrideTraits;
|
bool _overrideTraits;
|
||||||
};
|
};
|
||||||
@@ -181,6 +192,8 @@ void QOSGWidget::createContext()
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
void QOSGWidget::destroyEvent(bool destroyWindow, bool destroySubWindows)
|
void QOSGWidget::destroyEvent(bool destroyWindow, bool destroySubWindows)
|
||||||
{
|
{
|
||||||
_gw->getEventQueue()->closeWindow();
|
_gw->getEventQueue()->closeWindow();
|
||||||
@@ -268,7 +281,7 @@ void QOSGWidget::mouseMoveEvent( QMouseEvent* event )
|
|||||||
{
|
{
|
||||||
_gw->getEventQueue()->mouseMotion(event->x(), event->y());
|
_gw->getEventQueue()->mouseMotion(event->x(), event->y());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -300,30 +313,99 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
|
class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CompositeViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0)
|
||||||
CompositeViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0):
|
: QOSGWidget( parent, name, f )
|
||||||
QOSGWidget( parent, name, f )
|
|
||||||
{
|
{
|
||||||
setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
|
setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
|
||||||
|
|
||||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
|
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
|
||||||
|
|
||||||
// The app would hang on exit when using start(1). Behaves better with 10
|
// The composite viewer needs at least one view to work
|
||||||
// like the non-composite viewer. Was this just a typo?
|
// Create a dummy view with a zero sized viewport and no
|
||||||
_timer.start(10);
|
// scene to keep the viewer alive.
|
||||||
|
osgViewer::View * pView = new osgViewer::View;
|
||||||
|
pView->getCamera()->setGraphicsContext( getGraphicsWindow() );
|
||||||
|
pView->getCamera()->setViewport( 0, 0, 0, 0 );
|
||||||
|
addView( pView );
|
||||||
|
|
||||||
|
// Clear the viewer of removed views
|
||||||
|
getGraphicsWindow()->setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
|
getGraphicsWindow()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||||
|
|
||||||
|
// The app would hang on exit when using start(1). Behaves better with 10
|
||||||
|
// like the non-composite viewer. Was this just a typo?
|
||||||
|
_timer.start(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void paintEvent( QPaintEvent * event ) { frame(); }
|
virtual void paintEvent( QPaintEvent * event ) { frame(); }
|
||||||
|
|
||||||
protected:
|
void keyPressEvent( QKeyEvent* event )
|
||||||
|
{
|
||||||
|
if ( event->text() == "a" )
|
||||||
|
{
|
||||||
|
AddView( _scene.get() );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( event->text() == "r" )
|
||||||
|
{
|
||||||
|
RemoveView();
|
||||||
|
}
|
||||||
|
|
||||||
|
QOSGWidget::keyPressEvent( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AddView( osg::Node * scene );
|
||||||
|
void RemoveView();
|
||||||
|
void Tile();
|
||||||
|
|
||||||
|
osg::ref_ptr< osg::Node > _scene;
|
||||||
|
|
||||||
|
protected:
|
||||||
QTimer _timer;
|
QTimer _timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void CompositeViewerQOSG::Tile()
|
||||||
|
{
|
||||||
|
int n = getNumViews() - 1; // -1 to account for dummy view
|
||||||
|
|
||||||
|
for ( int i = 0; i < n; ++i )
|
||||||
|
{
|
||||||
|
osgViewer::View * view = getView(i+1); // +1 to account for dummy view
|
||||||
|
view->getCamera()->setViewport( new osg::Viewport( 0, i*height()/n , width(), height()/n ) );
|
||||||
|
view->getCamera()->setProjectionMatrixAsPerspective( 30.0f, double( width() ) / double( height()/n ), 1.0f, 10000.0f );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CompositeViewerQOSG::AddView( osg::Node * scene )
|
||||||
|
{
|
||||||
|
osgViewer::View* view = new osgViewer::View;
|
||||||
|
addView(view);
|
||||||
|
|
||||||
|
view->setSceneData( scene );
|
||||||
|
view->setCameraManipulator(new osgGA::TrackballManipulator);
|
||||||
|
|
||||||
|
// add the state manipulator
|
||||||
|
osg::ref_ptr<osgGA::StateSetManipulator> statesetManipulator = new osgGA::StateSetManipulator;
|
||||||
|
statesetManipulator->setStateSet(view->getCamera()->getOrCreateStateSet());
|
||||||
|
|
||||||
|
view->getCamera()->setGraphicsContext( getGraphicsWindow() );
|
||||||
|
view->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||||
|
Tile();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompositeViewerQOSG::RemoveView()
|
||||||
|
{
|
||||||
|
if ( getNumViews() > 1 )
|
||||||
|
{
|
||||||
|
removeView( getView( getNumViews() - 1 ) );
|
||||||
|
}
|
||||||
|
Tile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if USE_QT4
|
#if USE_QT4
|
||||||
@@ -403,7 +485,7 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
|||||||
{
|
{
|
||||||
osg::ref_ptr<CompositeViewerQOSG> viewerWindow(new CompositeViewerQOSG);
|
osg::ref_ptr<CompositeViewerQOSG> viewerWindow(new CompositeViewerQOSG);
|
||||||
|
|
||||||
viewerWindow->setGeometry(0,0,640,480);
|
viewerWindow->setGeometry(50,50,640,480);
|
||||||
// Open the ViewerQOSG window at 30/30 instead of 0/0. In some instances,
|
// Open the ViewerQOSG window at 30/30 instead of 0/0. In some instances,
|
||||||
// the window may otherwise lack any window decoration.
|
// the window may otherwise lack any window decoration.
|
||||||
// viewerWindow->setGeometry(30,30,640,480);
|
// viewerWindow->setGeometry(30,30,640,480);
|
||||||
@@ -417,6 +499,7 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
|||||||
view1->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
view1->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
||||||
view1->getCamera()->setViewport(new osg::Viewport(0,0,width,height/2));
|
view1->getCamera()->setViewport(new osg::Viewport(0,0,width,height/2));
|
||||||
view1->setSceneData(loadedModel.get());
|
view1->setSceneData(loadedModel.get());
|
||||||
|
view1->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||||
|
|
||||||
setupManipulatorAndHandler(*view1, arguments);
|
setupManipulatorAndHandler(*view1, arguments);
|
||||||
|
|
||||||
@@ -429,12 +512,15 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
|||||||
view2->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
view2->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
||||||
view2->getCamera()->setViewport(new osg::Viewport(0,height/2,width,height/2));
|
view2->getCamera()->setViewport(new osg::Viewport(0,height/2,width,height/2));
|
||||||
view2->setSceneData(loadedModel.get());
|
view2->setSceneData(loadedModel.get());
|
||||||
|
view2->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||||
|
|
||||||
setupManipulatorAndHandler(*view2, arguments);
|
setupManipulatorAndHandler(*view2, arguments);
|
||||||
|
|
||||||
viewerWindow->addView(view2);
|
viewerWindow->addView(view2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewerWindow->_scene = loadedModel.get();
|
||||||
|
viewerWindow->Tile();
|
||||||
viewerWindow->show();
|
viewerWindow->show();
|
||||||
|
|
||||||
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
|
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
||||||
|
|
||||||
IF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
IF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
||||||
# Found a precompiled SDLmain library.
|
# Found a precompiled SDLmain library.
|
||||||
SET(TARGET_SRC osgviewerSDL.cpp)
|
SET(TARGET_SRC osgviewerSDL.cpp)
|
||||||
ELSE("${SDL_LIBRARY}" MATCHES "SDLmain")
|
ELSE()
|
||||||
# No SDLmain has been found.
|
# No SDLmain has been found.
|
||||||
# Depending on platform, code may need to be provided for SDLmain.
|
# Depending on platform, code may need to be provided for SDLmain.
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(TARGET_SRC osgviewerSDL.cpp SDLMainForMacOSX.m SDLMainForMacOSX.h)
|
SET(TARGET_SRC osgviewerSDL.cpp SDLMainForMacOSX.m SDLMainForMacOSX.h)
|
||||||
ELSE(APPLE)
|
ELSE()
|
||||||
# Unhandled case. No libsdlmain has been found and no code substitute.
|
# Unhandled case. No libsdlmain has been found and no code substitute.
|
||||||
# Depending on platform (or SDL version),
|
# Depending on platform (or SDL version),
|
||||||
# this may or may not link successfully.
|
# this may or may not link successfully.
|
||||||
SET(TARGET_SRC osgviewerSDL.cpp)
|
SET(TARGET_SRC osgviewerSDL.cpp)
|
||||||
ENDIF(APPLE)
|
SET(TARGET_EXTERNAL_LIBRARIES ${SDLMAIN_LIBRARY} ${TARGET_EXTERNAL_LIBRARIES} )
|
||||||
ENDIF("${SDL_LIBRARY}" MATCHES "SDLmain")
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
|
IF (MINGW)
|
||||||
|
SET(TARGET_EXTERNAL_LIBRARIES mingw32 ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
|
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
|
||||||
|
|
||||||
|
|||||||
@@ -808,6 +808,8 @@ int main( int argc, char **argv )
|
|||||||
arguments.getApplicationUsage()->addCommandLineOption("--no-rescale","Disable the rescaling of the pixel data to 0.0 to 1.0 range");
|
arguments.getApplicationUsage()->addCommandLineOption("--no-rescale","Disable the rescaling of the pixel data to 0.0 to 1.0 range");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--rescale","Enable the rescale of the pixel data to 0.0 to 1.0 range (default).");
|
arguments.getApplicationUsage()->addCommandLineOption("--rescale","Enable the rescale of the pixel data to 0.0 to 1.0 range (default).");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--shift-min-to-zero","Shift the pixel data so min value is 0.0.");
|
arguments.getApplicationUsage()->addCommandLineOption("--shift-min-to-zero","Shift the pixel data so min value is 0.0.");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--sequence-length <num>","Set the length of time that a sequence of images with run for.");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--sd <num>","Short hand for --sequence-length");
|
||||||
// arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data");
|
// arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data");
|
||||||
|
|
||||||
// construct the viewer.
|
// construct the viewer.
|
||||||
@@ -888,16 +890,11 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
while (arguments.read("--light")) shadingModel = Light;
|
while (arguments.read("--light")) shadingModel = Light;
|
||||||
|
|
||||||
float xSize=1.0f, ySize=1.0f, zSize=1.0f;
|
float xSize=0.0f, ySize=0.0f, zSize=0.0f;
|
||||||
while (arguments.read("--xSize",xSize)) {}
|
while (arguments.read("--xSize",xSize)) {}
|
||||||
while (arguments.read("--ySize",ySize)) {}
|
while (arguments.read("--ySize",ySize)) {}
|
||||||
while (arguments.read("--zSize",zSize)) {}
|
while (arguments.read("--zSize",zSize)) {}
|
||||||
|
|
||||||
float xMultiplier=1.0f, yMultiplier=1.0f, zMultiplier=1.0f;
|
|
||||||
while (arguments.read("--xMultiplier",xMultiplier)) {}
|
|
||||||
while (arguments.read("--yMultiplier",yMultiplier)) {}
|
|
||||||
while (arguments.read("--zMultiplier",zMultiplier)) {}
|
|
||||||
|
|
||||||
osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation;
|
osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation;
|
||||||
viewer.setRealizeOperation(testSupportOperation.get());
|
viewer.setRealizeOperation(testSupportOperation.get());
|
||||||
|
|
||||||
@@ -960,6 +957,10 @@ int main( int argc, char **argv )
|
|||||||
while(arguments.read("--gpu-tf")) { gpuTransferFunction = true; }
|
while(arguments.read("--gpu-tf")) { gpuTransferFunction = true; }
|
||||||
while(arguments.read("--cpu-tf")) { gpuTransferFunction = false; }
|
while(arguments.read("--cpu-tf")) { gpuTransferFunction = false; }
|
||||||
|
|
||||||
|
double sequenceLength = 10.0;
|
||||||
|
while(arguments.read("--sequence-duration", sequenceLength) ||
|
||||||
|
arguments.read("--sd", sequenceLength)) {}
|
||||||
|
|
||||||
typedef std::list< osg::ref_ptr<osg::Image> > Images;
|
typedef std::list< osg::ref_ptr<osg::Image> > Images;
|
||||||
Images images;
|
Images images;
|
||||||
|
|
||||||
@@ -1117,16 +1118,16 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
|
|
||||||
Images::iterator sizeItr = images.begin();
|
Images::iterator sizeItr = images.begin();
|
||||||
xSize = (*sizeItr)->s();
|
int image_s = (*sizeItr)->s();
|
||||||
ySize = (*sizeItr)->t();
|
int image_t = (*sizeItr)->t();
|
||||||
zSize = (*sizeItr)->r();
|
int image_r = (*sizeItr)->r();
|
||||||
++sizeItr;
|
++sizeItr;
|
||||||
|
|
||||||
for(;sizeItr != images.end(); ++sizeItr)
|
for(;sizeItr != images.end(); ++sizeItr)
|
||||||
{
|
{
|
||||||
if ((*sizeItr)->s() != xSize ||
|
if ((*sizeItr)->s() != image_s ||
|
||||||
(*sizeItr)->t() != ySize ||
|
(*sizeItr)->t() != image_t ||
|
||||||
(*sizeItr)->r() != zSize)
|
(*sizeItr)->r() != image_r)
|
||||||
{
|
{
|
||||||
std::cout<<"Images in sequence are not of the same dimensions."<<std::endl;
|
std::cout<<"Images in sequence are not of the same dimensions."<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -1134,7 +1135,19 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
osg::RefMatrix* matrix = dynamic_cast<osg::RefMatrix*>(images.front()->getUserData());
|
osg::ref_ptr<osg::RefMatrix> matrix = dynamic_cast<osg::RefMatrix*>(images.front()->getUserData());
|
||||||
|
|
||||||
|
if (!matrix)
|
||||||
|
{
|
||||||
|
if (xSize==0.0) xSize = static_cast<float>(image_s);
|
||||||
|
if (ySize==0.0) ySize = static_cast<float>(image_t);
|
||||||
|
if (zSize==0.0) zSize = static_cast<float>(image_r);
|
||||||
|
|
||||||
|
matrix = new osg::RefMatrix(xSize, 0.0, 0.0, 0.0,
|
||||||
|
0.0, ySize, 0.0, 0.0,
|
||||||
|
0.0, 0.0, zSize, 0.0,
|
||||||
|
0.0, 0.0, 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
osg::Vec4 minValue(FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX);
|
osg::Vec4 minValue(FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX);
|
||||||
osg::Vec4 maxValue(-FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX);
|
osg::Vec4 maxValue(-FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX);
|
||||||
@@ -1249,7 +1262,7 @@ int main( int argc, char **argv )
|
|||||||
osg::notify(osg::NOTICE)<<"Creating sequence of "<<images.size()<<" volumes."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Creating sequence of "<<images.size()<<" volumes."<<std::endl;
|
||||||
|
|
||||||
osg::ref_ptr<osg::ImageSequence> imageSequence = new osg::ImageSequence;
|
osg::ref_ptr<osg::ImageSequence> imageSequence = new osg::ImageSequence;
|
||||||
imageSequence->setLength(10.0);
|
imageSequence->setLength(sequenceLength);
|
||||||
image_3d = imageSequence.get();
|
image_3d = imageSequence.get();
|
||||||
for(Images::iterator itr = images.begin();
|
for(Images::iterator itr = images.begin();
|
||||||
itr != images.end();
|
itr != images.end();
|
||||||
@@ -1266,12 +1279,9 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
osg::ref_ptr<osgVolume::Layer> layer = new osgVolume::ImageLayer(image_3d.get());
|
osg::ref_ptr<osgVolume::Layer> layer = new osgVolume::ImageLayer(image_3d.get());
|
||||||
|
|
||||||
if (matrix)
|
osgVolume::Locator* locator = new osgVolume::Locator(*matrix);
|
||||||
{
|
layer->setLocator(locator);
|
||||||
osgVolume::Locator* locator = new osgVolume::Locator(*matrix);
|
tile->setLocator(locator);
|
||||||
layer->setLocator(locator);
|
|
||||||
tile->setLocator(locator);
|
|
||||||
}
|
|
||||||
|
|
||||||
tile->setLayer(layer.get());
|
tile->setLayer(layer.get());
|
||||||
|
|
||||||
|
|||||||
@@ -17,17 +17,17 @@
|
|||||||
#include <OpenThreads/Config>
|
#include <OpenThreads/Config>
|
||||||
#include <OpenThreads/Exports>
|
#include <OpenThreads/Exports>
|
||||||
|
|
||||||
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__)
|
#if defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
|
||||||
#define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
# include <libkern/OSAtomic.h>
|
||||||
|
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
||||||
|
#elif defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__)
|
||||||
|
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
||||||
#elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
|
#elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
|
||||||
#define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
||||||
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
|
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
|
||||||
# include <atomic.h>
|
# include <atomic.h>
|
||||||
# include "Mutex"
|
# include "Mutex"
|
||||||
# include "ScopedLock"
|
# include "ScopedLock"
|
||||||
#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
|
|
||||||
# include <libkern/OSAtomic.h>
|
|
||||||
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
|
|
||||||
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
|
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
|
||||||
# include "Mutex"
|
# include "Mutex"
|
||||||
# include "ScopedLock"
|
# include "ScopedLock"
|
||||||
|
|||||||
85
include/osg/AudioStream
Normal file
85
include/osg/AudioStream
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSG_AUDIOSTREAM
|
||||||
|
#define OSG_AUDIOSTREAM 1
|
||||||
|
|
||||||
|
#include <osg/Image>
|
||||||
|
|
||||||
|
namespace osg {
|
||||||
|
|
||||||
|
/** Pure virtual AudioSink bass class that is used to connect the audio system with AudioStreams. */
|
||||||
|
class OSG_EXPORT AudioSink : public osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
AudioSink();
|
||||||
|
|
||||||
|
virtual const char * libraryName() const { return "osg"; }
|
||||||
|
virtual const char * className() const { return "AudioSinkInterface"; }
|
||||||
|
|
||||||
|
virtual void play() = 0;
|
||||||
|
virtual void pause() = 0;
|
||||||
|
virtual void stop() = 0;
|
||||||
|
|
||||||
|
virtual bool playing() const = 0;
|
||||||
|
|
||||||
|
virtual double getDelay() const { return _delay; }
|
||||||
|
virtual void setDelay(const double delay) { _delay = delay; }
|
||||||
|
|
||||||
|
virtual void setVolume(float) {}
|
||||||
|
virtual float getVolume() const { return 0.0f; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual AudioSink * cloneType() const { return 0; }
|
||||||
|
virtual AudioSink * clone(const osg::CopyOp &) const { return 0; }
|
||||||
|
|
||||||
|
double _delay;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Pure virtual AudioStream base class. Subclasses provide mechanism for reading/generating audio data*/
|
||||||
|
class OSG_EXPORT AudioStream : public osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AudioStream();
|
||||||
|
|
||||||
|
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
|
||||||
|
AudioStream(const AudioStream& audio,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
|
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const AudioStream*>(obj)!=0; }
|
||||||
|
virtual const char* libraryName() const { return "osg"; }
|
||||||
|
virtual const char* className() const { return "AudioStream"; }
|
||||||
|
|
||||||
|
virtual void setAudioSink(osg::AudioSink* audio_sink) = 0;
|
||||||
|
|
||||||
|
virtual void consumeAudioBuffer(void * const buffer, const size_t size) = 0;
|
||||||
|
|
||||||
|
virtual int audioFrequency() const = 0;
|
||||||
|
virtual int audioNbChannels() const = 0;
|
||||||
|
|
||||||
|
enum SampleFormat
|
||||||
|
{
|
||||||
|
SAMPLE_FORMAT_U8,
|
||||||
|
SAMPLE_FORMAT_S16,
|
||||||
|
SAMPLE_FORMAT_S24,
|
||||||
|
SAMPLE_FORMAT_S32,
|
||||||
|
SAMPLE_FORMAT_F32
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual SampleFormat audioSampleFormat() const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -173,11 +173,35 @@ class BoundingBoxImpl
|
|||||||
|
|
||||||
/** Expands this bounding box to include the given bounding box.
|
/** Expands this bounding box to include the given bounding box.
|
||||||
* If this box is uninitialized, set it equal to bb. */
|
* If this box is uninitialized, set it equal to bb. */
|
||||||
void expandBy(const BoundingBoxImpl& bb);
|
void expandBy(const BoundingBoxImpl& bb)
|
||||||
|
{
|
||||||
|
if (!bb.valid()) return;
|
||||||
|
|
||||||
|
if(bb._min.x()<_min.x()) _min.x() = bb._min.x();
|
||||||
|
if(bb._max.x()>_max.x()) _max.x() = bb._max.x();
|
||||||
|
|
||||||
|
if(bb._min.y()<_min.y()) _min.y() = bb._min.y();
|
||||||
|
if(bb._max.y()>_max.y()) _max.y() = bb._max.y();
|
||||||
|
|
||||||
|
if(bb._min.z()<_min.z()) _min.z() = bb._min.z();
|
||||||
|
if(bb._max.z()>_max.z()) _max.z() = bb._max.z();
|
||||||
|
}
|
||||||
|
|
||||||
/** Expands this bounding box to include the given sphere.
|
/** Expands this bounding box to include the given sphere.
|
||||||
* If this box is uninitialized, set it to include sh. */
|
* If this box is uninitialized, set it to include sh. */
|
||||||
void expandBy(const BoundingSphereImpl<VT>& sh);
|
void expandBy(const BoundingSphereImpl<VT>& sh)
|
||||||
|
{
|
||||||
|
if (!sh.valid()) return;
|
||||||
|
|
||||||
|
if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius;
|
||||||
|
if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius;
|
||||||
|
|
||||||
|
if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius;
|
||||||
|
if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius;
|
||||||
|
|
||||||
|
if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius;
|
||||||
|
if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Returns the intersection of this bounding box and the specified bounding box. */
|
/** Returns the intersection of this bounding box and the specified bounding box. */
|
||||||
@@ -205,36 +229,6 @@ class BoundingBoxImpl
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename VT>
|
|
||||||
void BoundingBoxImpl<VT>::expandBy(const BoundingBoxImpl<VT>& bb)
|
|
||||||
{
|
|
||||||
if (!bb.valid()) return;
|
|
||||||
|
|
||||||
if(bb._min.x()<_min.x()) _min.x() = bb._min.x();
|
|
||||||
if(bb._max.x()>_max.x()) _max.x() = bb._max.x();
|
|
||||||
|
|
||||||
if(bb._min.y()<_min.y()) _min.y() = bb._min.y();
|
|
||||||
if(bb._max.y()>_max.y()) _max.y() = bb._max.y();
|
|
||||||
|
|
||||||
if(bb._min.z()<_min.z()) _min.z() = bb._min.z();
|
|
||||||
if(bb._max.z()>_max.z()) _max.z() = bb._max.z();
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename VT>
|
|
||||||
void BoundingBoxImpl<VT>::expandBy(const BoundingSphereImpl<VT>& sh)
|
|
||||||
{
|
|
||||||
if (!sh.valid()) return;
|
|
||||||
|
|
||||||
if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius;
|
|
||||||
if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius;
|
|
||||||
|
|
||||||
if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius;
|
|
||||||
if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius;
|
|
||||||
|
|
||||||
if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius;
|
|
||||||
if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef BoundingBoxImpl<Vec3f> BoundingBoxf;
|
typedef BoundingBoxImpl<Vec3f> BoundingBoxf;
|
||||||
typedef BoundingBoxImpl<Vec3d> BoundingBoxd;
|
typedef BoundingBoxImpl<Vec3d> BoundingBoxd;
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class BoundingSphereImpl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef VT vec_type;
|
typedef VT vec_type;
|
||||||
typedef typename vec_type::value_type value_type;
|
typedef typename VT::value_type value_type;
|
||||||
|
|
||||||
vec_type _center;
|
vec_type _center;
|
||||||
value_type _radius;
|
value_type _radius;
|
||||||
|
|||||||
@@ -24,12 +24,15 @@ class Image;
|
|||||||
class Texture;
|
class Texture;
|
||||||
class StateSet;
|
class StateSet;
|
||||||
class StateAttribute;
|
class StateAttribute;
|
||||||
|
class StateAttributeCallback;
|
||||||
class Uniform;
|
class Uniform;
|
||||||
class Node;
|
class Node;
|
||||||
class Drawable;
|
class Drawable;
|
||||||
class Array;
|
class Array;
|
||||||
class PrimitiveSet;
|
class PrimitiveSet;
|
||||||
class Shape;
|
class Shape;
|
||||||
|
class NodeCallback;
|
||||||
|
|
||||||
|
|
||||||
/** Copy Op(erator) used to control whether shallow or deep copy is used
|
/** Copy Op(erator) used to control whether shallow or deep copy is used
|
||||||
* during copy construction and clone operation.*/
|
* during copy construction and clone operation.*/
|
||||||
@@ -52,6 +55,7 @@ class OSG_EXPORT CopyOp
|
|||||||
DEEP_COPY_PRIMITIVES = 1<<8,
|
DEEP_COPY_PRIMITIVES = 1<<8,
|
||||||
DEEP_COPY_SHAPES = 1<<9,
|
DEEP_COPY_SHAPES = 1<<9,
|
||||||
DEEP_COPY_UNIFORMS = 1<<10,
|
DEEP_COPY_UNIFORMS = 1<<10,
|
||||||
|
DEEP_COPY_CALLBACKS = 1<<11,
|
||||||
DEEP_COPY_ALL = 0x7FFFFFFF
|
DEEP_COPY_ALL = 0x7FFFFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -72,6 +76,8 @@ class OSG_EXPORT CopyOp
|
|||||||
virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const;
|
virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const;
|
||||||
virtual Shape* operator() (const Shape* shape) const;
|
virtual Shape* operator() (const Shape* shape) const;
|
||||||
virtual Uniform* operator() (const Uniform* shape) const;
|
virtual Uniform* operator() (const Uniform* shape) const;
|
||||||
|
virtual NodeCallback* operator() (const NodeCallback* nodecallback) const;
|
||||||
|
virtual StateAttributeCallback* operator() (const StateAttributeCallback* stateattributecallback) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
|||||||
unsigned int getNumOfDatabaseThreadsHint() const { return _numDatabaseThreadsHint; }
|
unsigned int getNumOfDatabaseThreadsHint() const { return _numDatabaseThreadsHint; }
|
||||||
|
|
||||||
/** Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.*/
|
/** Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.*/
|
||||||
void setNumOfHttpDatabaseThreadsHint(unsigned int numThreads) { _numDatabaseThreadsHint = numThreads; }
|
void setNumOfHttpDatabaseThreadsHint(unsigned int numThreads) { _numHttpDatabaseThreadsHint = numThreads; }
|
||||||
|
|
||||||
/** Get the hint for number of threads in the DatbasePager dedicated to reading http requests.*/
|
/** Get the hint for number of threads in the DatbasePager dedicated to reading http requests.*/
|
||||||
unsigned int getNumOfHttpDatabaseThreadsHint() const { return _numHttpDatabaseThreadsHint; }
|
unsigned int getNumOfHttpDatabaseThreadsHint() const { return _numHttpDatabaseThreadsHint; }
|
||||||
|
|||||||
@@ -26,9 +26,14 @@ enum Endian
|
|||||||
|
|
||||||
inline Endian getCpuByteOrder()
|
inline Endian getCpuByteOrder()
|
||||||
{
|
{
|
||||||
static char big_endian_1[2] = { 0, 1 };
|
union {
|
||||||
|
char big_endian_1[2];
|
||||||
|
short is_it_really_1;
|
||||||
|
} u;
|
||||||
|
u.big_endian_1[0] = 0;
|
||||||
|
u.big_endian_1[1] = 1;
|
||||||
|
|
||||||
if ( (*((short*) big_endian_1)) == 1)
|
if (u.is_it_really_1 == 1)
|
||||||
return BigEndian;
|
return BigEndian;
|
||||||
else
|
else
|
||||||
return LittleEndian;
|
return LittleEndian;
|
||||||
|
|||||||
@@ -25,6 +25,10 @@
|
|||||||
#pragma warning( disable : 4244 )
|
#pragma warning( disable : 4244 )
|
||||||
#pragma warning( disable : 4251 )
|
#pragma warning( disable : 4251 )
|
||||||
#pragma warning( disable : 4275 )
|
#pragma warning( disable : 4275 )
|
||||||
|
#pragma warning( disable : 4512 )
|
||||||
|
#pragma warning( disable : 4267 )
|
||||||
|
#pragma warning( disable : 4702 )
|
||||||
|
#pragma warning( disable : 4511 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
|
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
#include <osg/GL>
|
#include <osg/GL>
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined (_AIX)
|
#if defined(__APPLE__) || \
|
||||||
|
(defined (_AIX) && !defined (_AIX51))
|
||||||
#include <OpenGL/glu.h>
|
#include <OpenGL/glu.h>
|
||||||
#else
|
#else
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
|||||||
@@ -186,6 +186,9 @@ class OSG_EXPORT Image : public Object
|
|||||||
void setPacking(unsigned int packing) { _packing = packing; }
|
void setPacking(unsigned int packing) { _packing = packing; }
|
||||||
inline unsigned int getPacking() const { return _packing; }
|
inline unsigned int getPacking() const { return _packing; }
|
||||||
|
|
||||||
|
inline void setPixelAspectRatio(float pixelAspectRatio) { _pixelAspectRatio = pixelAspectRatio; }
|
||||||
|
inline float getPixelAspectRatio() const { return _pixelAspectRatio; }
|
||||||
|
|
||||||
/** Return the number of bits required for each pixel. */
|
/** Return the number of bits required for each pixel. */
|
||||||
inline unsigned int getPixelSizeInBits() const { return computePixelSizeInBits(_pixelFormat,_dataType); }
|
inline unsigned int getPixelSizeInBits() const { return computePixelSizeInBits(_pixelFormat,_dataType); }
|
||||||
|
|
||||||
@@ -346,6 +349,7 @@ class OSG_EXPORT Image : public Object
|
|||||||
GLenum _pixelFormat;
|
GLenum _pixelFormat;
|
||||||
GLenum _dataType;
|
GLenum _dataType;
|
||||||
unsigned int _packing;
|
unsigned int _packing;
|
||||||
|
float _pixelAspectRatio;
|
||||||
|
|
||||||
AllocationMode _allocationMode;
|
AllocationMode _allocationMode;
|
||||||
unsigned char* _data;
|
unsigned char* _data;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class OSG_EXPORT ImageSequence : public ImageStream
|
|||||||
|
|
||||||
virtual void update(NodeVisitor* nv);
|
virtual void update(NodeVisitor* nv);
|
||||||
|
|
||||||
struct OSG_EXPORT UpdateCallback : public osg::StateAttribute::Callback
|
struct OSG_EXPORT UpdateCallback : public osg::StateAttributeCallback
|
||||||
{
|
{
|
||||||
virtual void operator () (osg::StateAttribute* attr, osg::NodeVisitor* nv);
|
virtual void operator () (osg::StateAttribute* attr, osg::NodeVisitor* nv);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#define OSG_IMAGESTREAM 1
|
#define OSG_IMAGESTREAM 1
|
||||||
|
|
||||||
#include <osg/Image>
|
#include <osg/Image>
|
||||||
|
#include <osg/AudioStream>
|
||||||
|
|
||||||
namespace osg {
|
namespace osg {
|
||||||
|
|
||||||
@@ -77,6 +78,7 @@ class OSG_EXPORT ImageStream : public Image
|
|||||||
|
|
||||||
|
|
||||||
virtual double getLength() const { return 0.0; }
|
virtual double getLength() const { return 0.0; }
|
||||||
|
virtual double getFrameRate() const { return 0.0; }
|
||||||
|
|
||||||
virtual void setReferenceTime(double) {}
|
virtual void setReferenceTime(double) {}
|
||||||
virtual double getReferenceTime() const { return 0.0; }
|
virtual double getReferenceTime() const { return 0.0; }
|
||||||
@@ -87,6 +89,11 @@ class OSG_EXPORT ImageStream : public Image
|
|||||||
virtual void setVolume(float) {}
|
virtual void setVolume(float) {}
|
||||||
virtual float getVolume() const { return 0.0f; }
|
virtual float getVolume() const { return 0.0f; }
|
||||||
|
|
||||||
|
typedef std::vector< osg::ref_ptr<osg::AudioStream> > AudioStreams;
|
||||||
|
void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; }
|
||||||
|
AudioStreams& getAudioStreams() { return _audioStreams; }
|
||||||
|
const AudioStreams& getAudioStreams() const { return _audioStreams; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void applyLoopingMode() {}
|
virtual void applyLoopingMode() {}
|
||||||
@@ -95,6 +102,8 @@ class OSG_EXPORT ImageStream : public Image
|
|||||||
|
|
||||||
StreamStatus _status;
|
StreamStatus _status;
|
||||||
LoopingMode _loopingMode;
|
LoopingMode _loopingMode;
|
||||||
|
|
||||||
|
AudioStreams _audioStreams;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -44,7 +44,9 @@
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (sun) || defined (__APPLE__)
|
#if defined (sun) || \
|
||||||
|
defined (__APPLE__) || \
|
||||||
|
(defined (_AIX) && defined (__GNUC__))
|
||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
@@ -93,7 +95,8 @@
|
|||||||
|
|
||||||
#if defined (sun) || \
|
#if defined (sun) || \
|
||||||
defined (__hpux) || \
|
defined (__hpux) || \
|
||||||
defined (APPLE_PRE_10_2)
|
defined (APPLE_PRE_10_2) || \
|
||||||
|
(defined (_AIX) && defined (__GNUC__))
|
||||||
|
|
||||||
#ifndef floorf
|
#ifndef floorf
|
||||||
inline float floorf(float value) { return static_cast<float>(floor(value)); }
|
inline float floorf(float value) { return static_cast<float>(floor(value)); }
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
|
|
||||||
// These methods are public so that osgUtil::CullVisitor can access them.
|
// These methods are public so that osgUtil::CullVisitor can access them.
|
||||||
// Not intended for application use.
|
// Not intended for application use.
|
||||||
bool getPassed( const osg::Camera* camera, float distanceToEyePoint );
|
bool getPassed( const osg::Camera* camera, osg::NodeVisitor& nv );
|
||||||
void traverseQuery( const osg::Camera* camera, osg::NodeVisitor& nv );
|
void traverseQuery( const osg::Camera* camera, osg::NodeVisitor& nv );
|
||||||
void traverseDebug( osg::NodeVisitor& nv );
|
void traverseDebug( osg::NodeVisitor& nv );
|
||||||
|
|
||||||
|
|||||||
@@ -450,6 +450,12 @@ class DrawElements : public PrimitiveSet
|
|||||||
if (_ebo.valid()) _ebo->releaseGLObjects(state);
|
if (_ebo.valid()) _ebo->releaseGLObjects(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virtual void reserveElements(unsigned int numIndices) = 0;
|
||||||
|
virtual void setElement(unsigned int, unsigned int) = 0;
|
||||||
|
virtual unsigned int getElement(unsigned int) = 0;
|
||||||
|
virtual void addElement(unsigned int) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~DrawElements()
|
virtual ~DrawElements()
|
||||||
@@ -526,6 +532,11 @@ class OSG_EXPORT DrawElementsUByte : public DrawElements, public VectorGLubyte
|
|||||||
_rangeModifiedCount = _modifiedCount;
|
_rangeModifiedCount = _modifiedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); }
|
||||||
|
virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; }
|
||||||
|
virtual unsigned int getElement(unsigned int i) { return (*this)[i]; }
|
||||||
|
virtual void addElement(unsigned int v) { push_back(GLubyte(v)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~DrawElementsUByte();
|
virtual ~DrawElementsUByte();
|
||||||
@@ -601,6 +612,11 @@ class OSG_EXPORT DrawElementsUShort : public DrawElements, public VectorGLushort
|
|||||||
_rangeModifiedCount = _modifiedCount;
|
_rangeModifiedCount = _modifiedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); }
|
||||||
|
virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; }
|
||||||
|
virtual unsigned int getElement(unsigned int i) { return (*this)[i]; }
|
||||||
|
virtual void addElement(unsigned int v) { push_back(GLushort(v)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~DrawElementsUShort();
|
virtual ~DrawElementsUShort();
|
||||||
@@ -676,6 +692,11 @@ class OSG_EXPORT DrawElementsUInt : public DrawElements, public VectorGLuint
|
|||||||
_rangeModifiedCount = _modifiedCount;
|
_rangeModifiedCount = _modifiedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); }
|
||||||
|
virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; }
|
||||||
|
virtual unsigned int getElement(unsigned int i) { return (*this)[i]; }
|
||||||
|
virtual void addElement(unsigned int v) { push_back(GLuint(v)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~DrawElementsUInt();
|
virtual ~DrawElementsUInt();
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ namespace osg {
|
|||||||
class DeleteHandler;
|
class DeleteHandler;
|
||||||
class Observer;
|
class Observer;
|
||||||
|
|
||||||
|
/** template class to help enforce static initialization order. */
|
||||||
|
template <typename T, T M()>
|
||||||
|
struct depends_on
|
||||||
|
{
|
||||||
|
depends_on() { M(); }
|
||||||
|
};
|
||||||
|
|
||||||
/** Base class from providing referencing counted objects.*/
|
/** Base class from providing referencing counted objects.*/
|
||||||
class OSG_EXPORT Referenced
|
class OSG_EXPORT Referenced
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <osg/Export>
|
#include <osg/Export>
|
||||||
#include <osg/Object>
|
#include <osg/Object>
|
||||||
|
#include <osg/StateAttributeCallback>
|
||||||
#include <osg/GL>
|
#include <osg/GL>
|
||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
@@ -190,7 +191,9 @@ class OSG_EXPORT StateAttribute : public Object
|
|||||||
StateAttribute();
|
StateAttribute();
|
||||||
|
|
||||||
StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
StateAttribute(const StateAttribute& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||||
Object(sa,copyop) {}
|
Object(sa,copyop),
|
||||||
|
_updateCallback(copyop(sa._updateCallback.get()))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
/** Clone the type of an attribute, with Object* return type.
|
/** Clone the type of an attribute, with Object* return type.
|
||||||
@@ -282,36 +285,27 @@ class OSG_EXPORT StateAttribute : public Object
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Callback : public virtual osg::Object
|
// provide callback for backwards compatibility.
|
||||||
{
|
typedef osg::StateAttributeCallback Callback;
|
||||||
Callback() {}
|
|
||||||
|
|
||||||
Callback(const Callback&,const CopyOp&) {}
|
|
||||||
|
|
||||||
META_Object(osg,Callback);
|
|
||||||
|
|
||||||
/** do customized update code.*/
|
|
||||||
virtual void operator () (StateAttribute*, NodeVisitor*) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.*/
|
/** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.*/
|
||||||
void setUpdateCallback(Callback* uc);
|
void setUpdateCallback(StateAttributeCallback* uc);
|
||||||
|
|
||||||
/** Get the non const UpdateCallback.*/
|
/** Get the non const UpdateCallback.*/
|
||||||
Callback* getUpdateCallback() { return _updateCallback.get(); }
|
StateAttributeCallback* getUpdateCallback() { return _updateCallback.get(); }
|
||||||
|
|
||||||
/** Get the const UpdateCallback.*/
|
/** Get the const UpdateCallback.*/
|
||||||
const Callback* getUpdateCallback() const { return _updateCallback.get(); }
|
const StateAttributeCallback* getUpdateCallback() const { return _updateCallback.get(); }
|
||||||
|
|
||||||
|
|
||||||
/** Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.*/
|
/** Set the EventCallback which allows users to attach customize the updating of an object during the Event traversal.*/
|
||||||
void setEventCallback(Callback* ec);
|
void setEventCallback(StateAttributeCallback* ec);
|
||||||
|
|
||||||
/** Get the non const EventCallback.*/
|
/** Get the non const EventCallback.*/
|
||||||
Callback* getEventCallback() { return _eventCallback.get(); }
|
StateAttributeCallback* getEventCallback() { return _eventCallback.get(); }
|
||||||
|
|
||||||
/** Get the const EventCallback.*/
|
/** Get the const EventCallback.*/
|
||||||
const Callback* getEventCallback() const { return _eventCallback.get(); }
|
const StateAttributeCallback* getEventCallback() const { return _eventCallback.get(); }
|
||||||
|
|
||||||
|
|
||||||
/** apply the OpenGL state attributes.
|
/** apply the OpenGL state attributes.
|
||||||
@@ -343,8 +337,8 @@ class OSG_EXPORT StateAttribute : public Object
|
|||||||
ParentList _parents;
|
ParentList _parents;
|
||||||
friend class osg::StateSet;
|
friend class osg::StateSet;
|
||||||
|
|
||||||
ref_ptr<Callback> _updateCallback;
|
ref_ptr<StateAttributeCallback> _updateCallback;
|
||||||
ref_ptr<Callback> _eventCallback;
|
ref_ptr<StateAttributeCallback> _eventCallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
39
include/osg/StateAttributeCallback
Normal file
39
include/osg/StateAttributeCallback
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
#ifndef OSG_STATEATTRIBUTECALLBACK
|
||||||
|
#define OSG_STATEATTRIBUTECALLBACK 1
|
||||||
|
|
||||||
|
#include <osg/Export>
|
||||||
|
#include <osg/Object>
|
||||||
|
|
||||||
|
namespace osg {
|
||||||
|
|
||||||
|
class StateAttribute;
|
||||||
|
class NodeVisitor;
|
||||||
|
|
||||||
|
class OSG_EXPORT StateAttributeCallback : public virtual osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
StateAttributeCallback() {}
|
||||||
|
|
||||||
|
StateAttributeCallback(const StateAttributeCallback&,const CopyOp&) {}
|
||||||
|
|
||||||
|
META_Object(osg,StateAttributeCallback);
|
||||||
|
|
||||||
|
/** do customized update code.*/
|
||||||
|
virtual void operator () (StateAttribute*, NodeVisitor*) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -29,7 +29,7 @@ class Vec2b
|
|||||||
// Methods are defined here so that they are implicitly inlined
|
// Methods are defined here so that they are implicitly inlined
|
||||||
|
|
||||||
/** Type of Vec class.*/
|
/** Type of Vec class.*/
|
||||||
typedef char value_type;
|
typedef signed char value_type;
|
||||||
|
|
||||||
/** Number of vector components. */
|
/** Number of vector components. */
|
||||||
enum { num_components = 2 };
|
enum { num_components = 2 };
|
||||||
@@ -39,7 +39,7 @@ class Vec2b
|
|||||||
|
|
||||||
Vec2b() { _v[0]=0; _v[1]=0; }
|
Vec2b() { _v[0]=0; _v[1]=0; }
|
||||||
|
|
||||||
Vec2b(char r, char g)
|
Vec2b(value_type r, value_type g)
|
||||||
{
|
{
|
||||||
_v[0]=r; _v[1]=g;
|
_v[0]=r; _v[1]=g;
|
||||||
}
|
}
|
||||||
@@ -94,8 +94,8 @@ class Vec2b
|
|||||||
/** Unary multiply by scalar. */
|
/** Unary multiply by scalar. */
|
||||||
inline Vec2b& operator *= (float rhs)
|
inline Vec2b& operator *= (float rhs)
|
||||||
{
|
{
|
||||||
_v[0]=(char)((float)_v[0]*rhs);
|
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||||
_v[1]=(char)((float)_v[1]*rhs);
|
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class Vec3b
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
/** Type of Vec class.*/
|
/** Type of Vec class.*/
|
||||||
typedef char value_type;
|
typedef signed char value_type;
|
||||||
|
|
||||||
/** Number of vector components. */
|
/** Number of vector components. */
|
||||||
enum { num_components = 3 };
|
enum { num_components = 3 };
|
||||||
@@ -94,9 +94,9 @@ class Vec3b
|
|||||||
/** Unary multiply by scalar. */
|
/** Unary multiply by scalar. */
|
||||||
inline Vec3b& operator *= (float rhs)
|
inline Vec3b& operator *= (float rhs)
|
||||||
{
|
{
|
||||||
_v[0]=(char)((float)_v[0]*rhs);
|
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||||
_v[1]=(char)((float)_v[1]*rhs);
|
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||||
_v[2]=(char)((float)_v[2]*rhs);
|
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class Vec4b
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
/** Type of Vec class.*/
|
/** Type of Vec class.*/
|
||||||
typedef char value_type;
|
typedef signed char value_type;
|
||||||
|
|
||||||
/** Number of vector components. */
|
/** Number of vector components. */
|
||||||
enum { num_components = 4 };
|
enum { num_components = 4 };
|
||||||
@@ -101,10 +101,10 @@ class Vec4b
|
|||||||
/** Unary multiply by scalar. */
|
/** Unary multiply by scalar. */
|
||||||
inline Vec4b& operator *= (float rhs)
|
inline Vec4b& operator *= (float rhs)
|
||||||
{
|
{
|
||||||
_v[0]=(char)((float)_v[0]*rhs);
|
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||||
_v[1]=(char)((float)_v[1]*rhs);
|
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||||
_v[2]=(char)((float)_v[2]*rhs);
|
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||||
_v[3]=(char)((float)_v[3]*rhs);
|
_v[3]=(value_type)((float)_v[3]*rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,26 +62,26 @@ class Vec4ub
|
|||||||
else return (_v[3]<v._v[3]);
|
else return (_v[3]<v._v[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned char* ptr() { return _v; }
|
inline value_type* ptr() { return _v; }
|
||||||
inline const unsigned char* ptr() const { return _v; }
|
inline const value_type* ptr() const { return _v; }
|
||||||
|
|
||||||
inline void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
inline void set(value_type r, value_type g, value_type b, value_type a)
|
||||||
{
|
{
|
||||||
_v[0]=r; _v[1]=g; _v[2]=b; _v[3]=a;
|
_v[0]=r; _v[1]=g; _v[2]=b; _v[3]=a;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned char& operator [] (unsigned int i) { return _v[i]; }
|
inline value_type& operator [] (unsigned int i) { return _v[i]; }
|
||||||
inline unsigned char operator [] (unsigned int i) const { return _v[i]; }
|
inline value_type operator [] (unsigned int i) const { return _v[i]; }
|
||||||
|
|
||||||
inline unsigned char& r() { return _v[0]; }
|
inline value_type& r() { return _v[0]; }
|
||||||
inline unsigned char& g() { return _v[1]; }
|
inline value_type& g() { return _v[1]; }
|
||||||
inline unsigned char& b() { return _v[2]; }
|
inline value_type& b() { return _v[2]; }
|
||||||
inline unsigned char& a() { return _v[3]; }
|
inline value_type& a() { return _v[3]; }
|
||||||
|
|
||||||
inline unsigned char r() const { return _v[0]; }
|
inline value_type r() const { return _v[0]; }
|
||||||
inline unsigned char g() const { return _v[1]; }
|
inline value_type g() const { return _v[1]; }
|
||||||
inline unsigned char b() const { return _v[2]; }
|
inline value_type b() const { return _v[2]; }
|
||||||
inline unsigned char a() const { return _v[3]; }
|
inline value_type a() const { return _v[3]; }
|
||||||
|
|
||||||
/** Multiply by scalar. */
|
/** Multiply by scalar. */
|
||||||
inline Vec4ub operator * (float rhs) const
|
inline Vec4ub operator * (float rhs) const
|
||||||
@@ -94,10 +94,10 @@ class Vec4ub
|
|||||||
/** Unary multiply by scalar. */
|
/** Unary multiply by scalar. */
|
||||||
inline Vec4ub& operator *= (float rhs)
|
inline Vec4ub& operator *= (float rhs)
|
||||||
{
|
{
|
||||||
_v[0]=(unsigned char)((float)_v[0]*rhs);
|
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||||
_v[1]=(unsigned char)((float)_v[1]*rhs);
|
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||||
_v[2]=(unsigned char)((float)_v[2]*rhs);
|
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||||
_v[3]=(unsigned char)((float)_v[3]*rhs);
|
_v[3]=(value_type)((float)_v[3]*rhs);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,20 @@ extern "C" {
|
|||||||
|
|
||||||
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
||||||
#define OPENSCENEGRAPH_MINOR_VERSION 8
|
#define OPENSCENEGRAPH_MINOR_VERSION 8
|
||||||
#define OPENSCENEGRAPH_PATCH_VERSION 0
|
#define OPENSCENEGRAPH_PATCH_VERSION 3
|
||||||
#define OPENSCENEGRAPH_SOVERSION 55
|
#define OPENSCENEGRAPH_SOVERSION 65
|
||||||
|
|
||||||
|
/** convinience macro that can be used to decide whether a feature is present or not i.e.
|
||||||
|
* #if OSG_MIN_VERSION_REQUIRED(2,9,5)
|
||||||
|
* your code here
|
||||||
|
* #endif
|
||||||
|
*/
|
||||||
|
#define OSG_MIN_VERSION_REQUIRED(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH))))
|
||||||
|
#define OSG_VERSION_LESS_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<PATCH))))
|
||||||
|
#define OSG_VERSION_LESS_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION<MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION<MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION<=PATCH))))
|
||||||
|
#define OSG_VERSION_GREATER_THAN(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>PATCH))))
|
||||||
|
#define OSG_VERSION_GREATER_OR_EQUAL(MAJOR, MINOR, PATCH) ((OPENSCENEGRAPH_MAJOR_VERSION>MAJOR) || (OPENSCENEGRAPH_MAJOR_VERSION==MAJOR && (OPENSCENEGRAPH_MINOR_VERSION>MINOR || (OPENSCENEGRAPH_MINOR_VERSION==MINOR && OPENSCENEGRAPH_PATCH_VERSION>=PATCH))))
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* osgGetVersion() returns the library version number.
|
* osgGetVersion() returns the library version number.
|
||||||
|
|||||||
147
include/osgAnimation/Action
Normal file
147
include/osgAnimation/Action
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_H
|
||||||
|
#define OSGANIMATION_ACTION_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
#include <osgAnimation/Animation>
|
||||||
|
#include <osgAnimation/ActionVisitor>
|
||||||
|
#include <osgAnimation/FrameAction>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#define META_Action(library,name) \
|
||||||
|
virtual osg::Object* cloneType() const { return new name (); } \
|
||||||
|
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \
|
||||||
|
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
|
||||||
|
virtual const char* className() const { return #name; } \
|
||||||
|
virtual const char* libraryName() const { return #library; } \
|
||||||
|
virtual void accept(osgAnimation::ActionVisitor& nv) { nv.apply(*this); } \
|
||||||
|
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
|
class OSGANIMATION_EXPORT Action : public osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
class Callback : public osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Callback(){}
|
||||||
|
Callback(const Callback& nc,const osg::CopyOp&) :
|
||||||
|
_nestedCallback(nc._nestedCallback) {}
|
||||||
|
|
||||||
|
META_Object(osgAnimation,Callback);
|
||||||
|
|
||||||
|
virtual void operator()(Action* action, osgAnimation::ActionVisitor* nv) {}
|
||||||
|
|
||||||
|
Callback* getNestedCallback() { return _nestedCallback.get(); }
|
||||||
|
void addNestedCallback(Callback* callback)
|
||||||
|
{
|
||||||
|
if (callback) {
|
||||||
|
if (_nestedCallback.valid())
|
||||||
|
_nestedCallback->addNestedCallback(callback);
|
||||||
|
else
|
||||||
|
_nestedCallback = callback;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeCallback(Callback* cb)
|
||||||
|
{
|
||||||
|
if (!cb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_nestedCallback.get() == cb)
|
||||||
|
_nestedCallback = _nestedCallback->getNestedCallback();
|
||||||
|
else if (_nestedCallback.valid())
|
||||||
|
_nestedCallback->removeCallback(cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
osg::ref_ptr<Callback> _nestedCallback;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef std::map<unsigned int, osg::ref_ptr<Callback> > FrameCallback;
|
||||||
|
|
||||||
|
META_Action(osgAnimation, Action);
|
||||||
|
|
||||||
|
Action();
|
||||||
|
Action(const Action&,const osg::CopyOp&);
|
||||||
|
|
||||||
|
void setCallback(double when, Callback* callback)
|
||||||
|
{
|
||||||
|
setCallback(static_cast<unsigned int>(floor(when*_fps)), callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCallback(unsigned int frame, Callback* callback)
|
||||||
|
{
|
||||||
|
if (_framesCallback[frame].valid())
|
||||||
|
_framesCallback[frame]->addNestedCallback(callback);
|
||||||
|
else
|
||||||
|
_framesCallback[frame] = callback;
|
||||||
|
}
|
||||||
|
Callback* getCallback(unsigned int frame)
|
||||||
|
{
|
||||||
|
if (_framesCallback.find(frame) == _framesCallback.end())
|
||||||
|
return 0;
|
||||||
|
return _framesCallback[frame].get();
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeCallback(Callback*);
|
||||||
|
|
||||||
|
Callback* getFrameCallback(unsigned int frame);
|
||||||
|
Callback* getFrameCallback(double time);
|
||||||
|
unsigned int getFramesPerSecond() const { return _fps; }
|
||||||
|
|
||||||
|
void setNumFrames(unsigned int numFrames) { _numberFrame = numFrames;}
|
||||||
|
void setDuration(double duration) { _numberFrame = static_cast<unsigned int>(floor(duration * _fps)); }
|
||||||
|
unsigned int getNumFrames() const { return _numberFrame;}
|
||||||
|
double getDuration() const { return _numberFrame * 1.0 / _fps; }
|
||||||
|
|
||||||
|
// 0 means infini else it's the number of loop
|
||||||
|
virtual void setLoop(int nb) { _loop = nb; }
|
||||||
|
virtual unsigned int getLoop() const { return _loop;}
|
||||||
|
|
||||||
|
// get the number of loop, the frame relative to loop.
|
||||||
|
// return true if in range, and false if out of range.
|
||||||
|
bool evaluateFrame(unsigned int frame, unsigned int& resultframe, unsigned int& nbloop );
|
||||||
|
virtual void traverse(ActionVisitor& visitor) {}
|
||||||
|
//virtual void evaluate(unsigned int frame);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
FrameCallback _framesCallback;
|
||||||
|
|
||||||
|
double _speed;
|
||||||
|
unsigned int _fps;
|
||||||
|
unsigned int _numberFrame;
|
||||||
|
unsigned int _loop;
|
||||||
|
|
||||||
|
enum Status
|
||||||
|
{
|
||||||
|
Play,
|
||||||
|
Stop
|
||||||
|
};
|
||||||
|
|
||||||
|
Status _state;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
41
include/osgAnimation/ActionAnimation
Normal file
41
include/osgAnimation/ActionAnimation
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_ANIMATION_H
|
||||||
|
#define OSGANIMATION_ACTION_ANIMATION_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Action>
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
|
||||||
|
|
||||||
|
namespace osgAnimation {
|
||||||
|
|
||||||
|
|
||||||
|
class OSGANIMATION_EXPORT ActionAnimation : public Action
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_Action(osgAnimation, ActionAnimation);
|
||||||
|
ActionAnimation();
|
||||||
|
ActionAnimation(const ActionAnimation& a, const osg::CopyOp& c);
|
||||||
|
ActionAnimation(Animation* animation);
|
||||||
|
void updateAnimation(unsigned int frame, int priority);
|
||||||
|
Animation* getAnimation() { return _animation.get(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
osg::ref_ptr<Animation> _animation;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
44
include/osgAnimation/ActionBlendIn
Normal file
44
include/osgAnimation/ActionBlendIn
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_BLENDIN_H
|
||||||
|
#define OSGANIMATION_ACTION_BLENDIN_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Action>
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
|
||||||
|
|
||||||
|
namespace osgAnimation {
|
||||||
|
|
||||||
|
|
||||||
|
/// blend in from 0 to weight in duration
|
||||||
|
class OSGANIMATION_EXPORT ActionBlendIn : public Action
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_Action(osgAnimation, ActionBlendIn);
|
||||||
|
ActionBlendIn();
|
||||||
|
ActionBlendIn(const ActionBlendIn& a, const osg::CopyOp& c);
|
||||||
|
ActionBlendIn(Animation* animation, double duration, double weight);
|
||||||
|
double getWeight() const { return _weight;}
|
||||||
|
Animation* getAnimation() { return _animation.get(); }
|
||||||
|
void computeWeight(unsigned int frame);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
double _weight;
|
||||||
|
osg::ref_ptr<Animation> _animation;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
45
include/osgAnimation/ActionBlendOut
Normal file
45
include/osgAnimation/ActionBlendOut
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_BLENDOUT_H
|
||||||
|
#define OSGANIMATION_ACTION_BLENDOUT_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Action>
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
|
||||||
|
|
||||||
|
namespace osgAnimation {
|
||||||
|
|
||||||
|
|
||||||
|
/// blend out from weight to 0 in duration
|
||||||
|
class OSGANIMATION_EXPORT ActionBlendOut : public Action
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_Action(osgAnimation, ActionBlendOut);
|
||||||
|
ActionBlendOut();
|
||||||
|
ActionBlendOut(const ActionBlendOut& a, const osg::CopyOp& c);
|
||||||
|
ActionBlendOut(Animation* animation, double duration);
|
||||||
|
Animation* getAnimation() { return _animation.get(); }
|
||||||
|
double getWeight() const { return _weight;}
|
||||||
|
void computeWeight(unsigned int frame);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
double _weight;
|
||||||
|
osg::ref_ptr<Animation> _animation;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
41
include/osgAnimation/ActionCallback
Normal file
41
include/osgAnimation/ActionCallback
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_CALLBACK_H
|
||||||
|
#define OSGANIMATION_ACTION_CALLBACK_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
#include <osgAnimation/Action>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
|
/** Callback used to run new action on the timeline.*/
|
||||||
|
class OSGANIMATION_EXPORT RunAction : public Action::Callback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RunAction(Action* a, int priority = 0) : _action(a), _priority(priority) {}
|
||||||
|
virtual void operator()(Action* action, ActionVisitor* visitor);
|
||||||
|
|
||||||
|
Action* getAction() const { return _action.get(); }
|
||||||
|
int getPriority() const { return _priority; }
|
||||||
|
protected:
|
||||||
|
osg::ref_ptr<Action> _action;
|
||||||
|
int _priority;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
57
include/osgAnimation/ActionStripAnimation
Normal file
57
include/osgAnimation/ActionStripAnimation
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTION_STRIPANIMATION_H
|
||||||
|
#define OSGANIMATION_ACTION_STRIPANIMATION_H
|
||||||
|
|
||||||
|
#include <osgAnimation/Action>
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
#include <osgAnimation/FrameAction>
|
||||||
|
#include <osgAnimation/ActionBlendIn>
|
||||||
|
#include <osgAnimation/ActionBlendOut>
|
||||||
|
#include <osgAnimation/ActionAnimation>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
|
// encapsulate animation with blend in blend out for classic usage
|
||||||
|
class OSGANIMATION_EXPORT ActionStripAnimation : public Action
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_Action(osgAnimation, ActionStripAnimation);
|
||||||
|
ActionStripAnimation() {}
|
||||||
|
ActionStripAnimation(const ActionStripAnimation& a, const osg::CopyOp& c);
|
||||||
|
ActionStripAnimation(Animation* animation, double blendInDuration = 0.0, double blendOutDuration = 0.0, double blendInWeightTarget = 1.0 );
|
||||||
|
ActionAnimation* getAnimation();
|
||||||
|
ActionBlendIn* getBlendIn();
|
||||||
|
ActionBlendOut* getBlendOut();
|
||||||
|
const ActionAnimation* getAnimation() const;
|
||||||
|
const ActionBlendIn* getBlendIn() const;
|
||||||
|
const ActionBlendOut* getBlendOut() const;
|
||||||
|
unsigned int getBlendOutStartFrame() const;
|
||||||
|
|
||||||
|
unsigned int getLoop() const;
|
||||||
|
void setLoop(unsigned int loop);
|
||||||
|
void traverse(ActionVisitor& visitor);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
typedef std::pair<unsigned int, osg::ref_ptr<ActionBlendOut> > FrameBlendOut;
|
||||||
|
osg::ref_ptr<ActionBlendIn> _blendIn;
|
||||||
|
FrameBlendOut _blendOut;
|
||||||
|
osg::ref_ptr<ActionAnimation> _animation;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
117
include/osgAnimation/ActionVisitor
Normal file
117
include/osgAnimation/ActionVisitor
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ACTIONVISITOR_H
|
||||||
|
#define OSGANIMATION_ACTIONVISITOR_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
#include <osg/Referenced>
|
||||||
|
#include <osgAnimation/FrameAction>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
|
class Timeline;
|
||||||
|
class Action;
|
||||||
|
class ActionBlendIn;
|
||||||
|
class ActionBlendOut;
|
||||||
|
class ActionAnimation;
|
||||||
|
class ActionStripAnimation;
|
||||||
|
|
||||||
|
#define META_ActionVisitor(library,name) \
|
||||||
|
virtual const char* libraryName() const { return #library; }\
|
||||||
|
virtual const char* className() const { return #name; }
|
||||||
|
|
||||||
|
|
||||||
|
class OSGANIMATION_EXPORT ActionVisitor : public osg::Referenced
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_ActionVisitor(osgAnimation, ActionVisitor);
|
||||||
|
ActionVisitor();
|
||||||
|
void traverse(Action& visitor);
|
||||||
|
|
||||||
|
void pushFrameActionOnStack(const FrameAction& fa);
|
||||||
|
void popFrameAction();
|
||||||
|
|
||||||
|
void pushTimelineOnStack(Timeline* tm);
|
||||||
|
void popTimeline();
|
||||||
|
|
||||||
|
Timeline* getCurrentTimeline();
|
||||||
|
void setCurrentLayer(int layer) { _currentLayer = layer;}
|
||||||
|
int getCurrentLayer() const { return _currentLayer; }
|
||||||
|
|
||||||
|
const std::vector<FrameAction>& getStackedFrameAction() const { return _stackFrameAction; }
|
||||||
|
|
||||||
|
virtual void apply(Action& action);
|
||||||
|
virtual void apply(Timeline& tm);
|
||||||
|
virtual void apply(ActionBlendIn& action);
|
||||||
|
virtual void apply(ActionBlendOut& action);
|
||||||
|
virtual void apply(ActionAnimation& action);
|
||||||
|
virtual void apply(ActionStripAnimation& action);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::vector<FrameAction> _stackFrameAction;
|
||||||
|
std::vector<Timeline*> _stackTimeline;
|
||||||
|
int _currentLayer;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class OSGANIMATION_EXPORT UpdateActionVisitor : public osgAnimation::ActionVisitor
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
unsigned int _frame;
|
||||||
|
unsigned int _currentAnimationPriority;
|
||||||
|
public:
|
||||||
|
META_ActionVisitor(osgAnimation, UpdateActionVisitor);
|
||||||
|
UpdateActionVisitor();
|
||||||
|
void setFrame(unsigned int frame) { _frame = frame;}
|
||||||
|
|
||||||
|
bool isActive(Action& action) const;
|
||||||
|
unsigned int getLocalFrame() const;
|
||||||
|
|
||||||
|
void apply(Timeline& action);
|
||||||
|
void apply(Action& action);
|
||||||
|
void apply(ActionBlendIn& action);
|
||||||
|
void apply(ActionBlendOut& action);
|
||||||
|
void apply(ActionAnimation& action);
|
||||||
|
void apply(ActionStripAnimation& action);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class OSGANIMATION_EXPORT ClearActionVisitor : public osgAnimation::ActionVisitor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum ClearType {
|
||||||
|
BEFORE_FRAME,
|
||||||
|
AFTER_FRAME
|
||||||
|
};
|
||||||
|
|
||||||
|
META_ActionVisitor(osgAnimation, ClearActionVisitor);
|
||||||
|
ClearActionVisitor(ClearType type = BEFORE_FRAME);
|
||||||
|
void setFrame(unsigned int frame) { _frame = frame;}
|
||||||
|
|
||||||
|
void apply(Timeline& action);
|
||||||
|
void apply(Action& action);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
unsigned int _frame;
|
||||||
|
std::vector<osg::ref_ptr<Action> > _remove;
|
||||||
|
ClearType _clearType;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
namespace osgAnimation
|
namespace osgAnimation
|
||||||
{
|
{
|
||||||
|
|
||||||
class OSGANIMATION_EXPORT Animation : public virtual osg::Object
|
class OSGANIMATION_EXPORT Animation : public osg::Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
META_Object(osgAnimation, Animation)
|
META_Object(osgAnimation, Animation)
|
||||||
|
|
||||||
Animation() : _duration(0), _weight(0), _startTime(0), _playmode(LOOP) {}
|
Animation() : _duration(0), _weight(0), _startTime(0), _playmode(LOOP) {}
|
||||||
Animation(const osgAnimation::Animation& anim, const osg::CopyOp&);
|
Animation(const osgAnimation::Animation&, const osg::CopyOp&);
|
||||||
|
|
||||||
enum PlayMode
|
enum PlayMode
|
||||||
{
|
{
|
||||||
@@ -71,10 +71,12 @@ namespace osgAnimation
|
|||||||
void setWeight (float weight);
|
void setWeight (float weight);
|
||||||
float getWeight() const;
|
float getWeight() const;
|
||||||
|
|
||||||
bool update (float time);
|
bool update (float time, int priority = 0);
|
||||||
void resetTargets();
|
void resetTargets();
|
||||||
|
|
||||||
void setPlaymode (PlayMode mode) { _playmode = mode; }
|
void setPlaymode (PlayMode mode) { _playmode = mode; }
|
||||||
|
PlayMode getPlayMode() const { return _playmode; }
|
||||||
|
|
||||||
void setStartTime(float time) { _startTime = time;}
|
void setStartTime(float time) { _startTime = time;}
|
||||||
float getStartTime() const { return _startTime;}
|
float getStartTime() const { return _startTime;}
|
||||||
|
|
||||||
@@ -84,7 +86,6 @@ namespace osgAnimation
|
|||||||
|
|
||||||
~Animation() {}
|
~Animation() {}
|
||||||
|
|
||||||
std::string _name;
|
|
||||||
double _duration;
|
double _duration;
|
||||||
double _originalDuration;
|
double _originalDuration;
|
||||||
float _weight;
|
float _weight;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -12,9 +12,10 @@
|
|||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OSGANIMATION_ANIMATION_MANAGER_BASE_H
|
#ifndef OSGANIMATION_ANIMATION_MANAGER_BASE
|
||||||
#define OSGANIMATION_ANIMATION_MANAGER_BASE_H
|
#define OSGANIMATION_ANIMATION_MANAGER_BASE 1
|
||||||
|
|
||||||
|
#include <osgAnimation/LinkVisitor>
|
||||||
#include <osgAnimation/Animation>
|
#include <osgAnimation/Animation>
|
||||||
#include <osgAnimation/Export>
|
#include <osgAnimation/Export>
|
||||||
#include <osg/FrameStamp>
|
#include <osg/FrameStamp>
|
||||||
@@ -33,7 +34,8 @@ namespace osgAnimation
|
|||||||
AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY);
|
AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY);
|
||||||
virtual ~AnimationManagerBase();
|
virtual ~AnimationManagerBase();
|
||||||
virtual void buildTargetReference();
|
virtual void buildTargetReference();
|
||||||
virtual void registerAnimation (Animation* animation);
|
virtual void registerAnimation (Animation*);
|
||||||
|
virtual void unregisterAnimation (Animation*);
|
||||||
virtual void link(osg::Node* subgraph);
|
virtual void link(osg::Node* subgraph);
|
||||||
virtual void update(double t) = 0;
|
virtual void update(double t) = 0;
|
||||||
virtual bool needToLink() const;
|
virtual bool needToLink() const;
|
||||||
@@ -42,16 +44,26 @@ namespace osgAnimation
|
|||||||
/** Callback method called by the NodeVisitor when visiting a node.*/
|
/** Callback method called by the NodeVisitor when visiting a node.*/
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
|
||||||
|
|
||||||
/// Operation that must be done each frame
|
/** Reset the value of targets
|
||||||
|
this Operation must be done each frame */
|
||||||
void clearTargets();
|
void clearTargets();
|
||||||
void normalizeTargets();
|
|
||||||
|
|
||||||
|
|
||||||
|
LinkVisitor* getOrCreateLinkVisitor();
|
||||||
|
void setLinkVisitor(LinkVisitor*);
|
||||||
|
|
||||||
|
/// set a flag to define the behaviour
|
||||||
|
void setAutomaticLink(bool);
|
||||||
|
bool isAutomaticLink() const;
|
||||||
|
void dirty();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
osg::ref_ptr<LinkVisitor> _linker;
|
||||||
AnimationList _animations;
|
AnimationList _animations;
|
||||||
TargetSet _targets;
|
TargetSet _targets;
|
||||||
bool _needToLink;
|
bool _needToLink;
|
||||||
|
bool _automaticLink;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
72
include/osgAnimation/AnimationUpdateCallback
Normal file
72
include/osgAnimation/AnimationUpdateCallback
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_ANIMATION_UPDATE_CALLBACK
|
||||||
|
#define OSGANIMATION_ANIMATION_UPDATE_CALLBACK 1
|
||||||
|
|
||||||
|
#include <osg/Object>
|
||||||
|
#include <osgAnimation/Channel>
|
||||||
|
#include <osgAnimation/Animation>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
|
class AnimationUpdateCallbackBase : public virtual osg::Object
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool link(Channel* channel) = 0;
|
||||||
|
virtual int link(Animation* animation) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
class AnimationUpdateCallback : public AnimationUpdateCallbackBase, public T
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AnimationUpdateCallback() {}
|
||||||
|
AnimationUpdateCallback(const std::string& name) { T::setName(name);}
|
||||||
|
AnimationUpdateCallback(const AnimationUpdateCallback& apc,const osg::CopyOp& copyop): T(apc, copyop) {}
|
||||||
|
|
||||||
|
META_Object(osgAnimation, AnimationUpdateCallback<T>);
|
||||||
|
|
||||||
|
const std::string& getName() const { return T::getName(); }
|
||||||
|
bool link(Channel* channel) { return 0; }
|
||||||
|
int link(Animation* animation)
|
||||||
|
{
|
||||||
|
if (T::getName().empty())
|
||||||
|
{
|
||||||
|
osg::notify(osg::WARN) << "An update callback has no name, it means it could link only with \"\" named Target, often an error, discard" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int nbLinks = 0;
|
||||||
|
for (ChannelList::iterator it = animation->getChannels().begin();
|
||||||
|
it != animation->getChannels().end();
|
||||||
|
++it)
|
||||||
|
{
|
||||||
|
std::string targetName = (*it)->getTargetName();
|
||||||
|
if (targetName == T::getName())
|
||||||
|
{
|
||||||
|
AnimationUpdateCallbackBase* a = this;
|
||||||
|
a->link((*it).get());
|
||||||
|
nbLinks++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nbLinks;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -29,7 +29,7 @@ namespace osgAnimation
|
|||||||
META_Object(osgAnimation, BasicAnimationManager);
|
META_Object(osgAnimation, BasicAnimationManager);
|
||||||
|
|
||||||
BasicAnimationManager();
|
BasicAnimationManager();
|
||||||
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) : AnimationManagerBase(b,copyop) {}
|
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||||
virtual ~BasicAnimationManager();
|
virtual ~BasicAnimationManager();
|
||||||
|
|
||||||
void update (double time);
|
void update (double time);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -10,39 +10,26 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*
|
||||||
|
* Authors:
|
||||||
|
* Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
* Michael Platings <mplatings@pixelpower.com>
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef OSGANIMATION_BONE_H
|
#ifndef OSGANIMATION_BONE
|
||||||
#define OSGANIMATION_BONE_H
|
#define OSGANIMATION_BONE 1
|
||||||
|
|
||||||
#include <osg/Transform>
|
#include <osg/MatrixTransform>
|
||||||
#include <osg/Quat>
|
|
||||||
#include <osg/Vec3>
|
|
||||||
#include <osg/Node>
|
|
||||||
#include <osg/Geode>
|
|
||||||
#include <osg/Geometry>
|
|
||||||
#include <osg/Notify>
|
|
||||||
#include <osg/io_utils>
|
|
||||||
#include <osgAnimation/Export>
|
#include <osgAnimation/Export>
|
||||||
#include <osgAnimation/Target>
|
|
||||||
#include <osgAnimation/Sampler>
|
|
||||||
#include <osgAnimation/Channel>
|
|
||||||
#include <osgAnimation/Keyframe>
|
|
||||||
#include <osgAnimation/UpdateCallback>
|
|
||||||
#include <osgAnimation/Animation>
|
|
||||||
#include <osgAnimation/AnimationManagerBase>
|
|
||||||
#include <osgAnimation/VertexInfluence>
|
|
||||||
|
|
||||||
namespace osgAnimation
|
namespace osgAnimation
|
||||||
{
|
{
|
||||||
|
|
||||||
// A bone can't have more than one parent Bone, so sharing a part of Bone's hierarchy
|
// A bone can't have more than one parent Bone, so sharing a part of Bone's hierarchy
|
||||||
// has not sense. You can share the entire hierarchie but not only a part of
|
// makes no sense. You can share the entire hierarchy but not only a part of it.
|
||||||
class OSGANIMATION_EXPORT Bone : public osg::Transform
|
class OSGANIMATION_EXPORT Bone : public osg::MatrixTransform
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef osg::ref_ptr<Bone> PointerType;
|
|
||||||
typedef std::map<std::string, PointerType > BoneMap;
|
|
||||||
typedef osg::Matrix MatrixType;
|
typedef osg::Matrix MatrixType;
|
||||||
|
|
||||||
META_Node(osgAnimation, Bone);
|
META_Node(osgAnimation, Bone);
|
||||||
@@ -51,230 +38,24 @@ namespace osgAnimation
|
|||||||
|
|
||||||
void setDefaultUpdateCallback(const std::string& name = "");
|
void setDefaultUpdateCallback(const std::string& name = "");
|
||||||
|
|
||||||
struct BoneMapVisitor : public osg::NodeVisitor
|
|
||||||
{
|
|
||||||
BoneMap _map;
|
|
||||||
BoneMapVisitor(): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
|
|
||||||
|
|
||||||
META_NodeVisitor("osgAnimation","BoneMapVisitor")
|
|
||||||
|
|
||||||
void apply(osg::Node&) { return; }
|
|
||||||
void apply(osg::Transform& node)
|
|
||||||
{
|
|
||||||
Bone* bone = dynamic_cast<Bone*>(&node);
|
|
||||||
if (bone)
|
|
||||||
{
|
|
||||||
_map[bone->getName()] = bone;
|
|
||||||
traverse(node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FindNearestParentAnimationManager : public osg::NodeVisitor
|
|
||||||
{
|
|
||||||
osg::ref_ptr<osgAnimation::AnimationManagerBase> _manager;
|
|
||||||
FindNearestParentAnimationManager() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_PARENTS) {}
|
|
||||||
void apply(osg::Node& node)
|
|
||||||
{
|
|
||||||
if (_manager.valid())
|
|
||||||
return;
|
|
||||||
osg::NodeCallback* callback = node.getUpdateCallback();
|
|
||||||
while (callback)
|
|
||||||
{
|
|
||||||
_manager = dynamic_cast<osgAnimation::AnimationManagerBase*>(callback);
|
|
||||||
if (_manager.valid())
|
|
||||||
return;
|
|
||||||
callback = callback->getNestedCallback();
|
|
||||||
}
|
|
||||||
traverse(node);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class OSGANIMATION_EXPORT UpdateBone : public AnimationUpdateCallback
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
osg::ref_ptr<osgAnimation::Vec3Target> _position;
|
|
||||||
osg::ref_ptr<osgAnimation::QuatTarget> _quaternion;
|
|
||||||
osg::ref_ptr<osgAnimation::Vec3Target> _scale;
|
|
||||||
|
|
||||||
public:
|
|
||||||
META_Object(osgAnimation, UpdateBone);
|
|
||||||
UpdateBone(const UpdateBone& apc,const osg::CopyOp& copyop);
|
|
||||||
|
|
||||||
UpdateBone(const std::string& name = "")
|
|
||||||
{
|
|
||||||
setName(name);
|
|
||||||
_quaternion = new osgAnimation::QuatTarget;
|
|
||||||
_position = new osgAnimation::Vec3Target;
|
|
||||||
_scale = new osgAnimation::Vec3Target;
|
|
||||||
}
|
|
||||||
|
|
||||||
void update(osgAnimation::Bone& bone)
|
|
||||||
{
|
|
||||||
bone.setTranslation(_position->getValue());
|
|
||||||
bone.setRotation(_quaternion->getValue());
|
|
||||||
bone.setScale(_scale->getValue());
|
|
||||||
bone.dirtyBound();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool needLink() const
|
|
||||||
{
|
|
||||||
// the idea is to return true if nothing is linked
|
|
||||||
return !((_position->getCount() + _quaternion->getCount() + _scale->getCount()) > 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool link(osgAnimation::Channel* channel)
|
|
||||||
{
|
|
||||||
if (channel->getName().find("quaternion") != std::string::npos)
|
|
||||||
{
|
|
||||||
osgAnimation::QuatSphericalLinearChannel* qc = dynamic_cast<osgAnimation::QuatSphericalLinearChannel*>(channel);
|
|
||||||
if (qc)
|
|
||||||
{
|
|
||||||
qc->setTarget(_quaternion.get());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (channel->getName().find("position") != std::string::npos)
|
|
||||||
{
|
|
||||||
osgAnimation::Vec3LinearChannel* vc = dynamic_cast<osgAnimation::Vec3LinearChannel*>(channel);
|
|
||||||
if (vc)
|
|
||||||
{
|
|
||||||
vc->setTarget(_position.get());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (channel->getName().find("scale") != std::string::npos)
|
|
||||||
{
|
|
||||||
osgAnimation::Vec3LinearChannel* vc = dynamic_cast<osgAnimation::Vec3LinearChannel*>(channel);
|
|
||||||
if (vc)
|
|
||||||
{
|
|
||||||
vc->setTarget(_scale.get());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class" << std::endl;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Callback method called by the NodeVisitor when visiting a node.*/
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
|
||||||
{
|
|
||||||
if (nv && nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR)
|
|
||||||
{
|
|
||||||
Bone* b = dynamic_cast<Bone*>(node);
|
|
||||||
if (b && !_manager.valid())
|
|
||||||
{
|
|
||||||
FindNearestParentAnimationManager finder;
|
|
||||||
|
|
||||||
if (b->getParents().size() > 1)
|
|
||||||
{
|
|
||||||
osg::notify(osg::WARN) << "A Bone should not have multi parent ( " << b->getName() << " ) has parents ";
|
|
||||||
osg::notify(osg::WARN) << "( " << b->getParents()[0]->getName();
|
|
||||||
for (int i = 1; i < (int)b->getParents().size(); i++)
|
|
||||||
osg::notify(osg::WARN) << ", " << b->getParents()[i]->getName();
|
|
||||||
osg::notify(osg::WARN) << ")" << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
b->getParents()[0]->accept(finder);
|
|
||||||
|
|
||||||
if (!finder._manager.valid())
|
|
||||||
{
|
|
||||||
osg::notify(osg::WARN) << "Warning can't update Bone, path to parent AnimationManagerBase not found" << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_manager = finder._manager.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateLink();
|
|
||||||
update(*b);
|
|
||||||
}
|
|
||||||
traverse(node,nv);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const;
|
|
||||||
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const;
|
|
||||||
|
|
||||||
Bone* getBoneParent();
|
Bone* getBoneParent();
|
||||||
const Bone* getBoneParent() const;
|
const Bone* getBoneParent() const;
|
||||||
|
|
||||||
void setTranslation(const osg::Vec3& trans) { _position = trans;}
|
const osg::Matrix& getMatrixInBoneSpace() const { return getMatrix();}
|
||||||
void setRotation(const osg::Quat& quat) { _rotation = quat;}
|
|
||||||
void setScale(const osg::Vec3& scale) { _scale = scale;}
|
|
||||||
|
|
||||||
const osg::Vec3& getTranslation() const { return _position;}
|
|
||||||
const osg::Quat& getRotation() const { return _rotation;}
|
|
||||||
osg::Matrix getMatrixInBoneSpace() const { return (osg::Matrix(getRotation())) * osg::Matrix::translate(getTranslation()) * _bindInBoneSpace;}
|
|
||||||
const osg::Matrix& getBindMatrixInBoneSpace() const { return _bindInBoneSpace; }
|
|
||||||
const osg::Matrix& getMatrixInSkeletonSpace() const { return _boneInSkeletonSpace; }
|
const osg::Matrix& getMatrixInSkeletonSpace() const { return _boneInSkeletonSpace; }
|
||||||
const osg::Matrix& getInvBindMatrixInSkeletonSpace() const { return _invBindInSkeletonSpace;}
|
const osg::Matrix& getInvBindMatrixInSkeletonSpace() const { return _invBindInSkeletonSpace;}
|
||||||
void setMatrixInSkeletonSpace(const osg::Matrix& matrix) { _boneInSkeletonSpace = matrix; }
|
void setMatrixInSkeletonSpace(const osg::Matrix& matrix) { _boneInSkeletonSpace = matrix; }
|
||||||
void setBindMatrixInBoneSpace(const osg::Matrix& matrix)
|
void setInvBindMatrixInSkeletonSpace(const osg::Matrix& matrix) { _invBindInSkeletonSpace = matrix; }
|
||||||
{
|
|
||||||
_bindInBoneSpace = matrix;
|
|
||||||
_needToRecomputeBindMatrix = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool needToComputeBindMatrix() { return _needToRecomputeBindMatrix;}
|
|
||||||
virtual void computeBindMatrix();
|
|
||||||
|
|
||||||
bool needLink() const;
|
|
||||||
|
|
||||||
void setNeedToComputeBindMatrix(bool state) { _needToRecomputeBindMatrix = state; }
|
|
||||||
|
|
||||||
/** Add Node to Group.
|
|
||||||
* If node is not NULL and is not contained in Group then increment its
|
|
||||||
* reference count, add it to the child list and dirty the bounding
|
|
||||||
* sphere to force it to recompute on next getBound() and return true for success.
|
|
||||||
* Otherwise return false. Scene nodes can't be added as child nodes.
|
|
||||||
*/
|
|
||||||
virtual bool addChild( Node *child );
|
|
||||||
BoneMap getBoneMap();
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
osg::Vec3 _position;
|
|
||||||
osg::Quat _rotation;
|
|
||||||
osg::Vec3 _scale;
|
|
||||||
|
|
||||||
|
|
||||||
// flag to recompute bind pose
|
|
||||||
bool _needToRecomputeBindMatrix;
|
|
||||||
|
|
||||||
// bind data
|
// bind data
|
||||||
osg::Matrix _bindInBoneSpace;
|
|
||||||
osg::Matrix _invBindInSkeletonSpace;
|
osg::Matrix _invBindInSkeletonSpace;
|
||||||
|
|
||||||
// bone updated
|
// bone updated
|
||||||
osg::Matrix _boneInSkeletonSpace;
|
osg::Matrix _boneInSkeletonSpace;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef std::map<std::string, osg::ref_ptr<Bone> > BoneMap;
|
||||||
inline bool Bone::computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor*) const
|
|
||||||
{
|
|
||||||
if (_referenceFrame==RELATIVE_RF)
|
|
||||||
matrix.preMult(getMatrixInBoneSpace());
|
|
||||||
else
|
|
||||||
matrix = getMatrixInBoneSpace();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline bool Bone::computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor*) const
|
|
||||||
{
|
|
||||||
if (_referenceFrame==RELATIVE_RF)
|
|
||||||
matrix.postMult(osg::Matrix::inverse(getMatrixInBoneSpace()));
|
|
||||||
else
|
|
||||||
matrix = osg::Matrix::inverse(getMatrixInBoneSpace());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
42
include/osgAnimation/BoneMapVisitor
Normal file
42
include/osgAnimation/BoneMapVisitor
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_BONEMAP_VISITOR
|
||||||
|
#define OSGANIMATION_BONEMAP_VISITOR 1
|
||||||
|
|
||||||
|
#include <osgAnimation/Export>
|
||||||
|
#include <osgAnimation/Bone>
|
||||||
|
#include <osg/NodeVisitor>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
class OSGANIMATION_EXPORT BoneMapVisitor : public osg::NodeVisitor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
META_NodeVisitor("osgAnimation","BoneMapVisitor")
|
||||||
|
BoneMapVisitor();
|
||||||
|
|
||||||
|
void apply(osg::Node&);
|
||||||
|
void apply(osg::Transform& node);
|
||||||
|
const BoneMap& getBoneMap() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
BoneMap _map;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -10,7 +10,11 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*
|
||||||
|
* Authors:
|
||||||
|
* Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
* Michael Platings <mplatings@pixelpower.com>
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef OSGANIMATION_CHANNEL_H
|
#ifndef OSGANIMATION_CHANNEL_H
|
||||||
#define OSGANIMATION_CHANNEL_H
|
#define OSGANIMATION_CHANNEL_H
|
||||||
@@ -29,11 +33,14 @@ namespace osgAnimation
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
Channel();
|
Channel();
|
||||||
|
Channel(const Channel& channel);
|
||||||
virtual ~Channel();
|
virtual ~Channel();
|
||||||
|
virtual Channel* clone() const = 0;
|
||||||
|
|
||||||
virtual void update(float time) = 0;
|
virtual void update(float time, float weight, int priority) = 0;
|
||||||
virtual void reset() = 0;
|
virtual void reset() = 0;
|
||||||
virtual Target* getTarget() = 0;
|
virtual Target* getTarget() = 0;
|
||||||
|
virtual bool setTarget(Target*) = 0;
|
||||||
|
|
||||||
const std::string& getName() const;
|
const std::string& getName() const;
|
||||||
void setName(const std::string& name);
|
void setName(const std::string& name);
|
||||||
@@ -44,17 +51,18 @@ namespace osgAnimation
|
|||||||
const std::string& getTargetName() const;
|
const std::string& getTargetName() const;
|
||||||
void setTargetName(const std::string& name);
|
void setTargetName(const std::string& name);
|
||||||
|
|
||||||
float getWeight() const;
|
|
||||||
void setWeight(float w);
|
|
||||||
|
|
||||||
virtual Sampler* getSampler() = 0;
|
virtual Sampler* getSampler() = 0;
|
||||||
virtual const Sampler* getSampler() const = 0;
|
virtual const Sampler* getSampler() const = 0;
|
||||||
|
|
||||||
|
// create a keyframe container from current target value
|
||||||
|
// with one key only, can be used for debug or to create
|
||||||
|
// easily a default channel from an existing one
|
||||||
|
virtual bool createKeyframeContainerFromTargetValue() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
std::string _targetName;
|
std::string _targetName;
|
||||||
std::string _name;
|
std::string _name;
|
||||||
float _weight;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -66,6 +74,17 @@ namespace osgAnimation
|
|||||||
typedef typename SamplerType::UsingType UsingType;
|
typedef typename SamplerType::UsingType UsingType;
|
||||||
typedef TemplateTarget<UsingType> TargetType;
|
typedef TemplateTarget<UsingType> TargetType;
|
||||||
typedef TemplateKeyframeContainer<typename SamplerType::KeyframeType> KeyframeContainerType;
|
typedef TemplateKeyframeContainer<typename SamplerType::KeyframeType> KeyframeContainerType;
|
||||||
|
Channel* clone() const { return new TemplateChannel<SamplerType>(*this); }
|
||||||
|
|
||||||
|
TemplateChannel (const TemplateChannel& channel) :
|
||||||
|
Channel(channel)
|
||||||
|
{
|
||||||
|
if (channel.getTargetTyped())
|
||||||
|
_target = new TargetType(*channel.getTargetTyped());
|
||||||
|
|
||||||
|
if (channel.getSamplerTyped())
|
||||||
|
_sampler = new SamplerType(*channel.getSamplerTyped());
|
||||||
|
}
|
||||||
|
|
||||||
TemplateChannel (SamplerType* s = 0,TargetType* target = 0)
|
TemplateChannel (SamplerType* s = 0,TargetType* target = 0)
|
||||||
{
|
{
|
||||||
@@ -76,18 +95,40 @@ namespace osgAnimation
|
|||||||
_sampler = s;
|
_sampler = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool createKeyframeContainerFromTargetValue()
|
||||||
|
{
|
||||||
|
if (!_target.valid()) // no target it does not make sense to do it
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a key from current target value
|
||||||
|
typename KeyframeContainerType::KeyType key(0, _target->getValue());
|
||||||
|
// recreate the keyframe container
|
||||||
|
getOrCreateSampler()->setKeyframeContainer(0);
|
||||||
|
getOrCreateSampler()->getOrCreateKeyframeContainer();
|
||||||
|
// add the key
|
||||||
|
_sampler->getKeyframeContainerTyped()->push_back(key);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~TemplateChannel() {}
|
virtual ~TemplateChannel() {}
|
||||||
virtual void update(float time)
|
virtual void update(float time, float weight, int priority)
|
||||||
{
|
{
|
||||||
// skip if weight == 0
|
// skip if weight == 0
|
||||||
if (_weight < 1e-4)
|
if (weight < 1e-4)
|
||||||
return;
|
return;
|
||||||
typename SamplerType::UsingType value;
|
typename SamplerType::UsingType value;
|
||||||
_sampler->getValueAt(time, value);
|
_sampler->getValueAt(time, value);
|
||||||
_target->update(_weight, value);
|
_target->update(weight, value, priority);
|
||||||
}
|
}
|
||||||
virtual void reset() { _target->reset(); }
|
virtual void reset() { _target->reset(); }
|
||||||
virtual Target* getTarget() { return _target.get();}
|
virtual Target* getTarget() { return _target.get();}
|
||||||
|
virtual bool setTarget(Target* target)
|
||||||
|
{
|
||||||
|
_target = dynamic_cast<TargetType*>(target);
|
||||||
|
return _target.get() == target;
|
||||||
|
}
|
||||||
|
|
||||||
SamplerType* getOrCreateSampler()
|
SamplerType* getOrCreateSampler()
|
||||||
{
|
{
|
||||||
@@ -104,6 +145,7 @@ namespace osgAnimation
|
|||||||
void setSampler(SamplerType* sampler) { _sampler = sampler; }
|
void setSampler(SamplerType* sampler) { _sampler = sampler; }
|
||||||
|
|
||||||
TargetType* getTargetTyped() { return _target.get(); }
|
TargetType* getTargetTyped() { return _target.get(); }
|
||||||
|
const TargetType* getTargetTyped() const { return _target.get(); }
|
||||||
void setTarget(TargetType* target) { _target = target; }
|
void setTarget(TargetType* target) { _target = target; }
|
||||||
|
|
||||||
virtual float getStartTime() const { return _sampler->getStartTime(); }
|
virtual float getStartTime() const { return _sampler->getStartTime(); }
|
||||||
@@ -116,13 +158,21 @@ namespace osgAnimation
|
|||||||
|
|
||||||
|
|
||||||
typedef std::vector<osg::ref_ptr<osgAnimation::Channel> > ChannelList;
|
typedef std::vector<osg::ref_ptr<osgAnimation::Channel> > ChannelList;
|
||||||
|
|
||||||
|
typedef TemplateChannel<DoubleStepSampler> DoubleStepChannel;
|
||||||
|
typedef TemplateChannel<FloatStepSampler> FloatStepChannel;
|
||||||
|
typedef TemplateChannel<Vec2StepSampler> Vec2StepChannel;
|
||||||
|
typedef TemplateChannel<Vec3StepSampler> Vec3StepChannel;
|
||||||
|
typedef TemplateChannel<Vec4StepSampler> Vec4StepChannel;
|
||||||
|
typedef TemplateChannel<QuatStepSampler> QuatStepChannel;
|
||||||
|
|
||||||
typedef TemplateChannel<DoubleLinearSampler> DoubleLinearChannel;
|
typedef TemplateChannel<DoubleLinearSampler> DoubleLinearChannel;
|
||||||
typedef TemplateChannel<FloatLinearSampler> FloatLinearChannel;
|
typedef TemplateChannel<FloatLinearSampler> FloatLinearChannel;
|
||||||
|
|
||||||
typedef TemplateChannel<Vec2LinearSampler> Vec2LinearChannel;
|
typedef TemplateChannel<Vec2LinearSampler> Vec2LinearChannel;
|
||||||
typedef TemplateChannel<Vec3LinearSampler> Vec3LinearChannel;
|
typedef TemplateChannel<Vec3LinearSampler> Vec3LinearChannel;
|
||||||
typedef TemplateChannel<Vec4LinearSampler> Vec4LinearChannel;
|
typedef TemplateChannel<Vec4LinearSampler> Vec4LinearChannel;
|
||||||
typedef TemplateChannel<QuatSphericalLinearSampler> QuatSphericalLinearChannel;
|
typedef TemplateChannel<QuatSphericalLinearSampler> QuatSphericalLinearChannel;
|
||||||
|
typedef TemplateChannel<MatrixLinearSampler> MatrixLinearChannel;
|
||||||
|
|
||||||
typedef TemplateChannel<FloatCubicBezierSampler> FloatCubicBezierChannel;
|
typedef TemplateChannel<FloatCubicBezierSampler> FloatCubicBezierChannel;
|
||||||
typedef TemplateChannel<DoubleCubicBezierSampler> DoubleCubicBezierChannel;
|
typedef TemplateChannel<DoubleCubicBezierSampler> DoubleCubicBezierChannel;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -12,38 +12,61 @@
|
|||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OSGANIMATION_CUBIC_BEZIER_H
|
#ifndef OSGANIMATION_CUBIC_BEZIER
|
||||||
#define OSGANIMATION_CUBIC_BEZIER_H
|
#define OSGANIMATION_CUBIC_BEZIER 1
|
||||||
|
|
||||||
#include <osg/Vec2>
|
#include <osg/Vec2>
|
||||||
#include <osg/Vec3>
|
#include <osg/Vec3>
|
||||||
#include <osg/Vec4>
|
#include <osg/Vec4>
|
||||||
#include <osg/Quat>
|
|
||||||
|
|
||||||
namespace osgAnimation
|
namespace osgAnimation
|
||||||
{
|
{
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct TemplateCubicBezier
|
class TemplateCubicBezier
|
||||||
{
|
{
|
||||||
T mPoint[3];
|
public:
|
||||||
const T& getP0() const { return mPoint[0];}
|
|
||||||
const T& getP1() const { return mPoint[1];}
|
|
||||||
const T& getP2() const { return mPoint[2];}
|
|
||||||
TemplateCubicBezier(const T& v0, const T& v1, const T& v2)
|
|
||||||
{
|
|
||||||
mPoint[0] = v0;
|
|
||||||
mPoint[1] = v1;
|
|
||||||
mPoint[2] = v2;
|
|
||||||
}
|
|
||||||
|
|
||||||
TemplateCubicBezier() {}
|
TemplateCubicBezier() {}
|
||||||
|
|
||||||
const T& getPosition() const { return mPoint[0];}
|
TemplateCubicBezier(const T& p, const T& i, const T& o) : _position(p), _controlPointIn(i), _controlPointOut(o)
|
||||||
const T& getTangentPoint1() const { return mPoint[1];}
|
{
|
||||||
const T& getTangentPoint2() const { return mPoint[2];}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
|
// Constructor with value only
|
||||||
|
TemplateCubicBezier(const T& p) : _position(p), _controlPointIn(p), _controlPointOut(p)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const T& getPosition() const { return _position;}
|
||||||
|
const T& getControlPointIn() const { return _controlPointIn;}
|
||||||
|
const T& getControlPointOut() const { return _controlPointOut;}
|
||||||
|
|
||||||
|
T& getPosition() { return _position;}
|
||||||
|
T& getControlPointIn() { return _controlPointIn;}
|
||||||
|
T& getControlPointOut() { return _controlPointOut;}
|
||||||
|
|
||||||
|
void setPosition(const T& v) {_position = v;}
|
||||||
|
void setControlPointIn(const T& v) {_controlPointIn = v;}
|
||||||
|
void setControlPointOut(const T& v) {_controlPointOut = v;}
|
||||||
|
|
||||||
|
// steaming operators.
|
||||||
|
friend std::ostream& operator << (std::ostream& output, const TemplateCubicBezier<T>& tcb)
|
||||||
|
{
|
||||||
|
output << tcb._position << " "
|
||||||
|
<< tcb._controlPointIn << " "
|
||||||
|
<< tcb._controlPointOut;
|
||||||
|
return output; // to enable cascading
|
||||||
|
}
|
||||||
|
|
||||||
|
friend std::istream& operator >> (std::istream& input, TemplateCubicBezier<T>& tcb)
|
||||||
|
{
|
||||||
|
input >> tcb._position >> tcb._controlPointIn >> tcb._controlPointOut;
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
T _position, _controlPointIn, _controlPointOut;
|
||||||
|
};
|
||||||
|
|
||||||
typedef TemplateCubicBezier<float> FloatCubicBezier;
|
typedef TemplateCubicBezier<float> FloatCubicBezier;
|
||||||
typedef TemplateCubicBezier<double> DoubleCubicBezier;
|
typedef TemplateCubicBezier<double> DoubleCubicBezier;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OSGANIMATION_EASE_MOTION_H
|
#ifndef OSGANIMATION_EASE_MOTION
|
||||||
#define OSGANIMATION_EASE_MOTION_H
|
#define OSGANIMATION_EASE_MOTION 1
|
||||||
|
|
||||||
#include <osg/Referenced>
|
#include <osg/Referenced>
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
@@ -21,9 +21,8 @@
|
|||||||
#include <osg/Math>
|
#include <osg/Math>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace osgAnimation {
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
|
||||||
struct OutBounceFunction
|
struct OutBounceFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result)
|
inline static void getValueAt(float t, float& result)
|
||||||
@@ -76,14 +75,12 @@ namespace osgAnimation {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// Linear function
|
/// Linear function
|
||||||
struct LinearFunction
|
struct LinearFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result) { result = t;}
|
inline static void getValueAt(float t, float& result) { result = t;}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// Quad function
|
/// Quad function
|
||||||
struct OutQuadFunction
|
struct OutQuadFunction
|
||||||
{
|
{
|
||||||
@@ -94,46 +91,47 @@ namespace osgAnimation {
|
|||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result) { result = t*t;}
|
inline static void getValueAt(float t, float& result) { result = t*t;}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct InOutQuadFunction
|
struct InOutQuadFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result)
|
inline static void getValueAt(float t, float& result)
|
||||||
{
|
{
|
||||||
t = t * 2.0;
|
t *= 2.0;
|
||||||
if (t < 1.0)
|
if (t < 1.0)
|
||||||
result = 0.5 * t * t;
|
result = 0.5 * t * t;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = t - 1.0;
|
t -= 1.0;
|
||||||
result = - 0.5 * t * ( t - 2) - 1;
|
result = - 0.5 * (t * ( t - 2) - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// Cubic function
|
/// Cubic function
|
||||||
struct OutCubicFunction
|
struct OutCubicFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result) { t = t-1.0; result = t*t*t + 1;}
|
inline static void getValueAt(float t, float& result) { t = t-1.0; result = t*t*t + 1;}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct InCubicFunction
|
struct InCubicFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result) { result = t*t*t;}
|
inline static void getValueAt(float t, float& result) { result = t*t*t;}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct InOutCubicFunction
|
struct InOutCubicFunction
|
||||||
{
|
{
|
||||||
inline static void getValueAt(float t, float& result)
|
inline static void getValueAt(float t, float& result)
|
||||||
{
|
{
|
||||||
t = t * 2;
|
t *= 2.0f;
|
||||||
if (t < 1.0)
|
if (t < 1.0f)
|
||||||
result = 0.5 * t * t * t;
|
result = 0.5f * t * t * t;
|
||||||
else {
|
else {
|
||||||
t = t - 2;
|
t -= 2.0f;
|
||||||
result = 0.5 * t * t * t + 2;
|
result = 0.5 * (t * t * t + 2.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// Quart function
|
/// Quart function
|
||||||
struct InQuartFunction
|
struct InQuartFunction
|
||||||
{
|
{
|
||||||
@@ -160,7 +158,191 @@ namespace osgAnimation {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Elastic function
|
||||||
|
struct OutElasticFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = pow(2.0f, -10.0f * t) * sinf((t - 0.3f / 4.0f) * (2.0f * osg::PI) / 0.3f) + 1.0f;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InElasticFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
OutElasticFunction::getValueAt(1.0f - t, result);
|
||||||
|
result = 1.0f - result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InOutElasticFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
t *= 2.0f;
|
||||||
|
if (t < 1.0f)
|
||||||
|
{
|
||||||
|
t -= 1.0f;
|
||||||
|
result = -0.5 * (1.0f * pow(2.0f, 10.0f * t) * sinf((t - 0.45f / 4.0f) * (2.0f * osg::PI) / 0.45f));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t -= 1.0f;
|
||||||
|
result = pow(2.0f, -10.0f * t) * sinf((t - 0.45f / 4.0f) * (2.0f * osg::PI) / 0.45f) * 0.5f + 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Sine function
|
||||||
|
struct OutSineFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = sinf(t * (osg::PI / 2.0f));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InSineFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = -cosf(t * (osg::PI / 2.0f)) + 1.0f;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InOutSineFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = -0.5f * (cosf((osg::PI * t)) - 1.0f);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Back function
|
||||||
|
struct OutBackFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
t -= 1.0f;
|
||||||
|
result = t * t * ((1.70158 + 1.0f) * t + 1.70158) + 1.0f;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InBackFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = t * t * ((1.70158 + 1.0f) * t - 1.70158);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InOutBackFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
float s = 1.70158 * 1.525f;
|
||||||
|
t *= 2.0f;
|
||||||
|
if (t < 1.0f)
|
||||||
|
{
|
||||||
|
result = 0.5f * (t * t * ((s + 1.0f) * t - s));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float p = t -= 2.0f;
|
||||||
|
result = 0.5f * ((p) * t * ((s + 1.0f) * t + s) + 2.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Circ function
|
||||||
|
struct OutCircFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
t -= 1.0f;
|
||||||
|
result = sqrt(1.0f - t * t);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InCircFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
result = -(sqrt(1.0f - (t * t)) - 1.0f);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InOutCircFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
t *= 2.0f;
|
||||||
|
if (t < 1.0f)
|
||||||
|
{
|
||||||
|
result = -0.5f * (sqrt(1.0f - t * t) - 1.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t -= 2.0f;
|
||||||
|
result = 0.5f * (sqrt(1 - t * t) + 1.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Expo function
|
||||||
|
struct OutExpoFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
if(t == 1.0f)
|
||||||
|
{
|
||||||
|
result = 0.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = -powf(2.0f, -10.0f * t) + 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InExpoFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
if(t == 0.0f)
|
||||||
|
{
|
||||||
|
result = 0.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = powf(2.0f, 10.0f * (t - 1.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct InOutExpoFunction
|
||||||
|
{
|
||||||
|
inline static void getValueAt(float t, float& result)
|
||||||
|
{
|
||||||
|
if(t == 0.0f || t == 1.0f)
|
||||||
|
{
|
||||||
|
result = 0.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t *= 2.0f;
|
||||||
|
if(t < 1.0f)
|
||||||
|
{
|
||||||
|
result = 0.5f * powf(2.0f, 10.0f * (t - 1.0f));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = 0.5f * (-powf(2.0f, -10.0f * (t - 1.0f)) + 2.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class Motion : public osg::Referenced
|
class Motion : public osg::Referenced
|
||||||
{
|
{
|
||||||
@@ -278,7 +460,7 @@ namespace osgAnimation {
|
|||||||
osg::notify(osg::WARN) << "CompositeMotion::getValueInNormalizedRange no Motion in the CompositeMotion, add motion to have result" << std::endl;
|
osg::notify(osg::WARN) << "CompositeMotion::getValueInNormalizedRange no Motion in the CompositeMotion, add motion to have result" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (MotionList::const_iterator it = _motions.begin(); it != _motions.end(); it++)
|
for (MotionList::const_iterator it = _motions.begin(); it != _motions.end(); ++it)
|
||||||
{
|
{
|
||||||
const Motion* motion = static_cast<const Motion*>(it->get());
|
const Motion* motion = static_cast<const Motion*>(it->get());
|
||||||
float durationInRange = motion->getDuration() / getDuration();
|
float durationInRange = motion->getDuration() / getDuration();
|
||||||
@@ -314,13 +496,35 @@ namespace osgAnimation {
|
|||||||
typedef MathMotionTemplate<InQuartFunction> InQuartMotion;
|
typedef MathMotionTemplate<InQuartFunction> InQuartMotion;
|
||||||
typedef MathMotionTemplate<InOutQuartFunction> InOutQuartMotion;
|
typedef MathMotionTemplate<InOutQuartFunction> InOutQuartMotion;
|
||||||
|
|
||||||
|
|
||||||
// bounce
|
// bounce
|
||||||
typedef MathMotionTemplate<OutBounceFunction > OutBounceMotion;
|
typedef MathMotionTemplate<OutBounceFunction > OutBounceMotion;
|
||||||
typedef MathMotionTemplate<InBounceFunction> InBounceMotion;
|
typedef MathMotionTemplate<InBounceFunction> InBounceMotion;
|
||||||
typedef MathMotionTemplate<InOutBounceFunction> InOutBounceMotion;
|
typedef MathMotionTemplate<InOutBounceFunction> InOutBounceMotion;
|
||||||
|
|
||||||
|
// elastic
|
||||||
|
typedef MathMotionTemplate<OutElasticFunction > OutElasticMotion;
|
||||||
|
typedef MathMotionTemplate<InElasticFunction > InElasticMotion;
|
||||||
|
typedef MathMotionTemplate<InOutElasticFunction > InOutElasticMotion;
|
||||||
|
|
||||||
|
// sine
|
||||||
|
typedef MathMotionTemplate<OutSineFunction > OutSineMotion;
|
||||||
|
typedef MathMotionTemplate<InSineFunction > InSineMotion;
|
||||||
|
typedef MathMotionTemplate<InOutSineFunction > InOutSineMotion;
|
||||||
|
|
||||||
|
// back
|
||||||
|
typedef MathMotionTemplate<OutBackFunction > OutBackMotion;
|
||||||
|
typedef MathMotionTemplate<InBackFunction > InBackMotion;
|
||||||
|
typedef MathMotionTemplate<InOutBackFunction > InOutBackMotion;
|
||||||
|
|
||||||
|
// circ
|
||||||
|
typedef MathMotionTemplate<OutCircFunction > OutCircMotion;
|
||||||
|
typedef MathMotionTemplate<InCircFunction > InCircMotion;
|
||||||
|
typedef MathMotionTemplate<InOutCircFunction > InOutCircMotion;
|
||||||
|
|
||||||
|
// expo
|
||||||
|
typedef MathMotionTemplate<OutExpoFunction > OutExpoMotion;
|
||||||
|
typedef MathMotionTemplate<InExpoFunction > InExpoMotion;
|
||||||
|
typedef MathMotionTemplate<InOutExpoFunction > InOutExpoMotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
26
include/osgAnimation/FrameAction
Normal file
26
include/osgAnimation/FrameAction
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/* -*-c++-*-
|
||||||
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
|
*
|
||||||
|
* This library is open source and may be redistributed and/or modified under
|
||||||
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* OpenSceneGraph Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSGANIMATION_FRAMEACTION_H
|
||||||
|
#define OSGANIMATION_FRAMEACTION_H
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <osg/ref_ptr>
|
||||||
|
|
||||||
|
namespace osgAnimation
|
||||||
|
{
|
||||||
|
class Action;
|
||||||
|
typedef std::pair<unsigned int, osg::ref_ptr<Action> > FrameAction;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user