Compare commits
78 Commits
OpenSceneG
...
OpenSceneG
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35b99afc49 | ||
|
|
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 |
31
AUTHORS.txt
31
AUTHORS.txt
@@ -1,6 +1,6 @@
|
|||||||
OpenSceneGraph Library 2.8.0
|
OpenSceneGraph Library 2.8.0
|
||||||
|
|
||||||
364 Contributors:
|
365 Contributors:
|
||||||
|
|
||||||
Firstname Surname
|
Firstname Surname
|
||||||
-----------------
|
-----------------
|
||||||
@@ -26,23 +26,24 @@ 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
|
||||||
Tom Jolley
|
Tom Jolley
|
||||||
Jeremy Moles
|
Jeremy Moles
|
||||||
Paul Melis
|
Jason Beverage
|
||||||
Norman Vine
|
Norman Vine
|
||||||
Mattias Helsing
|
Mattias Helsing
|
||||||
Jason Beverage
|
Cedric Pinson
|
||||||
Art Tevs
|
Art Tevs
|
||||||
Alberto Farre
|
Alberto Farre
|
||||||
Andr<EFBFBD> Garneau
|
Andr<EFBFBD> Garneau
|
||||||
Ruben Lopez
|
Ruben Lopez
|
||||||
|
Roland Smeenk
|
||||||
Randall Hopper
|
Randall Hopper
|
||||||
Michael Platings
|
Michael Platings
|
||||||
Cedric Pinson
|
|
||||||
Adrian Egli
|
Adrian Egli
|
||||||
Olaf Flebbe
|
Olaf Flebbe
|
||||||
Jason Daly
|
Jason Daly
|
||||||
@@ -51,7 +52,6 @@ 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
|
Mathieu Marache
|
||||||
@@ -59,14 +59,15 @@ Joakim Simonsson
|
|||||||
David Spilling
|
David Spilling
|
||||||
Daniel Sj<53>lie
|
Daniel Sj<53>lie
|
||||||
Chris Hanson
|
Chris Hanson
|
||||||
Philip Lowman
|
|
||||||
Alberto Luaces
|
Alberto Luaces
|
||||||
|
Philip Lowman
|
||||||
Melchior Franz
|
Melchior Franz
|
||||||
Chris Denham
|
Chris Denham
|
||||||
Serge Lages
|
Serge Lages
|
||||||
Joran Jessurun
|
Joran Jessurun
|
||||||
Frederic Marmond
|
Frederic Marmond
|
||||||
David Fries
|
David Fries
|
||||||
|
Bryan Thrall
|
||||||
Boris Bralo
|
Boris Bralo
|
||||||
Yefei He
|
Yefei He
|
||||||
Tim Moore
|
Tim Moore
|
||||||
@@ -80,15 +81,16 @@ 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
|
||||||
|
Sukender
|
||||||
Sasa Bistrovic
|
Sasa Bistrovic
|
||||||
Neil Groves
|
Neil Groves
|
||||||
Martin Naylor
|
Martin Naylor
|
||||||
Martin Aumueller
|
Martin Aumueller
|
||||||
Markus Trenkwalder
|
Markus Trenkwalder
|
||||||
Loic Dachary
|
Loic Dachary
|
||||||
|
Lionel Lagarde
|
||||||
Joseph Steel
|
Joseph Steel
|
||||||
John Shue
|
John Shue
|
||||||
Jan Peciva
|
Jan Peciva
|
||||||
@@ -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
|
||||||
@@ -173,9 +176,10 @@ Stanislav Blinov
|
|||||||
Sergey Leontyev
|
Sergey Leontyev
|
||||||
Sebastian Messerschmidt
|
Sebastian Messerschmidt
|
||||||
Ralf Kern
|
Ralf Kern
|
||||||
|
Pierre Haritchabalet
|
||||||
Perry Miller
|
Perry Miller
|
||||||
Nathan Monteleone
|
Nathan Monteleone
|
||||||
Miguel Escriva
|
Morn<EFBFBD> Pistorius
|
||||||
Michael Henheffer
|
Michael Henheffer
|
||||||
Michael Guerrero
|
Michael Guerrero
|
||||||
Maya Leonard
|
Maya Leonard
|
||||||
@@ -262,7 +266,6 @@ Nicolas Brodu
|
|||||||
Neil Hughes
|
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
|
||||||
@@ -315,14 +318,12 @@ Guillaume Millet
|
|||||||
Graeme Harkness
|
Graeme Harkness
|
||||||
Gian Lorenzetto
|
Gian Lorenzetto
|
||||||
George Papagiannakis
|
George Papagiannakis
|
||||||
Gary Quinn
|
|
||||||
Galen Faidley
|
Galen Faidley
|
||||||
Frederic Bouvier
|
Frederic Bouvier
|
||||||
Frank Warmerdam
|
Frank Warmerdam
|
||||||
Frank Lindeman
|
Frank Lindeman
|
||||||
Frank Lichtenheld
|
Frank Lichtenheld
|
||||||
Ferdinand Cornelissen
|
Ferdinand Cornelissen
|
||||||
Fabien Lavignotte
|
|
||||||
Fabien Dachicourt
|
Fabien Dachicourt
|
||||||
Emmanuel Roche
|
Emmanuel Roche
|
||||||
Edmond Gheury
|
Edmond Gheury
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ SET(OPENSCENEGRAPH_SOVERSION 55)
|
|||||||
|
|
||||||
# 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 +81,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 +97,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")
|
||||||
|
|
||||||
|
|
||||||
@@ -292,13 +293,12 @@ FIND_PACKAGE(Inventor)
|
|||||||
FIND_PACKAGE(Jasper)
|
FIND_PACKAGE(Jasper)
|
||||||
FIND_PACKAGE(OpenEXR)
|
FIND_PACKAGE(OpenEXR)
|
||||||
FIND_PACKAGE(COLLADA)
|
FIND_PACKAGE(COLLADA)
|
||||||
|
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)
|
||||||
@@ -547,14 +547,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 +570,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)
|
||||||
|
|||||||
@@ -13,7 +13,10 @@
|
|||||||
#
|
#
|
||||||
# Created by Robert Osfield.
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory")
|
||||||
|
|
||||||
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
|
||||||
@@ -36,6 +39,7 @@ 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 libcollada14dom21
|
||||||
PATHS
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/build/vc8-1.4
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
$ENV{COLLADA_DIR}/build/vc8-1.4
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
@@ -60,6 +64,7 @@ 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 libcollada14dom21-d
|
||||||
PATHS
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/build/vc8-1.4-d
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
@@ -81,9 +86,10 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
|||||||
/usr/freeware/lib64
|
/usr/freeware/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
||||||
NAMES collada_dom-s collada14dom-s libcollada14dom21-s
|
NAMES libcollada14dom21-s
|
||||||
PATHS
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/build/vc8-1.4
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
$ENV{COLLADA_DIR}/build/vc8-1.4
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
@@ -108,6 +114,7 @@ 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
|
||||||
PATHS
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/build/vc8-1.4-d
|
||||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
||||||
$ENV{COLLADA_DIR}/lib
|
$ENV{COLLADA_DIR}/lib
|
||||||
$ENV{COLLADA_DIR}/lib-dbg
|
$ENV{COLLADA_DIR}/lib-dbg
|
||||||
@@ -129,6 +136,138 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
/usr/freeware/lib64
|
/usr/freeware/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
||||||
|
NAMES pcrecpp
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||||
|
${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
|
||||||
|
)
|
||||||
|
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
ENDIF(COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
|
NAMES libboost_filesystem
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
||||||
|
NAMES libboost_filesystem-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
||||||
|
NAMES libboost_system
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
||||||
|
NAMES libboost_system-d
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(COLLADA_BOOST_INCLUDE_DIR boost/filesystem/convenience.hpp
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost
|
||||||
|
)
|
||||||
|
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
|
# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
|
||||||
|
|
||||||
FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
||||||
${DCMTK_DIR}/config/include
|
${DCMTK_DIR}/config/include
|
||||||
${DCMTK_DIR}/include
|
${DCMTK_DIR}/include
|
||||||
/usr/local/include/
|
/usr/local/include/
|
||||||
/usr/include/
|
/usr/include/
|
||||||
@@ -23,7 +23,8 @@ 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_DIR}/config/include
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
|
||||||
|
${DCMTK_DIR}/config/include
|
||||||
${DCMTK_DIR}/include
|
${DCMTK_DIR}/include
|
||||||
/usr/local/include/dcmtk/config
|
/usr/local/include/dcmtk/config
|
||||||
/usr/include/dcmtk/config
|
/usr/include/dcmtk/config
|
||||||
@@ -31,7 +32,8 @@ 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_DIR}/ofstd/include
|
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
|
||||||
|
${DCMTK_DIR}/ofstd/include
|
||||||
${DCMTK_DIR}/include/ofstd
|
${DCMTK_DIR}/include/ofstd
|
||||||
/usr/local/include/dcmtk/ofstd
|
/usr/local/include/dcmtk/ofstd
|
||||||
/usr/include/dcmtk/ofstd
|
/usr/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
|
||||||
@@ -98,7 +102,7 @@ FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
|
|||||||
/usr/local/dicom/lib
|
/usr/local/dicom/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
||||||
${DCMTK_DIR}/imagectn/libsrc/Release
|
${DCMTK_DIR}/imagectn/libsrc/Release
|
||||||
${DCMTK_DIR}/imagectn/libsrc/
|
${DCMTK_DIR}/imagectn/libsrc/
|
||||||
${DCMTK_DIR}/imagectn/libsrc/Debug
|
${DCMTK_DIR}/imagectn/libsrc/Debug
|
||||||
@@ -109,7 +113,7 @@ FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
|||||||
/usr/local/dicom/lib
|
/usr/local/dicom/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
${DCMTK_DIR}/dcmnet/libsrc/Release
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/
|
${DCMTK_DIR}/dcmnet/libsrc/
|
||||||
@@ -121,8 +125,8 @@ FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
IF( DCMTK_config_INCLUDE_DIR
|
IF( DCMTK_config_INCLUDE_DIR
|
||||||
AND DCMTK_ofstd_INCLUDE_DIR
|
AND DCMTK_ofstd_INCLUDE_DIR
|
||||||
AND DCMTK_ofstd_LIBRARY
|
AND DCMTK_ofstd_LIBRARY
|
||||||
AND DCMTK_dcmdata_INCLUDE_DIR
|
AND DCMTK_dcmdata_INCLUDE_DIR
|
||||||
AND DCMTK_dcmdata_LIBRARY
|
AND DCMTK_dcmdata_LIBRARY
|
||||||
@@ -162,8 +166,8 @@ IF( DCMTK_config_INCLUDE_DIR
|
|||||||
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
|
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
|
||||||
ENDIF( WIN32 )
|
ENDIF( WIN32 )
|
||||||
|
|
||||||
ENDIF( DCMTK_config_INCLUDE_DIR
|
ENDIF( DCMTK_config_INCLUDE_DIR
|
||||||
AND DCMTK_ofstd_INCLUDE_DIR
|
AND DCMTK_ofstd_INCLUDE_DIR
|
||||||
AND DCMTK_ofstd_LIBRARY
|
AND DCMTK_ofstd_LIBRARY
|
||||||
AND DCMTK_dcmdata_INCLUDE_DIR
|
AND DCMTK_dcmdata_INCLUDE_DIR
|
||||||
AND DCMTK_dcmdata_LIBRARY
|
AND DCMTK_dcmdata_LIBRARY
|
||||||
|
|||||||
@@ -1,15 +1,31 @@
|
|||||||
# 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
|
||||||
# XUL_INCLUDE_DIR, where to find the headers
|
# XUL_INCLUDE_DIR, where to find the headers
|
||||||
#
|
#
|
||||||
# $XUL_DIR is an environment variable that would
|
# $XUL_DIR is an environment variable that would
|
||||||
# correspond to the ./configure --prefix=$XUL_DIR
|
# correspond to the ./configure --prefix=$XUL_DIR
|
||||||
#
|
#
|
||||||
# Created by Robert Osfield.
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
#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/xulrunner
|
||||||
$ENV{OSG_DIR}/include
|
$ENV{OSG_DIR}/include
|
||||||
$ENV{OSG_DIR}/xulrunner
|
$ENV{OSG_DIR}/xulrunner
|
||||||
@@ -17,7 +33,39 @@ FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
|||||||
$ENV{OSGDIR}/include/xulrunner
|
$ENV{OSGDIR}/include/xulrunner
|
||||||
$ENV{OSGDIR}/include
|
$ENV{OSGDIR}/include
|
||||||
$ENV{OSGDIR}/xulrunner
|
$ENV{OSGDIR}/xulrunner
|
||||||
$ENV{OSGDIR}
|
$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
|
||||||
|
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/xulrunner
|
||||||
$ENV{OSG_ROOT}/include
|
$ENV{OSG_ROOT}/include
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
@@ -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
|
||||||
@@ -48,7 +97,7 @@ FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
|||||||
$ENV{OSGDIR}/include/nspr
|
$ENV{OSGDIR}/include/nspr
|
||||||
$ENV{OSGDIR}/include
|
$ENV{OSGDIR}/include
|
||||||
$ENV{OSGDIR}/nspr
|
$ENV{OSGDIR}/nspr
|
||||||
$ENV{OSGDIR}
|
$ENV{OSGDIR}
|
||||||
$ENV{OSG_ROOT}/include/nspr
|
$ENV{OSG_ROOT}/include/nspr
|
||||||
$ENV{OSG_ROOT}/include
|
$ENV{OSG_ROOT}/include
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
@@ -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
|
||||||
@@ -79,7 +129,7 @@ FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
|||||||
$ENV{OSGDIR}/include/mozjs
|
$ENV{OSGDIR}/include/mozjs
|
||||||
$ENV{OSGDIR}/include
|
$ENV{OSGDIR}/include
|
||||||
$ENV{OSGDIR}/mozjs
|
$ENV{OSGDIR}/mozjs
|
||||||
$ENV{OSGDIR}
|
$ENV{OSGDIR}
|
||||||
$ENV{OSG_ROOT}/include/mozjs
|
$ENV{OSG_ROOT}/include/mozjs
|
||||||
$ENV{OSG_ROOT}/include
|
$ENV{OSG_ROOT}/include
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
@@ -102,7 +152,7 @@ FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
|||||||
/usr/freeware/include
|
/usr/freeware/include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(XUL_DIR
|
FIND_PATH(XUL_DIR
|
||||||
NAMES components/appshell.xpt
|
NAMES components/appshell.xpt
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{OSG_DIR}/lib
|
$ENV{OSG_DIR}/lib
|
||||||
@@ -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}
|
||||||
|
|||||||
33
NEWS.txt
33
NEWS.txt
@@ -3,7 +3,7 @@ OSG News
|
|||||||
|
|
||||||
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
||||||
|
|
||||||
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 - 12th 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.
|
||||||
|
|
||||||
=== 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 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.
|
||||||
@@ -15,38 +15,39 @@ The !OpenSceneGraph 2.8 release is the culmination of 10 years of work by the le
|
|||||||
* 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
|
||||||
@@ -60,8 +61,8 @@ The !OpenSceneGraph project owes a great deal to the community for its developme
|
|||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
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.
|
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
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ subscribe to our public mailing list:
|
|||||||
|
|
||||||
Robert Osfield.
|
Robert Osfield.
|
||||||
Project Lead.
|
Project Lead.
|
||||||
4th Februaru 2009.
|
12th February 2009.
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ std::string typoCorrection(const std::string& name)
|
|||||||
if (name=="Molishtan") return "Moloshtan";
|
if (name=="Molishtan") return "Moloshtan";
|
||||||
if (name=="Moloshton") return "Moloshtan";
|
if (name=="Moloshton") return "Moloshtan";
|
||||||
if (name=="Morné") return "Morn<EFBFBD>";
|
if (name=="Morné") return "Morn<EFBFBD>";
|
||||||
|
if (name=="Morne") return "Morn<EFBFBD>";
|
||||||
if (name=="Moule") return "Moiule";
|
if (name=="Moule") return "Moiule";
|
||||||
if (name=="Narache") return "Marache";
|
if (name=="Narache") return "Marache";
|
||||||
if (name=="Nicklov") return "Nikolov";
|
if (name=="Nicklov") return "Nikolov";
|
||||||
@@ -381,11 +382,18 @@ std::string typoCorrection(const std::string& name)
|
|||||||
if (name=="Yefrei") return "Yefei";
|
if (name=="Yefrei") return "Yefei";
|
||||||
if (name=="Yfei") return "Yefei";
|
if (name=="Yfei") return "Yefei";
|
||||||
if (name=="Jean-Sebastein") return "Jean-Sebastien";
|
if (name=="Jean-Sebastein") return "Jean-Sebastien";
|
||||||
|
if (name=="Haritchablaet") return "Haritchabalet";
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nameCorrection(NamePair& name)
|
void nameCorrection(NamePair& name)
|
||||||
{
|
{
|
||||||
|
if (name.first=="Gary" && name.second=="Quin")
|
||||||
|
{
|
||||||
|
name.first = "Gary";
|
||||||
|
name.second = "Quinn";
|
||||||
|
}
|
||||||
|
|
||||||
if (name.first=="BjornHein" && name.second=="")
|
if (name.first=="BjornHein" && name.second=="")
|
||||||
{
|
{
|
||||||
name.first = "Bj<EFBFBD>rn";
|
name.first = "Bj<EFBFBD>rn";
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,9 +252,6 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
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();
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ 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 osgAnimation/nathan.osg" << std::endl;
|
||||||
|
|
||||||
osg::ArgumentParser psr(&argc, argv);
|
osg::ArgumentParser psr(&argc, argv);
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ int main (int argc, char* argv[])
|
|||||||
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;
|
std::cerr << "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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ void textInfo(osgText::Text* text)
|
|||||||
const osgText::Text::TextureGlyphQuadMap& tgqm = text->getTextureGlyphQuadMap();
|
const osgText::Text::TextureGlyphQuadMap& tgqm = text->getTextureGlyphQuadMap();
|
||||||
|
|
||||||
const osgText::Text::TextureGlyphQuadMap::const_iterator tgqmi = tgqm.begin();
|
const osgText::Text::TextureGlyphQuadMap::const_iterator tgqmi = tgqm.begin();
|
||||||
|
|
||||||
const osgText::Text::GlyphQuads& gq = tgqmi->second;
|
const osgText::Text::GlyphQuads& gq = tgqmi->second;
|
||||||
|
|
||||||
osgText::String& s = text->getText();
|
osgText::String& s = text->getText();
|
||||||
@@ -59,7 +59,7 @@ osg::Camera* createOrthoCamera(double width, double height)
|
|||||||
camera->setViewMatrix(osg::Matrix::identity());
|
camera->setViewMatrix(osg::Matrix::identity());
|
||||||
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
|
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
|
||||||
camera->setRenderOrder(osg::Camera::POST_RENDER);
|
camera->setRenderOrder(osg::Camera::POST_RENDER);
|
||||||
|
|
||||||
return camera;
|
return camera;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ int main(int argc, char** argv)
|
|||||||
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
|
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
|
||||||
|
|
||||||
osg::Group* group = new osg::Group();
|
osg::Group* group = new osg::Group();
|
||||||
osg::Camera* camera = createOrthoCamera(1280.0f, 1024.0f);
|
osg::Camera* camera = createOrthoCamera(1280.0f, 1024.0f);
|
||||||
|
|
||||||
// Create the list of desired sizes.
|
// Create the list of desired sizes.
|
||||||
Sizes sizes;
|
Sizes sizes;
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -44,14 +44,14 @@ class MovieEventHandler : public osgGA::GUIEventHandler
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
||||||
|
|
||||||
void setMouseTracking(bool track) { _trackMouse = track; }
|
void setMouseTracking(bool track) { _trackMouse = track; }
|
||||||
bool getMouseTracking() const { return _trackMouse; }
|
bool getMouseTracking() const { return _trackMouse; }
|
||||||
|
|
||||||
void set(osg::Node* node);
|
void set(osg::Node* node);
|
||||||
|
|
||||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv);
|
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv);
|
||||||
|
|
||||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||||
|
|
||||||
typedef std::vector< osg::observer_ptr<osg::ImageStream> > ImageStreamList;
|
typedef std::vector< osg::observer_ptr<osg::ImageStream> > ImageStreamList;
|
||||||
@@ -65,7 +65,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
FindImageStreamsVisitor(ImageStreamList& imageStreamList):
|
FindImageStreamsVisitor(ImageStreamList& imageStreamList):
|
||||||
_imageStreamList(imageStreamList) {}
|
_imageStreamList(imageStreamList) {}
|
||||||
|
|
||||||
virtual void apply(osg::Geode& geode)
|
virtual void apply(osg::Geode& geode)
|
||||||
{
|
{
|
||||||
apply(geode.getStateSet());
|
apply(geode.getStateSet());
|
||||||
@@ -74,7 +74,7 @@ protected:
|
|||||||
{
|
{
|
||||||
apply(geode.getDrawable(i)->getStateSet());
|
apply(geode.getDrawable(i)->getStateSet());
|
||||||
}
|
}
|
||||||
|
|
||||||
traverse(geode);
|
traverse(geode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,11 +83,11 @@ protected:
|
|||||||
apply(node.getStateSet());
|
apply(node.getStateSet());
|
||||||
traverse(node);
|
traverse(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void apply(osg::StateSet* stateset)
|
inline void apply(osg::StateSet* stateset)
|
||||||
{
|
{
|
||||||
if (!stateset) return;
|
if (!stateset) return;
|
||||||
|
|
||||||
osg::StateAttribute* attr = stateset->getTextureAttribute(0,osg::StateAttribute::TEXTURE);
|
osg::StateAttribute* attr = stateset->getTextureAttribute(0,osg::StateAttribute::TEXTURE);
|
||||||
if (attr)
|
if (attr)
|
||||||
{
|
{
|
||||||
@@ -98,19 +98,19 @@ protected:
|
|||||||
if (textureRec) apply(dynamic_cast<osg::ImageStream*>(textureRec->getImage()));
|
if (textureRec) apply(dynamic_cast<osg::ImageStream*>(textureRec->getImage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void apply(osg::ImageStream* imagestream)
|
inline void apply(osg::ImageStream* imagestream)
|
||||||
{
|
{
|
||||||
if (imagestream)
|
if (imagestream)
|
||||||
{
|
{
|
||||||
_imageStreamList.push_back(imagestream);
|
_imageStreamList.push_back(imagestream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageStreamList& _imageStreamList;
|
ImageStreamList& _imageStreamList;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
FindImageStreamsVisitor& operator = (const FindImageStreamsVisitor&) { return *this; }
|
FindImageStreamsVisitor& operator = (const FindImageStreamsVisitor&) { return *this; }
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -119,7 +119,7 @@ protected:
|
|||||||
bool _playToggle;
|
bool _playToggle;
|
||||||
bool _trackMouse;
|
bool _trackMouse;
|
||||||
ImageStreamList _imageStreamList;
|
ImageStreamList _imageStreamList;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -150,11 +150,11 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
bool foundIntersection = view==0 ? false :
|
bool foundIntersection = view==0 ? false :
|
||||||
(nv==0 ? view->computeIntersections(ea.getX(), ea.getY(), intersections) :
|
(nv==0 ? view->computeIntersections(ea.getX(), ea.getY(), intersections) :
|
||||||
view->computeIntersections(ea.getX(), ea.getY(), nv->getNodePath(), intersections));
|
view->computeIntersections(ea.getX(), ea.getY(), nv->getNodePath(), intersections));
|
||||||
|
|
||||||
if (foundIntersection)
|
if (foundIntersection)
|
||||||
{
|
{
|
||||||
|
|
||||||
// use the nearest intersection
|
// use the nearest intersection
|
||||||
const osgUtil::LineSegmentIntersector::Intersection& intersection = *(intersections.begin());
|
const osgUtil::LineSegmentIntersector::Intersection& intersection = *(intersections.begin());
|
||||||
osg::Drawable* drawable = intersection.drawable.get();
|
osg::Drawable* drawable = intersection.drawable.get();
|
||||||
osg::Geometry* geometry = drawable ? drawable->asGeometry() : 0;
|
osg::Geometry* geometry = drawable ? drawable->asGeometry() : 0;
|
||||||
@@ -179,7 +179,7 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
osg::Vec2Array* texcoords_Vec2Array = dynamic_cast<osg::Vec2Array*>(texcoords);
|
osg::Vec2Array* texcoords_Vec2Array = dynamic_cast<osg::Vec2Array*>(texcoords);
|
||||||
if (texcoords_Vec2Array)
|
if (texcoords_Vec2Array)
|
||||||
{
|
{
|
||||||
// we have tex coord array so now we can compute the final tex coord at the point of intersection.
|
// we have tex coord array so now we can compute the final tex coord at the point of intersection.
|
||||||
osg::Vec2 tc1 = (*texcoords_Vec2Array)[i1];
|
osg::Vec2 tc1 = (*texcoords_Vec2Array)[i1];
|
||||||
osg::Vec2 tc2 = (*texcoords_Vec2Array)[i2];
|
osg::Vec2 tc2 = (*texcoords_Vec2Array)[i2];
|
||||||
osg::Vec2 tc3 = (*texcoords_Vec2Array)[i3];
|
osg::Vec2 tc3 = (*texcoords_Vec2Array)[i3];
|
||||||
@@ -279,7 +279,7 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
|||||||
{
|
{
|
||||||
bool flip = image->getOrigin()==osg::Image::TOP_LEFT;
|
bool flip = image->getOrigin()==osg::Image::TOP_LEFT;
|
||||||
if (option_flip) flip = !flip;
|
if (option_flip) flip = !flip;
|
||||||
|
|
||||||
if (useTextureRectangle)
|
if (useTextureRectangle)
|
||||||
{
|
{
|
||||||
osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(pos,
|
osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(pos,
|
||||||
@@ -290,12 +290,12 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
|||||||
osg::TextureRectangle* texture = new osg::TextureRectangle(image);
|
osg::TextureRectangle* texture = new osg::TextureRectangle(image);
|
||||||
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||||
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||||
|
|
||||||
|
|
||||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||||
texture,
|
texture,
|
||||||
osg::StateAttribute::ON);
|
osg::StateAttribute::ON);
|
||||||
|
|
||||||
return pictureQuad;
|
return pictureQuad;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -304,14 +304,14 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
|||||||
osg::Vec3(width,0.0f,0.0f),
|
osg::Vec3(width,0.0f,0.0f),
|
||||||
xyPlane ? osg::Vec3(0.0f,height,0.0f) : osg::Vec3(0.0f,0.0f,height),
|
xyPlane ? osg::Vec3(0.0f,height,0.0f) : osg::Vec3(0.0f,0.0f,height),
|
||||||
0.0f, flip ? 1.0f : 0.0f , 1.0f, flip ? 0.0f : 1.0f);
|
0.0f, flip ? 1.0f : 0.0f , 1.0f, flip ? 0.0f : 1.0f);
|
||||||
|
|
||||||
osg::Texture2D* texture = new osg::Texture2D(image);
|
osg::Texture2D* texture = new osg::Texture2D(image);
|
||||||
texture->setResizeNonPowerOfTwoHint(false);
|
texture->setResizeNonPowerOfTwoHint(false);
|
||||||
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR);
|
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR);
|
||||||
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||||
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||||
|
|
||||||
|
|
||||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||||
texture,
|
texture,
|
||||||
osg::StateAttribute::ON);
|
osg::StateAttribute::ON);
|
||||||
@@ -324,7 +324,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,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()+" example demonstrates the use of ImageStream for rendering movies as textures.");
|
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" example demonstrates the use of ImageStream for rendering movies as textures.");
|
||||||
@@ -334,20 +334,23 @@ 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;
|
||||||
|
|
||||||
// construct the viewer.
|
// construct the viewer.
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
if (arguments.argc()<=1)
|
if (arguments.argc()<=1)
|
||||||
{
|
{
|
||||||
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||||
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,12 +358,13 @@ 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;
|
||||||
|
|
||||||
bool mouseTracking = false;
|
bool mouseTracking = false;
|
||||||
while (arguments.read("--mouse")) mouseTracking=true;
|
while (arguments.read("--mouse")) mouseTracking=true;
|
||||||
|
|
||||||
|
|
||||||
// if user request help write it out to cout.
|
// if user request help write it out to cout.
|
||||||
@@ -419,9 +423,9 @@ int main(int argc, char** argv)
|
|||||||
osg::Vec3 pos(0.0f,0.0f,0.0f);
|
osg::Vec3 pos(0.0f,0.0f,0.0f);
|
||||||
osg::Vec3 topleft = pos;
|
osg::Vec3 topleft = pos;
|
||||||
osg::Vec3 bottomright = pos;
|
osg::Vec3 bottomright = pos;
|
||||||
|
|
||||||
bool xyPlane = fullscreen;
|
bool xyPlane = fullscreen;
|
||||||
|
|
||||||
for(int i=1;i<arguments.argc();++i)
|
for(int i=1;i<arguments.argc();++i)
|
||||||
{
|
{
|
||||||
if (arguments.isString(i))
|
if (arguments.isString(i))
|
||||||
@@ -433,9 +437,9 @@ int main(int argc, char** argv)
|
|||||||
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()<<std::endl;
|
||||||
|
|
||||||
geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane, flip));
|
geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane, flip));
|
||||||
|
|
||||||
bottomright = pos + osg::Vec3(static_cast<float>(image->s()),static_cast<float>(image->t()),0.0f);
|
bottomright = pos + osg::Vec3(static_cast<float>(image->s()),static_cast<float>(image->t()),0.0f);
|
||||||
|
|
||||||
if (xyPlane) pos.y() += image->t()*1.05f;
|
if (xyPlane) pos.y() += image->t()*1.05f;
|
||||||
@@ -444,10 +448,10 @@ int main(int argc, char** argv)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout<<"Unable to read file "<<arguments[i]<<std::endl;
|
std::cout<<"Unable to read file "<<arguments[i]<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the scene to render
|
// set the scene to render
|
||||||
viewer.setSceneData(geode.get());
|
viewer.setSceneData(geode.get());
|
||||||
|
|
||||||
@@ -496,3 +500,4 @@ int main(int argc, char** argv)
|
|||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public:
|
|||||||
|
|
||||||
if (_total > _limit)
|
if (_total > _limit)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -311,7 +311,7 @@ OcclusionQueryVisitor::apply( osg::Group& group )
|
|||||||
// A least one OQN was added below the current node.
|
// A least one OQN was added below the current node.
|
||||||
// Don't add one here to avoid hierarchical nesting.
|
// Don't add one here to avoid hierarchical nesting.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// There are no OQNs below this group. If the vertex
|
// There are no OQNs below this group. If the vertex
|
||||||
// count exceeds the threshold, add an OQN here.
|
// count exceeds the threshold, add an OQN here.
|
||||||
addOQN( group );
|
addOQN( group );
|
||||||
@@ -395,7 +395,7 @@ EnableQueryVisitor::apply( osg::OcclusionQueryNode& oqn )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DebugDisplayVisitor::apply( osg::OcclusionQueryNode& oqn )
|
DebugDisplayVisitor::apply( osg::OcclusionQueryNode& oqn )
|
||||||
{
|
{
|
||||||
oqn.setDebugDisplay( _debug );
|
oqn.setDebugDisplay( _debug );
|
||||||
@@ -489,9 +489,9 @@ StatisticsVisitor::getNumPassed() const
|
|||||||
// KetHandler --
|
// KetHandler --
|
||||||
// Allow user to do interesting things with an
|
// Allow user to do interesting things with an
|
||||||
// OcclusionQueryNode-enabled scene graph at run time.
|
// OcclusionQueryNode-enabled scene graph at run time.
|
||||||
class KeyHandler : public osgGA::GUIEventHandler
|
class KeyHandler : public osgGA::GUIEventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KeyHandler( osg::Node& node )
|
KeyHandler( osg::Node& node )
|
||||||
: _node( node ),
|
: _node( node ),
|
||||||
_enable( true ),
|
_enable( true ),
|
||||||
@@ -563,7 +563,7 @@ createBox()
|
|||||||
osg::ref_ptr<osg::Geode> box = new osg::Geode;
|
osg::ref_ptr<osg::Geode> box = new osg::Geode;
|
||||||
|
|
||||||
osg::StateSet* state = box->getOrCreateStateSet();
|
osg::StateSet* state = box->getOrCreateStateSet();
|
||||||
osg::PolygonMode* pm = new osg::PolygonMode(
|
osg::PolygonMode* pm = new osg::PolygonMode(
|
||||||
osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL );
|
osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL );
|
||||||
state->setAttributeAndModes( pm,
|
state->setAttributeAndModes( pm,
|
||||||
osg::StateAttribute::ON | osg::StateAttribute::PROTECTED );
|
osg::StateAttribute::ON | osg::StateAttribute::PROTECTED );
|
||||||
@@ -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 )
|
||||||
{
|
{
|
||||||
@@ -655,7 +656,7 @@ createRandomTriangles( unsigned int num )
|
|||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
srand( 0 );
|
srand( 0 );
|
||||||
#define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 )
|
#define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 )
|
||||||
for (i=0; i<num; i++)
|
for (i=0; i<num; i++)
|
||||||
{
|
{
|
||||||
osg::Vec3& v0 = (*v)[ i*3+0 ];
|
osg::Vec3& v0 = (*v)[ i*3+0 ];
|
||||||
@@ -672,7 +673,7 @@ createRandomTriangles( unsigned int num )
|
|||||||
geom->setColorBinding( osg::Geometry::BIND_PER_PRIMITIVE );
|
geom->setColorBinding( osg::Geometry::BIND_PER_PRIMITIVE );
|
||||||
c->resize( num );
|
c->resize( num );
|
||||||
|
|
||||||
#define RAND_0_TO_1 ( (rand()%10)*.1 )
|
#define RAND_0_TO_1 ( (rand()%10)*.1 )
|
||||||
for (i=0; i<num; i++)
|
for (i=0; i<num; i++)
|
||||||
{
|
{
|
||||||
osg::Vec4& c0 = (*c)[ i ];
|
osg::Vec4& c0 = (*c)[ i ];
|
||||||
@@ -731,12 +732,12 @@ int main(int argc, char** argv)
|
|||||||
arguments.writeErrorMessages(std::cout);
|
arguments.writeErrorMessages(std::cout);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
osgViewer::Viewer viewer( arguments );
|
osgViewer::Viewer viewer( arguments );
|
||||||
|
|
||||||
// add the state manipulator
|
// add the state manipulator
|
||||||
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
|
|
||||||
// add the stats handler
|
// add the stats handler
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler);
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
|
|
||||||
@@ -791,3 +792,4 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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()) );
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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__)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
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)
|
||||||
@@ -84,7 +84,6 @@ namespace osgAnimation
|
|||||||
|
|
||||||
~Animation() {}
|
~Animation() {}
|
||||||
|
|
||||||
std::string _name;
|
|
||||||
double _duration;
|
double _duration;
|
||||||
double _originalDuration;
|
double _originalDuration;
|
||||||
float _weight;
|
float _weight;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -27,6 +27,47 @@ namespace osgAnimation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
RigGeometry();
|
||||||
|
RigGeometry(const osg::Geometry& b);
|
||||||
|
RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
|
META_Object(osgAnimation, RigGeometry);
|
||||||
|
|
||||||
|
void setInfluenceMap(osgAnimation::VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
|
||||||
|
const osgAnimation::VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
|
||||||
|
osgAnimation::VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
|
||||||
|
|
||||||
|
const Skeleton* getSkeleton() const;
|
||||||
|
Skeleton* getSkeleton();
|
||||||
|
|
||||||
|
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
|
||||||
|
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
|
||||||
|
|
||||||
|
void buildVertexSet();
|
||||||
|
void buildTransformer(Skeleton* root);
|
||||||
|
void computeMatrixFromRootSkeleton();
|
||||||
|
|
||||||
|
virtual void transformSoftwareMethod();
|
||||||
|
const osgAnimation::VertexInfluenceSet& getVertexInfluenceSet() const { return _vertexInfluenceSet;}
|
||||||
|
|
||||||
|
const std::vector<osg::Vec3>& getPositionSource() const { return _positionSource;}
|
||||||
|
const std::vector<osg::Vec3>& getNormalSource() const { return _normalSource;}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
std::vector<osg::Vec3> _positionSource;
|
||||||
|
std::vector<osg::Vec3> _normalSource;
|
||||||
|
|
||||||
|
osgAnimation::VertexInfluenceSet _vertexInfluenceSet;
|
||||||
|
osg::ref_ptr<osgAnimation::VertexInfluenceMap> _vertexInfluenceMap;
|
||||||
|
osgAnimation::TransformVertexFunctor _transformVertexes;
|
||||||
|
|
||||||
|
osg::Matrix _matrixFromSkeletonToGeometry;
|
||||||
|
osg::Matrix _invMatrixFromSkeletonToGeometry;
|
||||||
|
osg::observer_ptr<Skeleton> _root;
|
||||||
|
bool _needToComputeMatrix;
|
||||||
|
|
||||||
|
|
||||||
struct FindNearestParentSkeleton : public osg::NodeVisitor
|
struct FindNearestParentSkeleton : public osg::NodeVisitor
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osgAnimation::Skeleton> _root;
|
osg::ref_ptr<osgAnimation::Skeleton> _root;
|
||||||
@@ -73,7 +114,7 @@ namespace osgAnimation
|
|||||||
/** BuildVertexTransformerVisitor is used to setup RigGeometry drawable
|
/** BuildVertexTransformerVisitor is used to setup RigGeometry drawable
|
||||||
* throw a subgraph.
|
* throw a subgraph.
|
||||||
*/
|
*/
|
||||||
struct BuildVertexTransformerVisitor : public osg::NodeVisitor
|
struct BuildVertexTransformerVisitor : public osg::NodeVisitor
|
||||||
{
|
{
|
||||||
osg::ref_ptr<Skeleton> _root;
|
osg::ref_ptr<Skeleton> _root;
|
||||||
BuildVertexTransformerVisitor(Skeleton* root): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _root = root;}
|
BuildVertexTransformerVisitor(Skeleton* root): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _root = root;}
|
||||||
@@ -94,46 +135,7 @@ namespace osgAnimation
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
RigGeometry();
|
|
||||||
RigGeometry(const osg::Geometry& b);
|
|
||||||
RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
|
||||||
|
|
||||||
virtual osg::Object* cloneType() const { return new RigGeometry(); }
|
|
||||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new RigGeometry(*this,copyop); }
|
|
||||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RigGeometry*>(obj)!=NULL; }
|
|
||||||
virtual const char* libraryName() const { return "osgAnimation"; }
|
|
||||||
virtual const char* className() const { return "RigGeometry"; }
|
|
||||||
|
|
||||||
|
|
||||||
void setInfluenceMap(osgAnimation::VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
|
|
||||||
const osgAnimation::VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
|
|
||||||
osgAnimation::VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
|
|
||||||
void buildVertexSet();
|
|
||||||
void buildTransformer(Skeleton* root);
|
|
||||||
void computeMatrixFromRootSkeleton();
|
|
||||||
|
|
||||||
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
|
|
||||||
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
|
|
||||||
|
|
||||||
const Skeleton* getSkeleton() const;
|
|
||||||
Skeleton* getSkeleton();
|
|
||||||
virtual void transformSoftwareMethod();
|
|
||||||
const osgAnimation::VertexInfluenceSet& getVertexInfluenceSet() const { return _vertexInfluenceSet;}
|
|
||||||
|
|
||||||
std::vector<osg::Vec3> _positionSource;
|
|
||||||
std::vector<osg::Vec3> _normalSource;
|
|
||||||
|
|
||||||
osgAnimation::VertexInfluenceSet _vertexInfluenceSet;
|
|
||||||
osg::ref_ptr<osgAnimation::VertexInfluenceMap> _vertexInfluenceMap;
|
|
||||||
osgAnimation::TransformVertexFunctor _transformVertexes;
|
|
||||||
|
|
||||||
osg::Matrix _matrixFromSkeletonToGeometry;
|
|
||||||
osg::Matrix _invMatrixFromSkeletonToGeometry;
|
|
||||||
osg::observer_ptr<Skeleton> _root;
|
|
||||||
bool _needToComputeMatrix;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,11 +27,11 @@
|
|||||||
namespace osgAnimation
|
namespace osgAnimation
|
||||||
{
|
{
|
||||||
|
|
||||||
class Action : public virtual osg::Object
|
class Action : public osg::Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
class Callback : public virtual osg::Object
|
class Callback : public osg::Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Callback(){}
|
Callback(){}
|
||||||
@@ -162,7 +162,7 @@ namespace osgAnimation
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Timeline : public virtual osg::Object
|
class Timeline : public osg::Object
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
typedef std::pair<unsigned int, osg::ref_ptr<Action> > FrameAction;
|
typedef std::pair<unsigned int, osg::ref_ptr<Action> > FrameAction;
|
||||||
|
|||||||
@@ -9,8 +9,9 @@
|
|||||||
// the Free Software Foundation; either version 2.1 of the License, or (at //
|
// the Free Software Foundation; either version 2.1 of the License, or (at //
|
||||||
// your option) any later version. //
|
// your option) any later version. //
|
||||||
//****************************************************************************//
|
//****************************************************************************//
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/** Loads a core compressed keyframe instance.
|
/* Loads a core compressed keyframe instance.
|
||||||
*
|
*
|
||||||
* This function loads a core compressed keyframe instance from a data source.
|
* This function loads a core compressed keyframe instance from a data source.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#define OSGDB_FSTREAM 1
|
#define OSGDB_FSTREAM 1
|
||||||
|
|
||||||
#include <osgDB/Export>
|
#include <osgDB/Export>
|
||||||
|
#include <osg/Export>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#ifndef OSGINTROSPECTION_EXPORTHDR
|
#ifndef OSGINTROSPECTION_EXPORTHDR
|
||||||
#define OSGINTROSPECTION_EXPORTHDR 1
|
#define OSGINTROSPECTION_EXPORTHDR 1
|
||||||
|
|
||||||
|
#include <osg/Config>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||||
#pragma warning( disable : 4251 )
|
#pragma warning( disable : 4251 )
|
||||||
|
|||||||
@@ -30,7 +30,17 @@
|
|||||||
#include <osg/Vec3>
|
#include <osg/Vec3>
|
||||||
#include <osg/BoundingBox>
|
#include <osg/BoundingBox>
|
||||||
|
|
||||||
#include <OpenThreads/ReadWriteMutex>
|
// 9th Febrary 2009, disabled the use of ReadWriteMutex as it looks like this
|
||||||
|
// is introducing threading problems due to threading problems in OpenThreads::ReadWriteMutex.
|
||||||
|
// #define OSGPARTICLE_USE_ReadWriteMutex
|
||||||
|
|
||||||
|
#ifdef OSGPARTICLE_USE_ReadWriteMutex
|
||||||
|
#include <OpenThreads/ReadWriteMutex>
|
||||||
|
#else
|
||||||
|
#include <OpenThreads/Mutex>
|
||||||
|
#include <OpenThreads/ScopedLock>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace osgParticle
|
namespace osgParticle
|
||||||
{
|
{
|
||||||
@@ -182,7 +192,17 @@ namespace osgParticle
|
|||||||
|
|
||||||
virtual osg::BoundingBox computeBound() const;
|
virtual osg::BoundingBox computeBound() const;
|
||||||
|
|
||||||
OpenThreads::ReadWriteMutex* getReadWriteMutex() const { return &_readWriteMutex; }
|
#ifdef OSGPARTICLE_USE_ReadWriteMutex
|
||||||
|
typedef OpenThreads::ReadWriteMutex ReadWriterMutex;
|
||||||
|
typedef OpenThreads::ScopedReadLock ScopedReadLock;
|
||||||
|
typedef OpenThreads::ScopedWriteLock ScopedWriteLock;
|
||||||
|
#else
|
||||||
|
typedef OpenThreads::Mutex ReadWriterMutex;
|
||||||
|
typedef OpenThreads::ScopedLock<OpenThreads::Mutex> ScopedReadLock;
|
||||||
|
typedef OpenThreads::ScopedLock<OpenThreads::Mutex> ScopedWriteLock;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ReadWriterMutex* getReadWriteMutex() const { return &_readWriteMutex; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -222,8 +242,7 @@ namespace osgParticle
|
|||||||
int _detail;
|
int _detail;
|
||||||
mutable int _draw_count;
|
mutable int _draw_count;
|
||||||
|
|
||||||
mutable OpenThreads::ReadWriteMutex _readWriteMutex;
|
mutable ReadWriterMutex _readWriteMutex;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// INLINE FUNCTIONS
|
// INLINE FUNCTIONS
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
|
|||||||
/** Get the const TerrainTile for a given TileID.*/
|
/** Get the const TerrainTile for a given TileID.*/
|
||||||
const TerrainTile* getTile(const TileID& tileID) const;
|
const TerrainTile* getTile(const TileID& tileID) const;
|
||||||
|
|
||||||
/** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from..*/
|
/** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.*/
|
||||||
void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; }
|
void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; }
|
||||||
|
|
||||||
/** Get the TerrainTechnique prototype */
|
/** Get the TerrainTechnique prototype */
|
||||||
|
|||||||
@@ -27,19 +27,13 @@ namespace osgTerrain {
|
|||||||
|
|
||||||
class Terrain;
|
class Terrain;
|
||||||
|
|
||||||
class TileID
|
class OSGTERRAIN_EXPORT TileID
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TileID():
|
TileID();
|
||||||
level(-1),
|
|
||||||
x(-1),
|
|
||||||
y(-1) {}
|
|
||||||
|
|
||||||
TileID(int in_level, int in_x, int in_y):
|
TileID(int in_level, int in_x, int in_y);
|
||||||
level(in_level),
|
|
||||||
x(in_x),
|
|
||||||
y(in_y) {}
|
|
||||||
|
|
||||||
bool operator == (const TileID& rhs) const
|
bool operator == (const TileID& rhs) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class OSGUTIL_EXPORT DrawElementTypeSimplifierVisitor : public osg::NodeVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor")
|
META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor");
|
||||||
|
|
||||||
void apply(osg::Geode& node);
|
void apply(osg::Geode& node);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -78,6 +78,12 @@ class OSGVOLUME_EXPORT Layer : public osg::Object
|
|||||||
void addProperty(Property* property);
|
void addProperty(Property* property);
|
||||||
|
|
||||||
|
|
||||||
|
/** Specify whether ImageLayer requires update traversal. */
|
||||||
|
virtual bool requiresUpdateTraversal() const { return false; }
|
||||||
|
|
||||||
|
/** Call update on the Layer.*/
|
||||||
|
virtual void update(osg::NodeVisitor& /*nv*/) {}
|
||||||
|
|
||||||
/** increment the modified count."*/
|
/** increment the modified count."*/
|
||||||
virtual void dirty() {};
|
virtual void dirty() {};
|
||||||
|
|
||||||
@@ -137,6 +143,10 @@ class OSGVOLUME_EXPORT ImageLayer : public Layer
|
|||||||
/** Compute the min color component of the image and then translate and pixels by this offset to make the new min component 0.*/
|
/** Compute the min color component of the image and then translate and pixels by this offset to make the new min component 0.*/
|
||||||
void translateMinToZero();
|
void translateMinToZero();
|
||||||
|
|
||||||
|
virtual bool requiresUpdateTraversal() const;
|
||||||
|
|
||||||
|
virtual void update(osg::NodeVisitor& /*nv*/);
|
||||||
|
|
||||||
virtual void dirty();
|
virtual void dirty();
|
||||||
virtual void setModifiedCount(unsigned int value);
|
virtual void setModifiedCount(unsigned int value);
|
||||||
virtual unsigned int getModifiedCount() const;
|
virtual unsigned int getModifiedCount() const;
|
||||||
@@ -175,6 +185,10 @@ class OSGVOLUME_EXPORT CompositeLayer : public Layer
|
|||||||
|
|
||||||
unsigned int getNumLayers() const { return _layers.size(); }
|
unsigned int getNumLayers() const { return _layers.size(); }
|
||||||
|
|
||||||
|
bool requiresUpdateTraversal() const;
|
||||||
|
|
||||||
|
virtual void update(osg::NodeVisitor& /*nv*/);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~CompositeLayer() {}
|
virtual ~CompositeLayer() {}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
||||||
*
|
*
|
||||||
* 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
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -40,11 +40,11 @@ class TransparencyProperty;
|
|||||||
class OSGVOLUME_EXPORT PropertyVisitor
|
class OSGVOLUME_EXPORT PropertyVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PropertyVisitor(bool traverseOnlyActiveChildren=true);
|
PropertyVisitor(bool traverseOnlyActiveChildren=true);
|
||||||
|
|
||||||
virtual ~PropertyVisitor() {}
|
virtual ~PropertyVisitor() {}
|
||||||
|
|
||||||
virtual void apply(Property&) {}
|
virtual void apply(Property&) {}
|
||||||
virtual void apply(CompositeProperty&);
|
virtual void apply(CompositeProperty&);
|
||||||
virtual void apply(SwitchProperty&);
|
virtual void apply(SwitchProperty&);
|
||||||
@@ -56,9 +56,9 @@ class OSGVOLUME_EXPORT PropertyVisitor
|
|||||||
virtual void apply(LightingProperty&) {}
|
virtual void apply(LightingProperty&) {}
|
||||||
virtual void apply(SampleDensityProperty&) {}
|
virtual void apply(SampleDensityProperty&) {}
|
||||||
virtual void apply(TransparencyProperty&) {}
|
virtual void apply(TransparencyProperty&) {}
|
||||||
|
|
||||||
bool _traverseOnlyActiveChildren;
|
bool _traverseOnlyActiveChildren;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -70,11 +70,11 @@ class OSGVOLUME_EXPORT Property : public osg::Object
|
|||||||
|
|
||||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||||
Property(const Property&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
Property(const Property&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, Property);
|
META_Object(osgVolume, Property);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~Property();
|
virtual ~Property();
|
||||||
@@ -88,7 +88,7 @@ class OSGVOLUME_EXPORT CompositeProperty : public Property
|
|||||||
|
|
||||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||||
CompositeProperty(const CompositeProperty& compositeProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
CompositeProperty(const CompositeProperty& compositeProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, CompositeProperty);
|
META_Object(osgVolume, CompositeProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
@@ -106,14 +106,14 @@ class OSGVOLUME_EXPORT CompositeProperty : public Property
|
|||||||
void addProperty(Property* property) { _properties.push_back(property); }
|
void addProperty(Property* property) { _properties.push_back(property); }
|
||||||
|
|
||||||
void removeProperty(unsigned int i) { _properties.erase(_properties.begin()+i); }
|
void removeProperty(unsigned int i) { _properties.erase(_properties.begin()+i); }
|
||||||
|
|
||||||
unsigned int getNumProperties() const { return _properties.size(); }
|
unsigned int getNumProperties() const { return _properties.size(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~CompositeProperty() {}
|
virtual ~CompositeProperty() {}
|
||||||
|
|
||||||
|
|
||||||
Properties _properties;
|
Properties _properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ class OSGVOLUME_EXPORT SwitchProperty : public CompositeProperty
|
|||||||
|
|
||||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||||
SwitchProperty(const SwitchProperty& switchProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
SwitchProperty(const SwitchProperty& switchProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, SwitchProperty);
|
META_Object(osgVolume, SwitchProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
@@ -141,7 +141,7 @@ class OSGVOLUME_EXPORT SwitchProperty : public CompositeProperty
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~SwitchProperty() {}
|
virtual ~SwitchProperty() {}
|
||||||
|
|
||||||
int _activeProperty;
|
int _activeProperty;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,12 +150,12 @@ class OSGVOLUME_EXPORT TransferFunctionProperty : public Property
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
TransferFunctionProperty(osg::TransferFunction* tf = 0);
|
TransferFunctionProperty(osg::TransferFunction* tf = 0);
|
||||||
|
|
||||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||||
TransferFunctionProperty(const TransferFunctionProperty& tfp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
TransferFunctionProperty(const TransferFunctionProperty& tfp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, TransferFunctionProperty);
|
META_Object(osgVolume, TransferFunctionProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
/** Set the transfer function.*/
|
/** Set the transfer function.*/
|
||||||
@@ -168,9 +168,9 @@ class OSGVOLUME_EXPORT TransferFunctionProperty : public Property
|
|||||||
const osg::TransferFunction* getTransferFunction() const { return _tf.get(); }
|
const osg::TransferFunction* getTransferFunction() const { return _tf.get(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~TransferFunctionProperty() {}
|
virtual ~TransferFunctionProperty() {}
|
||||||
|
|
||||||
osg::ref_ptr<osg::TransferFunction> _tf;
|
osg::ref_ptr<osg::TransferFunction> _tf;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -181,11 +181,11 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
ScalarProperty(const std::string& scaleName, float value);
|
ScalarProperty(const std::string& scaleName, float value);
|
||||||
|
|
||||||
ScalarProperty(const ScalarProperty& scalarProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
ScalarProperty(const ScalarProperty& scalarProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, ScalarProperty);
|
META_Object(osgVolume, ScalarProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
/** Set the value.*/
|
/** Set the value.*/
|
||||||
@@ -201,9 +201,9 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
|||||||
const osg::Uniform* getUniform() const { return _uniform.get(); }
|
const osg::Uniform* getUniform() const { return _uniform.get(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~ScalarProperty() {}
|
virtual ~ScalarProperty() {}
|
||||||
|
|
||||||
ScalarProperty();
|
ScalarProperty();
|
||||||
|
|
||||||
osg::ref_ptr<osg::Uniform> _uniform;
|
osg::ref_ptr<osg::Uniform> _uniform;
|
||||||
@@ -215,15 +215,15 @@ class OSGVOLUME_EXPORT IsoSurfaceProperty : public ScalarProperty
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
IsoSurfaceProperty(float value=1.0);
|
IsoSurfaceProperty(float value=1.0);
|
||||||
|
|
||||||
IsoSurfaceProperty(const IsoSurfaceProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
IsoSurfaceProperty(const IsoSurfaceProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, IsoSurfaceProperty);
|
META_Object(osgVolume, IsoSurfaceProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~IsoSurfaceProperty() {}
|
virtual ~IsoSurfaceProperty() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -232,24 +232,24 @@ class OSGVOLUME_EXPORT AlphaFuncProperty : public ScalarProperty
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
AlphaFuncProperty(float value=1.0);
|
AlphaFuncProperty(float value=1.0);
|
||||||
|
|
||||||
AlphaFuncProperty(const AlphaFuncProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
AlphaFuncProperty(const AlphaFuncProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, AlphaFuncProperty);
|
META_Object(osgVolume, AlphaFuncProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
virtual void setValue(float v);
|
virtual void setValue(float v);
|
||||||
|
|
||||||
osg::AlphaFunc* getAlphaFunc() { return _alphaFunc.get(); }
|
osg::AlphaFunc* getAlphaFunc() { return _alphaFunc.get(); }
|
||||||
|
|
||||||
const osg::AlphaFunc* getAlphaFunc() const { return _alphaFunc.get(); }
|
const osg::AlphaFunc* getAlphaFunc() const { return _alphaFunc.get(); }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~AlphaFuncProperty() {}
|
virtual ~AlphaFuncProperty() {}
|
||||||
|
|
||||||
osg::ref_ptr<osg::AlphaFunc> _alphaFunc;
|
osg::ref_ptr<osg::AlphaFunc> _alphaFunc;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -258,15 +258,15 @@ class OSGVOLUME_EXPORT MaximumIntensityProjectionProperty : public Property
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
MaximumIntensityProjectionProperty();
|
MaximumIntensityProjectionProperty();
|
||||||
|
|
||||||
MaximumIntensityProjectionProperty(const MaximumIntensityProjectionProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
MaximumIntensityProjectionProperty(const MaximumIntensityProjectionProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, MaximumIntensityProjectionProperty);
|
META_Object(osgVolume, MaximumIntensityProjectionProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~MaximumIntensityProjectionProperty() {}
|
virtual ~MaximumIntensityProjectionProperty() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -276,15 +276,15 @@ class OSGVOLUME_EXPORT LightingProperty : public Property
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
LightingProperty();
|
LightingProperty();
|
||||||
|
|
||||||
LightingProperty(const LightingProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
LightingProperty(const LightingProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, LightingProperty);
|
META_Object(osgVolume, LightingProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~LightingProperty() {}
|
virtual ~LightingProperty() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -294,15 +294,15 @@ class OSGVOLUME_EXPORT SampleDensityProperty : public ScalarProperty
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
SampleDensityProperty(float value=1.0);
|
SampleDensityProperty(float value=1.0);
|
||||||
|
|
||||||
SampleDensityProperty(const SampleDensityProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
SampleDensityProperty(const SampleDensityProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, SampleDensityProperty);
|
META_Object(osgVolume, SampleDensityProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~SampleDensityProperty() {}
|
virtual ~SampleDensityProperty() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -311,15 +311,15 @@ class OSGVOLUME_EXPORT TransparencyProperty : public ScalarProperty
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
TransparencyProperty(float value=1.0);
|
TransparencyProperty(float value=1.0);
|
||||||
|
|
||||||
TransparencyProperty(const TransparencyProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
TransparencyProperty(const TransparencyProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||||
|
|
||||||
META_Object(osgVolume, TransparencyProperty);
|
META_Object(osgVolume, TransparencyProperty);
|
||||||
|
|
||||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual ~TransparencyProperty() {}
|
virtual ~TransparencyProperty() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -327,9 +327,9 @@ class OSGVOLUME_EXPORT TransparencyProperty : public ScalarProperty
|
|||||||
class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisitor
|
class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CollectPropertiesVisitor(bool traverseOnlyActiveChildren=true);
|
CollectPropertiesVisitor(bool traverseOnlyActiveChildren=true);
|
||||||
|
|
||||||
virtual void apply(Property&);
|
virtual void apply(Property&);
|
||||||
virtual void apply(TransferFunctionProperty&);
|
virtual void apply(TransferFunctionProperty&);
|
||||||
virtual void apply(ScalarProperty&);
|
virtual void apply(ScalarProperty&);
|
||||||
@@ -339,7 +339,7 @@ class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisi
|
|||||||
virtual void apply(LightingProperty& lp);
|
virtual void apply(LightingProperty& lp);
|
||||||
virtual void apply(SampleDensityProperty& sdp);
|
virtual void apply(SampleDensityProperty& sdp);
|
||||||
virtual void apply(TransparencyProperty& tp);
|
virtual void apply(TransparencyProperty& tp);
|
||||||
|
|
||||||
osg::ref_ptr<TransferFunctionProperty> _tfProperty;
|
osg::ref_ptr<TransferFunctionProperty> _tfProperty;
|
||||||
osg::ref_ptr<IsoSurfaceProperty> _isoProperty;
|
osg::ref_ptr<IsoSurfaceProperty> _isoProperty;
|
||||||
osg::ref_ptr<AlphaFuncProperty> _afProperty;
|
osg::ref_ptr<AlphaFuncProperty> _afProperty;
|
||||||
@@ -347,27 +347,27 @@ class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisi
|
|||||||
osg::ref_ptr<LightingProperty> _lightingProperty;
|
osg::ref_ptr<LightingProperty> _lightingProperty;
|
||||||
osg::ref_ptr<SampleDensityProperty> _sampleDensityProperty;
|
osg::ref_ptr<SampleDensityProperty> _sampleDensityProperty;
|
||||||
osg::ref_ptr<TransparencyProperty> _transparencyProperty;
|
osg::ref_ptr<TransparencyProperty> _transparencyProperty;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class OSGVOLUME_EXPORT PropertyAdjustmentCallback : public osgGA::GUIEventHandler, public osg::StateSet::Callback
|
class OSGVOLUME_EXPORT PropertyAdjustmentCallback : public osgGA::GUIEventHandler, public osg::StateSet::Callback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PropertyAdjustmentCallback();
|
PropertyAdjustmentCallback();
|
||||||
|
|
||||||
PropertyAdjustmentCallback(const PropertyAdjustmentCallback&,const osg::CopyOp&) {}
|
PropertyAdjustmentCallback(const PropertyAdjustmentCallback&,const osg::CopyOp&) {}
|
||||||
|
|
||||||
META_Object(osgVolume,PropertyAdjustmentCallback);
|
META_Object(osgVolume,PropertyAdjustmentCallback);
|
||||||
|
|
||||||
void setKeyEventCycleForward(int key) { _cyleForwardKey = key; }
|
void setKeyEventCycleForward(int key) { _cyleForwardKey = key; }
|
||||||
int getKeyEventCyclesForward() const { return _cyleForwardKey; }
|
int getKeyEventCyclesForward() const { return _cyleForwardKey; }
|
||||||
|
|
||||||
void setKeyEventCycleBackward(int key) { _cyleBackwardKey = key; }
|
void setKeyEventCycleBackward(int key) { _cyleBackwardKey = key; }
|
||||||
int getKeyEventCyclesBackward() const { return _cyleBackwardKey; }
|
int getKeyEventCyclesBackward() const { return _cyleBackwardKey; }
|
||||||
|
|
||||||
void setKeyEventActivatesTransparenyAdjustment(int key) { _transparencyKey = key; }
|
void setKeyEventActivatesTransparencyAdjustment(int key) { _transparencyKey = key; }
|
||||||
int getKeyEventActivatesTransparenyAdjustment() const { return _transparencyKey; }
|
int getKeyEventActivatesTransparencyAdjustment() const { return _transparencyKey; }
|
||||||
|
|
||||||
void setKeyEventActivatesSampleDensityAdjustment(int key) { _sampleDensityKey = key; }
|
void setKeyEventActivatesSampleDensityAdjustment(int key) { _sampleDensityKey = key; }
|
||||||
int getKeyEventActivatesSampleAdjustment() const { return _sampleDensityKey; }
|
int getKeyEventActivatesSampleAdjustment() const { return _sampleDensityKey; }
|
||||||
@@ -382,7 +382,7 @@ class OSGVOLUME_EXPORT PropertyAdjustmentCallback : public osgGA::GUIEventHandle
|
|||||||
int _transparencyKey;
|
int _transparencyKey;
|
||||||
int _alphaFuncKey;
|
int _alphaFuncKey;
|
||||||
int _sampleDensityKey;
|
int _sampleDensityKey;
|
||||||
|
|
||||||
bool _updateTransparency;
|
bool _updateTransparency;
|
||||||
bool _updateAlphaCutOff;
|
bool _updateAlphaCutOff;
|
||||||
bool _updateSampleDensity;
|
bool _updateSampleDensity;
|
||||||
|
|||||||
@@ -26,21 +26,13 @@ namespace osgVolume {
|
|||||||
|
|
||||||
class Volume;
|
class Volume;
|
||||||
|
|
||||||
class TileID
|
class OSGVOLUME_EXPORT TileID
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TileID():
|
TileID();
|
||||||
level(-1),
|
|
||||||
x(-1),
|
|
||||||
y(-1),
|
|
||||||
z(-1) {}
|
|
||||||
|
|
||||||
TileID(int in_level, int in_x, int in_y, int in_z):
|
TileID(int in_level, int in_x, int in_y, int in_z);
|
||||||
level(in_level),
|
|
||||||
x(in_x),
|
|
||||||
y(in_y),
|
|
||||||
z(in_z) {}
|
|
||||||
|
|
||||||
bool operator == (const TileID& rhs) const
|
bool operator == (const TileID& rhs) const
|
||||||
{
|
{
|
||||||
@@ -115,7 +107,7 @@ class OSGVOLUME_EXPORT VolumeTile : public osg::Group
|
|||||||
const Locator* getLocator() const { return _locator.get(); }
|
const Locator* getLocator() const { return _locator.get(); }
|
||||||
|
|
||||||
|
|
||||||
void setLayer(Layer* layer) { _layer = layer; }
|
void setLayer(Layer* layer);
|
||||||
Layer* getLayer() { return _layer.get(); }
|
Layer* getLayer() { return _layer.get(); }
|
||||||
const Layer* getLayer() const { return _layer.get(); }
|
const Layer* getLayer() const { return _layer.get(); }
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class OSGWIDGET_EXPORT BrowserManager : public osg::Object
|
|||||||
|
|
||||||
virtual ~BrowserManager();
|
virtual ~BrowserManager();
|
||||||
|
|
||||||
META_Object(osgWidget,BrowserManager)
|
META_Object(osgWidget,BrowserManager);
|
||||||
|
|
||||||
std::string _application;
|
std::string _application;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#define OSGWIDGET_EXPORT_ 1
|
#define OSGWIDGET_EXPORT_ 1
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
#pragma warning( disable : 4121 )
|
||||||
#pragma warning( disable : 4244 )
|
#pragma warning( disable : 4244 )
|
||||||
#pragma warning( disable : 4251 )
|
#pragma warning( disable : 4251 )
|
||||||
#pragma warning( disable : 4267 )
|
#pragma warning( disable : 4267 )
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
|
||||||
*
|
*
|
||||||
* 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
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ class OSGWIDGET_EXPORT WindowManager: public osg::Switch, public UIObjectParent<
|
|||||||
_windowHeight = h;
|
_windowHeight = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrappers around the real calls. These only pertains to mouse buttons,
|
// Wrappers around the real calls. These only pertains to mouse buttons,
|
||||||
// particularly 3-button mice, although there are other more generic
|
// particularly 3-button mice, although there are other more generic
|
||||||
// "pointer" API methods.
|
// "pointer" API methods.
|
||||||
bool mousePushedLeft(float x, float y) {
|
bool mousePushedLeft(float x, float y) {
|
||||||
@@ -333,7 +333,7 @@ class OSGWIDGET_EXPORT WindowManager: public osg::Switch, public UIObjectParent<
|
|||||||
|
|
||||||
bool _handleMousePushed (float, float, bool&);
|
bool _handleMousePushed (float, float, bool&);
|
||||||
bool _handleMouseReleased (float, float, bool&);
|
bool _handleMouseReleased (float, float, bool&);
|
||||||
bool _haneldMouseScrolled (float, float, bool = false);
|
bool _handleMouseScrolled (float, float, bool = false);
|
||||||
void _getPointerXYDiff (float&, float&);
|
void _getPointerXYDiff (float&, float&);
|
||||||
void _updatePickWindow (const WidgetList*, point_type, point_type);
|
void _updatePickWindow (const WidgetList*, point_type, point_type);
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ EventInterface* WindowManager::getFirstEventInterface(T& container, Event& ev) {
|
|||||||
parent->getParentList(windowList);
|
parent->getParentList(windowList);
|
||||||
|
|
||||||
// A WindowList from getParentList includes the Window the method was called
|
// A WindowList from getParentList includes the Window the method was called
|
||||||
// on, and the entire tree of parentage.
|
// on, and the entire tree of parentage.
|
||||||
for(WindowList::iterator i = windowList.begin(); i != windowList.end(); i++) {
|
for(WindowList::iterator i = windowList.begin(); i != windowList.end(); i++) {
|
||||||
Window* window = i->get();
|
Window* window = i->get();
|
||||||
|
|
||||||
|
|||||||
@@ -198,13 +198,13 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
|
|||||||
if(status != 0 || my_policy == -1) {
|
if(status != 0 || my_policy == -1) {
|
||||||
|
|
||||||
printf("THREAD INFO (%d) : Get sched param: %s/%s\n",
|
printf("THREAD INFO (%d) : Get sched param: %s/%s\n",
|
||||||
unsigned int(thread->getProcessId()),
|
(unsigned int)(thread->getProcessId()),
|
||||||
strerror(status),
|
strerror(status),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
"THREAD INFO (%d) : Thread running at %s / Priority: %d\n",
|
"THREAD INFO (%d) : Thread running at %s / Priority: %d\n",
|
||||||
unsigned int(thread->getProcessId()),
|
(unsigned int)(thread->getProcessId()),
|
||||||
(my_policy == SCHED_FIFO ? "SCHEDULE_FIFO"
|
(my_policy == SCHED_FIFO ? "SCHEDULE_FIFO"
|
||||||
: (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN"
|
: (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN"
|
||||||
: (my_policy == SCHED_TS ? "SCHEDULE_TIME_SHARE"
|
: (my_policy == SCHED_TS ? "SCHEDULE_TIME_SHARE"
|
||||||
@@ -217,7 +217,7 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
|
|||||||
|
|
||||||
printf(
|
printf(
|
||||||
"THREAD INFO (%d) : Max priority: %d, Min priority: %d\n",
|
"THREAD INFO (%d) : Max priority: %d, Min priority: %d\n",
|
||||||
unsigned int(thread->getProcessId()),
|
(unsigned int)(thread->getProcessId()),
|
||||||
max_priority, min_priority);
|
max_priority, min_priority);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
notify(WARN)<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::endl;
|
notify(WARN)<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,7 +377,7 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
notify(WARN)<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::endl;
|
notify(WARN)<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ bool State::checkGLErrors(const char* str) const
|
|||||||
{
|
{
|
||||||
const char* error = (char*)gluErrorString(errorNo);
|
const char* error = (char*)gluErrorString(errorNo);
|
||||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '" << error<<"'";
|
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '" << error<<"'";
|
||||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo;
|
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo << std::dec;
|
||||||
|
|
||||||
if (str) osg::notify(WARN)<<" at "<<str<< std::endl;
|
if (str) osg::notify(WARN)<<" at "<<str<< std::endl;
|
||||||
else osg::notify(WARN)<<" in osg::State."<< std::endl;
|
else osg::notify(WARN)<<" in osg::State."<< std::endl;
|
||||||
@@ -996,7 +996,7 @@ bool State::checkGLErrors(const StateAttribute* attribute) const
|
|||||||
{
|
{
|
||||||
const char* error = (char*)gluErrorString(errorNo);
|
const char* error = (char*)gluErrorString(errorNo);
|
||||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
||||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::dec << std::endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,20 @@
|
|||||||
|
|
||||||
using namespace osgAnimation;
|
using namespace osgAnimation;
|
||||||
|
|
||||||
BasicAnimationManager::~BasicAnimationManager() {}
|
BasicAnimationManager::BasicAnimationManager()
|
||||||
|
: _lastUpdate(0.0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop)
|
||||||
|
: AnimationManagerBase(b,copyop)
|
||||||
|
, _lastUpdate(0.0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BasicAnimationManager::~BasicAnimationManager()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void BasicAnimationManager::stopAll()
|
void BasicAnimationManager::stopAll()
|
||||||
{
|
{
|
||||||
@@ -31,10 +44,6 @@ void BasicAnimationManager::stopAll()
|
|||||||
_animationsPlaying.clear();
|
_animationsPlaying.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicAnimationManager::BasicAnimationManager()
|
|
||||||
{
|
|
||||||
_lastUpdate = 0;
|
|
||||||
}
|
|
||||||
void BasicAnimationManager::playAnimation(Animation* pAnimation, int priority, float weight)
|
void BasicAnimationManager::playAnimation(Animation* pAnimation, int priority, float weight)
|
||||||
{
|
{
|
||||||
if (!findAnimation(pAnimation))
|
if (!findAnimation(pAnimation))
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SET(LIB_PUBLIC_HEADERS
|
|||||||
${HEADER_PATH}/EaseMotion
|
${HEADER_PATH}/EaseMotion
|
||||||
${HEADER_PATH}/Assert
|
${HEADER_PATH}/Assert
|
||||||
${HEADER_PATH}/Timeline
|
${HEADER_PATH}/Timeline
|
||||||
|
${HEADER_PATH}/RigGeometry
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1217,7 +1217,7 @@ bool DatabasePager::getRequestsInProgress() const
|
|||||||
if (getDataToMergeListSize()>0) return true;
|
if (getDataToMergeListSize()>0) return true;
|
||||||
|
|
||||||
for(DatabaseThreadList::const_iterator itr = _databaseThreads.begin();
|
for(DatabaseThreadList::const_iterator itr = _databaseThreads.begin();
|
||||||
itr != _databaseThreads.begin();
|
itr != _databaseThreads.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->getActive()) return true;
|
if ((*itr)->getActive()) return true;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* 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
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//The dlopen calls were not adding to OS X until 10.3
|
//The dlopen calls were not adding to OS X until 10.3
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#if !defined(MAC_OS_X_VERSION_10_3) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3)
|
#if !defined(MAC_OS_X_VERSION_10_3) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3)
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
using namespace osg;
|
using namespace osg;
|
||||||
using namespace osgDB;
|
using namespace osgDB;
|
||||||
|
|
||||||
DynamicLibrary::DynamicLibrary(const std::string& name,HANDLE handle)
|
DynamicLibrary::DynamicLibrary(const std::string& name, HANDLE handle)
|
||||||
{
|
{
|
||||||
_name = name;
|
_name = name;
|
||||||
_handle = handle;
|
_handle = handle;
|
||||||
@@ -67,7 +67,7 @@ DynamicLibrary::~DynamicLibrary()
|
|||||||
shl_unload (static_cast<shl_t>(_handle));
|
shl_unload (static_cast<shl_t>(_handle));
|
||||||
#else // other unix
|
#else // other unix
|
||||||
dlclose(_handle);
|
dlclose(_handle);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ DynamicLibrary* DynamicLibrary::loadLibrary(const std::string& libraryName)
|
|||||||
std::string fullLibraryName = osgDB::findLibraryFile(libraryName);
|
std::string fullLibraryName = osgDB::findLibraryFile(libraryName);
|
||||||
if (!fullLibraryName.empty()) handle = getLibraryHandle( fullLibraryName ); // try the lib we have found
|
if (!fullLibraryName.empty()) handle = getLibraryHandle( fullLibraryName ); // try the lib we have found
|
||||||
else handle = getLibraryHandle( libraryName ); // havn't found a lib ourselves, see if the OS can find it simply from the library name.
|
else handle = getLibraryHandle( libraryName ); // havn't found a lib ourselves, see if the OS can find it simply from the library name.
|
||||||
|
|
||||||
if (handle) return new DynamicLibrary(libraryName,handle);
|
if (handle) return new DynamicLibrary(libraryName,handle);
|
||||||
|
|
||||||
// else no lib found so report errors.
|
// else no lib found so report errors.
|
||||||
@@ -115,9 +115,21 @@ DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string& libr
|
|||||||
localLibraryName = "./" + libraryName;
|
localLibraryName = "./" + libraryName;
|
||||||
else
|
else
|
||||||
localLibraryName = libraryName;
|
localLibraryName = libraryName;
|
||||||
|
|
||||||
handle = dlopen( localLibraryName.c_str(), RTLD_LAZY | RTLD_GLOBAL);
|
handle = dlopen( localLibraryName.c_str(), RTLD_LAZY | RTLD_GLOBAL);
|
||||||
if( handle == NULL )
|
if( handle == NULL )
|
||||||
notify(INFO) << "DynamicLibrary::getLibraryHandle( "<< libraryName << ") - dlopen(): " << dlerror() << std::endl;
|
{
|
||||||
|
if (fileExists(localLibraryName))
|
||||||
|
{
|
||||||
|
notify(WARN) << "Warning: dynamic library '" << libraryName << "' exists, but an error occurred while trying to open it:" << std::endl;
|
||||||
|
notify(WARN) << dlerror() << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
notify(INFO) << "Warning: dynamic library '" << libraryName << "' does not exist (or isn't readable):" << std::endl;
|
||||||
|
notify(INFO) << dlerror() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
@@ -155,3 +167,4 @@ DynamicLibrary::PROC_ADDRESS DynamicLibrary::getProcAddress(const std::string& p
|
|||||||
return sym;
|
return sym;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -672,7 +672,6 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
|
|||||||
return prepend+"osgdb_"+lowercase_ext+".sl";
|
return prepend+"osgdb_"+lowercase_ext+".sl";
|
||||||
#else
|
#else
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma message(OSG_DEBUG_POSTFIX_WITH_QUOTES)
|
|
||||||
return prepend+"osgdb_"+lowercase_ext+ OSG_DEBUG_POSTFIX_WITH_QUOTES + ".so";
|
return prepend+"osgdb_"+lowercase_ext+ OSG_DEBUG_POSTFIX_WITH_QUOTES + ".so";
|
||||||
#else
|
#else
|
||||||
return prepend+"osgdb_"+lowercase_ext+".so";
|
return prepend+"osgdb_"+lowercase_ext+".so";
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ void ConnectedParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) co
|
|||||||
{
|
{
|
||||||
osg::State& state = *renderInfo.getState();
|
osg::State& state = *renderInfo.getState();
|
||||||
|
|
||||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
ScopedReadLock lock(_readWriteMutex);
|
||||||
|
|
||||||
const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
|
const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
|
||||||
if (!particle) return;
|
if (!particle) return;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
|
|||||||
{
|
{
|
||||||
if (nv.getFrameStamp())
|
if (nv.getFrameStamp())
|
||||||
{
|
{
|
||||||
OpenThreads::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
ParticleSystem::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
||||||
|
|
||||||
//added- 1/17/06- bgandere@nps.edu
|
//added- 1/17/06- bgandere@nps.edu
|
||||||
//a check to make sure we havent updated yet this frame
|
//a check to make sure we havent updated yet this frame
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
|
|||||||
{
|
{
|
||||||
osg::State& state = *renderInfo.getState();
|
osg::State& state = *renderInfo.getState();
|
||||||
|
|
||||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
ScopedReadLock lock(_readWriteMutex);
|
||||||
|
|
||||||
// update the frame count, so other objects can detect when
|
// update the frame count, so other objects can detect when
|
||||||
// this particle system is culled
|
// this particle system is culled
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void osgParticle::ParticleSystemUpdater::traverse(osg::NodeVisitor& nv)
|
|||||||
{
|
{
|
||||||
ParticleSystem* ps = i->get();
|
ParticleSystem* ps = i->get();
|
||||||
|
|
||||||
OpenThreads::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
ParticleSystem::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
||||||
|
|
||||||
if (!ps->isFrozen() && (ps->getLastFrameNumber() >= (nv.getFrameStamp()->getFrameNumber() - 1) || !ps->getFreezeOnCull()))
|
if (!ps->isFrozen() && (ps->getLastFrameNumber() >= (nv.getFrameStamp()->getFrameNumber() - 1) || !ps->getFreezeOnCull()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 5
|
||||||
|
|
||||||
|
#include <osg/Config>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||||
// disable '=' : conversion from 'int' to 'char', possible loss of data style warnings
|
// disable '=' : conversion from 'int' to 'char', possible loss of data style warnings
|
||||||
#pragma warning( disable : 4244)
|
#pragma warning( disable : 4244)
|
||||||
|
|||||||
@@ -2261,7 +2261,7 @@ bool CameraConfig::parseFile( const std::string &file )
|
|||||||
execlp( cpp_path, "cpp", "-P", 0L );
|
execlp( cpp_path, "cpp", "-P", 0L );
|
||||||
else
|
else
|
||||||
*/
|
*/
|
||||||
execlp( cpp_path, "cpp", "-P", fileName.c_str(), NULL );
|
execlp( cpp_path, "cpp", "-P", fileName.c_str(), (char *)NULL );
|
||||||
|
|
||||||
// This should not execute unless an error happens
|
// This should not execute unless an error happens
|
||||||
perror( "execlp" );
|
perror( "execlp" );
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ EasyCurl::EasyCurl()
|
|||||||
|
|
||||||
curl_easy_setopt(_curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
|
curl_easy_setopt(_curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
|
||||||
curl_easy_setopt(_curl, CURLOPT_WRITEFUNCTION, StreamMemoryCallback);
|
curl_easy_setopt(_curl, CURLOPT_WRITEFUNCTION, StreamMemoryCallback);
|
||||||
|
curl_easy_setopt(_curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
EasyCurl::~EasyCurl()
|
EasyCurl::~EasyCurl()
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
IF (WIN32)
|
||||||
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} )
|
||||||
|
ELSE (WIN32)
|
||||||
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
||||||
|
ENDIF (WIN32)
|
||||||
|
|
||||||
SET(TARGET_SRC
|
SET(TARGET_SRC
|
||||||
daeReader.cpp
|
daeReader.cpp
|
||||||
@@ -21,39 +25,35 @@ SET(TARGET_H
|
|||||||
domSourceReader.h
|
domSourceReader.h
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (COLLADA_STATIC_LIBRARY)
|
|
||||||
SET(COLLADA_USE_STATIC "YES")
|
|
||||||
ELSE(COLLADA_STATIC_LIBRARY)
|
|
||||||
SET(COLLADA_USE_STATIC "NO")
|
|
||||||
ENDIF(COLLADA_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
IF (COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
IF (COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
OPTION(COLLADA_USE_STATIC "Set to ON to build OpenSceneGraph with static Collada support." OFF)
|
OPTION(COLLADA_USE_STATIC "Set to ON to build OpenSceneGraph with static Collada support." OFF)
|
||||||
MARK_AS_ADVANCED(COLLADA_USE_STATIC)
|
|
||||||
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
IF (WIN32)
|
ELSE(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
IF (COLLADA_USE_STATIC)
|
IF (COLLADA_STATIC_LIBRARY)
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES libxml2 pcrecpp pcre)
|
SET(COLLADA_USE_STATIC "YES")
|
||||||
ELSE (COLLADA_USE_STATIC)
|
ELSE(COLLADA_STATIC_LIBRARY)
|
||||||
ADD_DEFINITIONS(-DDOM_DYNAMIC)
|
SET(COLLADA_USE_STATIC "NO")
|
||||||
ENDIF(COLLADA_USE_STATIC)
|
ENDIF(COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
ELSE (WIN32)
|
ENDIF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
IF(COLLADA_USE_STATIC)
|
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2 pcrecpp)
|
|
||||||
ELSE(COLLADA_USE_STATIC)
|
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES collada14dom xml2)
|
|
||||||
ENDIF(COLLADA_USE_STATIC)
|
|
||||||
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
IF (COLLADA_USE_STATIC)
|
IF (COLLADA_USE_STATIC)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY)
|
IF(WIN32)
|
||||||
|
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
|
||||||
|
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_ZLIB_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_PCRE_LIBRARY COLLADA_MINIZIP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
|
ENDIF(WIN32)
|
||||||
ELSE (COLLADA_USE_STATIC)
|
ELSE (COLLADA_USE_STATIC)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
IF(WIN32)
|
||||||
|
ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB)
|
||||||
|
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
|
ELSE(WIN32)
|
||||||
|
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
||||||
|
ENDIF(WIN32)
|
||||||
ENDIF(COLLADA_USE_STATIC)
|
ENDIF(COLLADA_USE_STATIC)
|
||||||
|
|
||||||
SET(TARGET_ADDED_LIBRARIES osgSim )
|
SET(TARGET_ADDED_LIBRARIES osgSim )
|
||||||
|
|||||||
@@ -1197,10 +1197,8 @@ void daeReader::processTransparencySettings( domCommon_transparent_type *ctt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
domFloat Transparency;
|
domFloat Transparency = 1.0f;
|
||||||
if (NULL == pTransparency)
|
if (NULL != pTransparency)
|
||||||
Transparency = 1.0f;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (NULL != pTransparency->getFloat())
|
if (NULL != pTransparency->getFloat())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
|||||||
osg::ref_ptr<osg::RefMatrix> matrix = new osg::RefMatrix;
|
osg::ref_ptr<osg::RefMatrix> matrix = new osg::RefMatrix;
|
||||||
osg::ref_ptr<osg::Image> image;
|
osg::ref_ptr<osg::Image> image;
|
||||||
unsigned int imageNum = 0;
|
unsigned int imageNum = 0;
|
||||||
EP_Representation pixelRep;
|
EP_Representation pixelRep = EPR_Uint8;
|
||||||
int numPlanes = 0;
|
int numPlanes = 0;
|
||||||
GLenum pixelFormat = 0;
|
GLenum pixelFormat = 0;
|
||||||
GLenum dataType = 0;
|
GLenum dataType = 0;
|
||||||
@@ -448,7 +448,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
|||||||
double pixelSize_x = 1.0;
|
double pixelSize_x = 1.0;
|
||||||
double sliceThickness = 1.0;
|
double sliceThickness = 1.0;
|
||||||
double imagePositionPatient[3] = {0, 0, 0};
|
double imagePositionPatient[3] = {0, 0, 0};
|
||||||
double imageOrientationPatient[6] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0 };
|
double imageOrientationPatient[6] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0 };
|
||||||
Uint16 numOfSlices = 1;
|
Uint16 numOfSlices = 1;
|
||||||
|
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
@@ -507,7 +507,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
|||||||
// patient position
|
// patient position
|
||||||
for(int i=0; i<3; ++i)
|
for(int i=0; i<3; ++i)
|
||||||
{
|
{
|
||||||
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImagePositionPatient, imagePositionPatient[i],i).good())
|
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImagePositionPatient, imagePositionPatient[i],i).good())
|
||||||
{
|
{
|
||||||
notice()<<"Read DCM_ImagePositionPatient["<<i<<"], "<<imagePositionPatient[i]<<std::endl;
|
notice()<<"Read DCM_ImagePositionPatient["<<i<<"], "<<imagePositionPatient[i]<<std::endl;
|
||||||
}
|
}
|
||||||
@@ -523,7 +523,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
|||||||
for(int i=0; i<6; ++i)
|
for(int i=0; i<6; ++i)
|
||||||
{
|
{
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good())
|
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good())
|
||||||
{
|
{
|
||||||
imageOrientationPatient[i] = value;
|
imageOrientationPatient[i] = value;
|
||||||
notice()<<"Read imageOrientationPatient["<<i<<"], "<<imageOrientationPatient[i]<<std::endl;
|
notice()<<"Read imageOrientationPatient["<<i<<"], "<<imageOrientationPatient[i]<<std::endl;
|
||||||
@@ -677,7 +677,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
|||||||
|
|
||||||
matrix->preMult(osg::Matrix::scale(double(image->s()), double(image->t()), double(image->r())));
|
matrix->preMult(osg::Matrix::scale(double(image->s()), double(image->t()), double(image->r())));
|
||||||
|
|
||||||
notice()<<"Image dimensions = "<<image->s()<<", "<<image->t()<<", "<<image->r()<<" pixelFormat=0x"<<std::hex<<pixelFormat<<" dataType=0x"<<std::hex<<dataType<<std::endl;
|
notice()<<"Image dimensions = "<<image->s()<<", "<<image->t()<<", "<<image->r()<<" pixelFormat=0x"<<std::hex<<pixelFormat<<" dataType=0x"<<std::hex<<dataType<<std::dec<<std::endl;
|
||||||
}
|
}
|
||||||
else if (pixelData->getPlanes()>numPlanes ||
|
else if (pixelData->getPlanes()>numPlanes ||
|
||||||
pixelData->getRepresentation()>pixelRep)
|
pixelData->getRepresentation()>pixelRep)
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ ELSE(WIN32 OR APPLE)
|
|||||||
|
|
||||||
ENDIF(WIN32 OR APPLE)
|
ENDIF(WIN32 OR APPLE)
|
||||||
|
|
||||||
|
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing=0")
|
||||||
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
|
||||||
SET(TARGET_ADDED_LIBRARIES osgWidget osgViewer)
|
SET(TARGET_ADDED_LIBRARIES osgWidget osgViewer)
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ D changeType4(S src)
|
|||||||
char* src_ptr = reinterpret_cast<char*>(&src);
|
char* src_ptr = reinterpret_cast<char*>(&src);
|
||||||
for(int i=0; i<4; ++i)
|
for(int i=0; i<4; ++i)
|
||||||
{
|
{
|
||||||
*dest_ptr = *src_ptr;
|
dest_ptr[i] = src_ptr[i];
|
||||||
}
|
}
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,6 +264,10 @@ class OSGReaderWriter : public ReaderWriter
|
|||||||
{
|
{
|
||||||
fout.setOutputTextureFiles(true);
|
fout.setOutputTextureFiles(true);
|
||||||
}
|
}
|
||||||
|
if (opt=="OutputShaderFiles")
|
||||||
|
{
|
||||||
|
fout.setOutputShaderFiles(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ bool FluidProgram_readLocalData(osg::Object &obj, osgDB::Input &fr)
|
|||||||
|
|
||||||
if (fr[0].matchWord("density")) {
|
if (fr[0].matchWord("density")) {
|
||||||
if (fr[1].getFloat(f)) {
|
if (fr[1].getFloat(f)) {
|
||||||
myobj.setFluidViscosity(f);
|
myobj.setFluidDensity(f);
|
||||||
fr += 2;
|
fr += 2;
|
||||||
itAdvanced = true;
|
itAdvanced = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
|
|||||||
image = osgDB::readRefImageFile( filename );
|
image = osgDB::readRefImageFile( filename );
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::notify(osg::INFO)<<"osgVolume::ImageLyaer image read: "<<filename<<" pixelFormat "<<std::hex<<image->getPixelFormat()<<" textureFormat "<<image->getInternalTextureFormat()<<" dataType "<<image->getDataType()<<std::endl;
|
osg::notify(osg::INFO)<<"osgVolume::ImageLayer image read: "<<filename<<" pixelFormat "<<std::hex<<image->getPixelFormat()<<" textureFormat "<<image->getInternalTextureFormat()<<" dataType "<<image->getDataType()<<std::dec<<std::endl;
|
||||||
|
|
||||||
if (image.valid())
|
if (image.valid())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ QuicktimeImportExport::QuicktimeImportExport()
|
|||||||
: _error(0),
|
: _error(0),
|
||||||
_lastError("")
|
_lastError("")
|
||||||
{
|
{
|
||||||
initQuicktime();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,81 +16,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QuicktimeInitializer : public osg::Referenced {
|
|
||||||
public:
|
|
||||||
QuicktimeInitializer() :osg::Referenced() {
|
|
||||||
|
|
||||||
#ifndef __APPLE__
|
|
||||||
InitializeQTML(0);
|
|
||||||
#endif
|
|
||||||
OSErr err = EnterMovies();
|
|
||||||
if (err!=0)
|
|
||||||
osg::notify(osg::FATAL) << "Error while initializing quicktime: " << err << endl;
|
|
||||||
else
|
|
||||||
osg::notify(osg::DEBUG_INFO) << "Quicktime initialized successfully" << endl;
|
|
||||||
|
|
||||||
static bool registered = false;
|
|
||||||
|
|
||||||
if (!registered){
|
|
||||||
registerQTReader();
|
|
||||||
registered = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
~QuicktimeInitializer() {
|
|
||||||
#ifndef __APPLE__
|
|
||||||
ExitMovies();
|
|
||||||
#endif
|
|
||||||
//osg::notify(osg::DEBUG_INFO) << "Quicktime deinitialized successfully" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void registerQTReader() {
|
|
||||||
osgDB::Registry* r = osgDB::Registry::instance();
|
|
||||||
r->addFileExtensionAlias("mov", "qt");
|
|
||||||
|
|
||||||
#ifdef QT_HANDLE_IMAGES_ALSO
|
|
||||||
r->addFileExtensionAlias("jpg", "qt");
|
|
||||||
r->addFileExtensionAlias("jpe", "qt");
|
|
||||||
r->addFileExtensionAlias("jpeg", "qt");
|
|
||||||
r->addFileExtensionAlias("tif", "qt");
|
|
||||||
r->addFileExtensionAlias("tiff", "qt");
|
|
||||||
r->addFileExtensionAlias("gif", "qt");
|
|
||||||
r->addFileExtensionAlias("png", "qt");
|
|
||||||
r->addFileExtensionAlias("psd", "qt");
|
|
||||||
r->addFileExtensionAlias("tga", "qt");
|
|
||||||
r->addFileExtensionAlias("mov", "qt");
|
|
||||||
r->addFileExtensionAlias("avi", "qt");
|
|
||||||
r->addFileExtensionAlias("mpg", "qt");
|
|
||||||
r->addFileExtensionAlias("mpv", "qt");
|
|
||||||
r->addFileExtensionAlias("dv", "qt");
|
|
||||||
r->addFileExtensionAlias("mp4", "qt");
|
|
||||||
r->addFileExtensionAlias("m4v", "qt");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void initQuicktime(bool erase) {
|
|
||||||
|
|
||||||
static osg::ref_ptr<QuicktimeInitializer> s_qt_init = new QuicktimeInitializer();
|
|
||||||
if (erase) {
|
|
||||||
s_qt_init = NULL;
|
|
||||||
} else if (!s_qt_init.valid())
|
|
||||||
{
|
|
||||||
s_qt_init = new QuicktimeInitializer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void exitQuicktime() {
|
|
||||||
initQuicktime(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// MakeFSSPecFromPath
|
// MakeFSSPecFromPath
|
||||||
// wandelt einen Posix-Pfad in ein FSSpec um.
|
// wandelt einen Posix-Pfad in ein FSSpec um.
|
||||||
|
|||||||
@@ -49,16 +49,6 @@
|
|||||||
#define OffsetRect MacOffsetRect
|
#define OffsetRect MacOffsetRect
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inits Quicktime, if erase = true, the Quicktime-stuff gets cleaned, call it before your app exits
|
|
||||||
* @param erase true, if you want to cleanup quicktime-related stuff
|
|
||||||
*/
|
|
||||||
void initQuicktime(bool erase = false);
|
|
||||||
|
|
||||||
/** cleans up all quicktime-related stuff */
|
|
||||||
void exitQuicktime();
|
|
||||||
|
|
||||||
/** constructs an FSSpec out of an path */
|
/** constructs an FSSpec out of an path */
|
||||||
OSStatus MakeFSSpecFromPath(const char* path, FSSpec* spec);
|
OSStatus MakeFSSpecFromPath(const char* path, FSSpec* spec);
|
||||||
|
|||||||
@@ -36,46 +36,94 @@
|
|||||||
|
|
||||||
using namespace osg;
|
using namespace osg;
|
||||||
|
|
||||||
// This class is used as a helper to de-initialize
|
|
||||||
// properly quicktime, when the last media loaded
|
|
||||||
// with the quicktime plugin is released.
|
|
||||||
// All loaded media must be added to the observer
|
|
||||||
// (see ReaderWriterQT::readImage() function)
|
|
||||||
class QuicktimeExitObserver : public osg::Observer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
QuicktimeExitObserver () : _instanceCount(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual ~QuicktimeExitObserver()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
void addMedia(Image* ptr)
|
|
||||||
{
|
|
||||||
ptr->addObserver(this);
|
|
||||||
++ _instanceCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void objectDeleted(void*)
|
|
||||||
{
|
|
||||||
-- _instanceCount;
|
|
||||||
if(_instanceCount== 0)
|
|
||||||
exitQuicktime();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
unsigned int _instanceCount;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ReaderWriterQT : public osgDB::ReaderWriter
|
class ReaderWriterQT : public osgDB::ReaderWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
// This class is used as a helper to de-initialize
|
||||||
|
// properly quicktime, when the last media loaded
|
||||||
|
// with the quicktime plugin is released.
|
||||||
|
// All loaded media must be added to the observer
|
||||||
|
// (see ReaderWriterQT::readImage() function)
|
||||||
|
class QuicktimeInitializer : public osg::Observer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
QuicktimeInitializer ():
|
||||||
|
_instanceCount(0),
|
||||||
|
_setup(false)
|
||||||
|
{}
|
||||||
|
|
||||||
|
virtual ~QuicktimeInitializer()
|
||||||
|
{
|
||||||
|
// When we get here, the exit() function
|
||||||
|
// should have been called, when last media was released.
|
||||||
|
// In case no media has been added after initialization,
|
||||||
|
// let's perform an extra check
|
||||||
|
if (_setup && _instanceCount == 0)
|
||||||
|
{
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void addMedia(Image* ptr)
|
||||||
|
{
|
||||||
|
ptr->addObserver(this);
|
||||||
|
++ _instanceCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void objectDeleted(void*)
|
||||||
|
{
|
||||||
|
-- _instanceCount;
|
||||||
|
if(_instanceCount== 0)
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void init()
|
||||||
|
{
|
||||||
|
if (!_setup)
|
||||||
|
{
|
||||||
|
#ifndef __APPLE__
|
||||||
|
InitializeQTML(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
OSErr err = EnterMovies();
|
||||||
|
if (err!=0)
|
||||||
|
osg::notify(osg::FATAL) << "Error while initializing quicktime: " << err << std::endl;
|
||||||
|
else
|
||||||
|
osg::notify(osg::DEBUG_INFO) << "Quicktime initialized successfully" << std::endl;
|
||||||
|
|
||||||
|
_setup = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void exit()
|
||||||
|
{
|
||||||
|
#ifndef __APPLE__
|
||||||
|
ExitMovies();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_setup = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
unsigned int _instanceCount;
|
||||||
|
bool _setup;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ReaderWriterQT::ReaderWriterQT()
|
ReaderWriterQT::ReaderWriterQT()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
registerQtReader();
|
||||||
|
|
||||||
|
|
||||||
supportsExtension("mov","Movie format");
|
supportsExtension("mov","Movie format");
|
||||||
supportsExtension("mpg","Movie format");
|
supportsExtension("mpg","Movie format");
|
||||||
supportsExtension("mpv","Movie format");
|
supportsExtension("mpv","Movie format");
|
||||||
@@ -228,8 +276,9 @@ public:
|
|||||||
// Quicktime initialization is done here, when a media is found
|
// Quicktime initialization is done here, when a media is found
|
||||||
// and before any image or movie is loaded.
|
// and before any image or movie is loaded.
|
||||||
// After the first call the function does nothing.
|
// After the first call the function does nothing.
|
||||||
// The cleaning up is left to the QuicktimeExitObserver (see below)
|
// The cleaning up is left to the QuicktimeInitializer (see below)
|
||||||
initQuicktime();
|
_qtExitObserver.init();
|
||||||
|
|
||||||
//
|
//
|
||||||
QuicktimeLiveImageStream* p_qt_image_stream = new QuicktimeLiveImageStream(osgDB::getNameLessExtension(file));
|
QuicktimeLiveImageStream* p_qt_image_stream = new QuicktimeLiveImageStream(osgDB::getNameLessExtension(file));
|
||||||
// add the media to the observer for proper clean up on exit
|
// add the media to the observer for proper clean up on exit
|
||||||
@@ -252,8 +301,8 @@ public:
|
|||||||
// Quicktime initialization is done here, when a media is found
|
// Quicktime initialization is done here, when a media is found
|
||||||
// and before any image or movie is loaded.
|
// and before any image or movie is loaded.
|
||||||
// After the first call the function does nothing.
|
// After the first call the function does nothing.
|
||||||
// The cleaning up is left to the QuicktimeExitObserver (see below)
|
// The cleaning up is left to the QuicktimeInitializer (see below)
|
||||||
initQuicktime();
|
_qtExitObserver.init();
|
||||||
|
|
||||||
|
|
||||||
// if the file is a movie file then load as an ImageStream.
|
// if the file is a movie file then load as an ImageStream.
|
||||||
@@ -316,6 +365,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_qtExitObserver.init();
|
||||||
|
|
||||||
QuicktimeImportExport importer;
|
QuicktimeImportExport importer;
|
||||||
osg::ref_ptr<osg::Image> image = importer.readFromStream(is, filename, sizeHint);
|
osg::ref_ptr<osg::Image> image = importer.readFromStream(is, filename, sizeHint);
|
||||||
@@ -334,7 +385,7 @@ public:
|
|||||||
std::string ext = osgDB::getFileExtension(fileName);
|
std::string ext = osgDB::getFileExtension(fileName);
|
||||||
if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
|
if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
|
||||||
|
|
||||||
initQuicktime();
|
_qtExitObserver.init();
|
||||||
|
|
||||||
//Buidl map of extension <-> osFileTypes
|
//Buidl map of extension <-> osFileTypes
|
||||||
std::map<std::string, OSType> extmap;
|
std::map<std::string, OSType> extmap;
|
||||||
@@ -386,6 +437,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_qtExitObserver.init();
|
||||||
|
|
||||||
QuicktimeImportExport exporter;
|
QuicktimeImportExport exporter;
|
||||||
exporter.writeToStream(os, const_cast<osg::Image*>(&img), filename);
|
exporter.writeToStream(os, const_cast<osg::Image*>(&img), filename);
|
||||||
|
|
||||||
@@ -395,8 +448,35 @@ public:
|
|||||||
return WriteResult::ERROR_IN_WRITING_FILE;
|
return WriteResult::ERROR_IN_WRITING_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
mutable QuicktimeExitObserver _qtExitObserver;
|
//internal utils
|
||||||
|
void registerQtReader() const
|
||||||
|
{
|
||||||
|
osgDB::Registry* r = osgDB::Registry::instance();
|
||||||
|
r->addFileExtensionAlias("mov", "qt");
|
||||||
|
|
||||||
|
#ifdef QT_HANDLE_IMAGES_ALSO
|
||||||
|
r->addFileExtensionAlias("jpg", "qt");
|
||||||
|
r->addFileExtensionAlias("jpe", "qt");
|
||||||
|
r->addFileExtensionAlias("jpeg", "qt");
|
||||||
|
r->addFileExtensionAlias("tif", "qt");
|
||||||
|
r->addFileExtensionAlias("tiff", "qt");
|
||||||
|
r->addFileExtensionAlias("gif", "qt");
|
||||||
|
r->addFileExtensionAlias("png", "qt");
|
||||||
|
r->addFileExtensionAlias("psd", "qt");
|
||||||
|
r->addFileExtensionAlias("tga", "qt");
|
||||||
|
r->addFileExtensionAlias("mov", "qt");
|
||||||
|
r->addFileExtensionAlias("avi", "qt");
|
||||||
|
r->addFileExtensionAlias("mpg", "qt");
|
||||||
|
r->addFileExtensionAlias("mpv", "qt");
|
||||||
|
r->addFileExtensionAlias("dv", "qt");
|
||||||
|
r->addFileExtensionAlias("mp4", "qt");
|
||||||
|
r->addFileExtensionAlias("m4v", "qt");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
mutable QuicktimeInitializer _qtExitObserver;
|
||||||
};
|
};
|
||||||
|
|
||||||
// now register with Registry to instantiate the above
|
// now register with Registry to instantiate the above
|
||||||
|
|||||||
@@ -7,5 +7,10 @@ SET(TARGET_SRC
|
|||||||
|
|
||||||
SET(TARGET_LIBRARIES_VARS XINE_LIBRARY )
|
SET(TARGET_LIBRARIES_VARS XINE_LIBRARY )
|
||||||
|
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
|
||||||
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
|
||||||
#### end var setup ###
|
#### end var setup ###
|
||||||
SETUP_PLUGIN(xine)
|
SETUP_PLUGIN(xine)
|
||||||
|
|||||||
@@ -23,6 +23,24 @@
|
|||||||
using namespace osg;
|
using namespace osg;
|
||||||
using namespace osgTerrain;
|
using namespace osgTerrain;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TileID
|
||||||
|
//
|
||||||
|
TileID::TileID():
|
||||||
|
level(-1),
|
||||||
|
x(-1),
|
||||||
|
y(-1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TileID::TileID(int in_level, int in_x, int in_y):
|
||||||
|
level(in_level),
|
||||||
|
x(in_x),
|
||||||
|
y(in_y)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// TerrainTile
|
// TerrainTile
|
||||||
|
|||||||
@@ -491,18 +491,20 @@ void Text::computeGlyphRepresentation()
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (itr!=_text.end())
|
||||||
|
{
|
||||||
|
// skip over spaces and return.
|
||||||
|
while (*itr==' ') ++itr;
|
||||||
|
if (*itr=='\n') ++itr;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itr!=_text.end())
|
|
||||||
{
|
|
||||||
// skip over spaces and return.
|
|
||||||
while (*itr==' ') ++itr;
|
|
||||||
if (*itr=='\n') ++itr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// move to new line.
|
// move to new line.
|
||||||
switch(_layout)
|
switch(_layout)
|
||||||
|
|||||||
@@ -245,7 +245,6 @@ void Optimizer::optimize(osg::Node* node, unsigned int options)
|
|||||||
CombineStaticTransformsVisitor cstv(this);
|
CombineStaticTransformsVisitor cstv(this);
|
||||||
node->accept(cstv);
|
node->accept(cstv);
|
||||||
cstv.removeTransforms(node);
|
cstv.removeTransforms(node);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options & FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS)
|
if (options & FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS)
|
||||||
@@ -1062,6 +1061,7 @@ bool CollectLowestTransformsVisitor::removeTransforms(osg::Node* nodeWeCannotRem
|
|||||||
group->setName( transform->getName() );
|
group->setName( transform->getName() );
|
||||||
group->setDataVariance(osg::Object::STATIC);
|
group->setDataVariance(osg::Object::STATIC);
|
||||||
group->setNodeMask(transform->getNodeMask());
|
group->setNodeMask(transform->getNodeMask());
|
||||||
|
group->setStateSet(transform->getStateSet());
|
||||||
for(unsigned int i=0;i<transform->getNumChildren();++i)
|
for(unsigned int i=0;i<transform->getNumChildren();++i)
|
||||||
{
|
{
|
||||||
for(unsigned int j=0;j<transform->getNumParents();++j)
|
for(unsigned int j=0;j<transform->getNumParents();++j)
|
||||||
@@ -1259,6 +1259,11 @@ bool Optimizer::CombineStaticTransformsVisitor::removeTransforms(osg::Node* node
|
|||||||
|
|
||||||
osg::Matrix newMatrix = child->getMatrix()*transform->getMatrix();
|
osg::Matrix newMatrix = child->getMatrix()*transform->getMatrix();
|
||||||
child->setMatrix(newMatrix);
|
child->setMatrix(newMatrix);
|
||||||
|
if (transform->getStateSet())
|
||||||
|
{
|
||||||
|
if(child->getStateSet()) child->getStateSet()->merge(*transform->getStateSet());
|
||||||
|
else child->setStateSet(transform->getStateSet());
|
||||||
|
}
|
||||||
|
|
||||||
transformRemoved = true;
|
transformRemoved = true;
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
|||||||
|
|
||||||
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
|
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x"<<std::hex<<status<<std::endl;
|
osg::notify(osg::NOTICE)<<"RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x"<<std::hex<<status<<std::dec<<std::endl;
|
||||||
|
|
||||||
fbo_supported = false;
|
fbo_supported = false;
|
||||||
fbo_ext->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
fbo_ext->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||||
@@ -472,7 +472,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
|||||||
{
|
{
|
||||||
notify(NOTICE) << "RenderStage::runCameraSetUp(), "
|
notify(NOTICE) << "RenderStage::runCameraSetUp(), "
|
||||||
"multisample FBO setup failed, FBO status = 0x"
|
"multisample FBO setup failed, FBO status = 0x"
|
||||||
<< std::hex << status << std::endl;
|
<< std::hex << status << std::dec << std::endl;
|
||||||
|
|
||||||
fbo->apply(state);
|
fbo->apply(state);
|
||||||
fbo_multisample = 0;
|
fbo_multisample = 0;
|
||||||
@@ -852,9 +852,9 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
|
|||||||
{
|
{
|
||||||
const char* error = (char*)gluErrorString(errorNo);
|
const char* error = (char*)gluErrorString(errorNo);
|
||||||
if (error) osg::notify(osg::NOTICE)<<"Warning: detected OpenGL error '"<<error<<"' after RenderBin::draw(,)"<<std::endl;
|
if (error) osg::notify(osg::NOTICE)<<"Warning: detected OpenGL error '"<<error<<"' after RenderBin::draw(,)"<<std::endl;
|
||||||
else osg::notify(osg::NOTICE)<<"Warning: detected OpenGL errorNo= 0x"<<std::hex<<errorNo<<" after RenderBin::draw(,)"<<std::endl;
|
else osg::notify(osg::NOTICE)<<"Warning: detected OpenGL errorNo= 0x"<<std::hex<<errorNo<<" after RenderBin::draw(,)"<<std::dec<<std::endl;
|
||||||
|
|
||||||
if (fbo_ext) osg::notify(osg::NOTICE)<<"RenderStage::drawInner(,) FBO status= 0x"<<std::hex<<fbo_ext->glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<<std::endl;
|
if (fbo_ext) osg::notify(osg::NOTICE)<<"RenderStage::drawInner(,) FBO status= 0x"<<std::hex<<fbo_ext->glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<<std::dec<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public:
|
|||||||
class arc
|
class arc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
arc() {}
|
||||||
arc & mark() { m_Marker = true; return (* this); }
|
arc & mark() { m_Marker = true; return (* this); }
|
||||||
arc & unmark() { m_Marker = false; return (* this); }
|
arc & unmark() { m_Marker = false; return (* this); }
|
||||||
bool marked() const { return m_Marker; }
|
bool marked() const { return m_Marker; }
|
||||||
|
|||||||
@@ -1172,6 +1172,20 @@ bool GraphicsWindowWin32::createWindow()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Create the OpenGL rendering context associated with this window
|
||||||
|
//
|
||||||
|
|
||||||
|
_hglrc = ::wglCreateContext(_hdc);
|
||||||
|
if (_hglrc==0)
|
||||||
|
{
|
||||||
|
reportErrorForScreen("GraphicsWindowWin32::createWindow() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError());
|
||||||
|
::ReleaseDC(_hwnd, _hdc);
|
||||||
|
_hdc = 0;
|
||||||
|
destroyWindow();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Win32WindowingSystem::getInterface()->registerWindow(_hwnd, this);
|
Win32WindowingSystem::getInterface()->registerWindow(_hwnd, this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1209,37 +1223,23 @@ bool GraphicsWindowWin32::setWindow( HWND handle )
|
|||||||
// Check if we must set the pixel format of the inherited window
|
// Check if we must set the pixel format of the inherited window
|
||||||
//
|
//
|
||||||
|
|
||||||
if (_traits.valid() && _traits->setInheritedWindowPixelFormat)
|
if (!setPixelFormat())
|
||||||
{
|
{
|
||||||
if (!setPixelFormat())
|
reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to set the inherited window pixel format", _traits->screenNum, ::GetLastError());
|
||||||
{
|
::ReleaseDC(_hwnd, _hdc);
|
||||||
reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to set the inherited window pixel format", _traits->screenNum, ::GetLastError());
|
_hdc = 0;
|
||||||
_hdc = 0;
|
_hwnd = 0;
|
||||||
_hwnd = 0;
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
_hglrc = ::wglCreateContext(_hdc);
|
||||||
|
if (_hglrc==0)
|
||||||
{
|
{
|
||||||
//
|
reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError());
|
||||||
// Create the OpenGL rendering context associated with this window
|
::ReleaseDC(_hwnd, _hdc);
|
||||||
//
|
_hdc = 0;
|
||||||
if (!setPixelFormat())
|
_hwnd = 0;
|
||||||
{
|
return false;
|
||||||
reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to set the inherited window pixel format", _traits->screenNum, ::GetLastError());
|
|
||||||
_hdc = 0;
|
|
||||||
_hwnd = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
_hglrc = ::wglCreateContext(_hdc);
|
|
||||||
if (_hglrc==0)
|
|
||||||
{
|
|
||||||
reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError());
|
|
||||||
::ReleaseDC(_hwnd, _hdc);
|
|
||||||
_hdc = 0;
|
|
||||||
_hwnd = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registerWindowProcedure())
|
if (!registerWindowProcedure())
|
||||||
@@ -1566,17 +1566,6 @@ bool GraphicsWindowWin32::setPixelFormat()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Create the OpenGL rendering context associated with this window
|
|
||||||
//
|
|
||||||
|
|
||||||
_hglrc = ::wglCreateContext(_hdc);
|
|
||||||
if (_hglrc==0)
|
|
||||||
{
|
|
||||||
reportErrorForScreen("GraphicsWindowWin32::setPixelFormat() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <osgVolume/Layer>
|
#include <osgVolume/Layer>
|
||||||
|
|
||||||
#include <osg/ImageUtils>
|
#include <osg/ImageUtils>
|
||||||
|
#include <osg/ImageStream>
|
||||||
#include <osg/Endian>
|
#include <osg/Endian>
|
||||||
#include <osg/Notify>
|
#include <osg/Notify>
|
||||||
#include <osg/io_utils>
|
#include <osg/io_utils>
|
||||||
@@ -166,6 +167,16 @@ void ImageLayer::translateMinToZero()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ImageLayer::requiresUpdateTraversal() const
|
||||||
|
{
|
||||||
|
return dynamic_cast<osg::ImageStream*>(_image.get())!=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageLayer::update(osg::NodeVisitor& nv)
|
||||||
|
{
|
||||||
|
if (_image.valid()) _image->update(&nv);
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// CompositeLayer
|
// CompositeLayer
|
||||||
@@ -185,6 +196,30 @@ void CompositeLayer::clear()
|
|||||||
_layers.clear();
|
_layers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CompositeLayer::requiresUpdateTraversal() const
|
||||||
|
{
|
||||||
|
for(Layers::const_iterator itr = _layers.begin();
|
||||||
|
itr != _layers.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
if (itr->layer->requiresUpdateTraversal()) return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompositeLayer::update(osg::NodeVisitor& nv)
|
||||||
|
{
|
||||||
|
for(Layers::const_iterator itr = _layers.begin();
|
||||||
|
itr != _layers.end();
|
||||||
|
++itr)
|
||||||
|
{
|
||||||
|
itr->layer->update(nv);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// createNormalMapTexture
|
// createNormalMapTexture
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ char volume_iso_frag[] = "uniform sampler3D baseTexture;\n"
|
|||||||
" vec3 normal = normalize(grad);\n"
|
" vec3 normal = normalize(grad);\n"
|
||||||
" float lightScale = 0.1 + abs(dot(normal.xyz, eyeDirection))*0.9;\n"
|
" float lightScale = 0.1 + abs(dot(normal.xyz, eyeDirection))*0.9;\n"
|
||||||
"\n"
|
"\n"
|
||||||
" color.x *= lightScale;\n"
|
" color.x = lightScale;\n"
|
||||||
" color.y *= lightScale;\n"
|
" color.y = lightScale;\n"
|
||||||
" color.z *= lightScale;\n"
|
" color.z = lightScale;\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
" \n"
|
" \n"
|
||||||
" if (color.w>1.0) color.w = 1.0; \n"
|
" if (color.w>1.0) color.w = 1.0; \n"
|
||||||
|
|||||||
@@ -18,6 +18,27 @@
|
|||||||
using namespace osg;
|
using namespace osg;
|
||||||
using namespace osgVolume;
|
using namespace osgVolume;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TileID
|
||||||
|
//
|
||||||
|
TileID::TileID():
|
||||||
|
level(-1),
|
||||||
|
x(-1),
|
||||||
|
y(-1),
|
||||||
|
z(-1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TileID::TileID(int in_level, int in_x, int in_y, int in_z):
|
||||||
|
level(in_level),
|
||||||
|
x(in_x),
|
||||||
|
y(in_y),
|
||||||
|
z(in_z)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// VolumeTile
|
// VolumeTile
|
||||||
@@ -28,6 +49,8 @@ VolumeTile::VolumeTile():
|
|||||||
_hasBeenTraversal(false)
|
_hasBeenTraversal(false)
|
||||||
{
|
{
|
||||||
setThreadSafeRefUnref(true);
|
setThreadSafeRefUnref(true);
|
||||||
|
|
||||||
|
setNumChildrenRequiringUpdateTraversal(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VolumeTile::VolumeTile(const VolumeTile& volumeTile,const osg::CopyOp& copyop):
|
VolumeTile::VolumeTile(const VolumeTile& volumeTile,const osg::CopyOp& copyop):
|
||||||
@@ -37,6 +60,8 @@ VolumeTile::VolumeTile(const VolumeTile& volumeTile,const osg::CopyOp& copyop):
|
|||||||
_hasBeenTraversal(false),
|
_hasBeenTraversal(false),
|
||||||
_layer(volumeTile._layer)
|
_layer(volumeTile._layer)
|
||||||
{
|
{
|
||||||
|
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);
|
||||||
|
|
||||||
if (volumeTile.getVolumeTechnique())
|
if (volumeTile.getVolumeTechnique())
|
||||||
{
|
{
|
||||||
setVolumeTechnique(osg::clone(volumeTile.getVolumeTechnique()));
|
setVolumeTechnique(osg::clone(volumeTile.getVolumeTechnique()));
|
||||||
@@ -96,6 +121,12 @@ void VolumeTile::traverse(osg::NodeVisitor& nv)
|
|||||||
|
|
||||||
_hasBeenTraversal = true;
|
_hasBeenTraversal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR &&
|
||||||
|
_layer->requiresUpdateTraversal())
|
||||||
|
{
|
||||||
|
_layer->update(nv);
|
||||||
|
}
|
||||||
|
|
||||||
if (_volumeTechnique.valid())
|
if (_volumeTechnique.valid())
|
||||||
{
|
{
|
||||||
@@ -117,6 +148,11 @@ void VolumeTile::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VolumeTile::setLayer(Layer* layer)
|
||||||
|
{
|
||||||
|
_layer = layer;
|
||||||
|
}
|
||||||
|
|
||||||
void VolumeTile::setVolumeTechnique(VolumeTechnique* volumeTechnique)
|
void VolumeTile::setVolumeTechnique(VolumeTechnique* volumeTechnique)
|
||||||
{
|
{
|
||||||
if (_volumeTechnique == volumeTechnique) return;
|
if (_volumeTechnique == volumeTechnique) return;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ PROJECT_NUMBER =
|
|||||||
OUTPUT_DIRECTORY = "$(OUTPUT_DIR)"
|
OUTPUT_DIRECTORY = "$(OUTPUT_DIR)"
|
||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
USE_WINDOWS_ENCODING = YES
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = YES
|
REPEAT_BRIEF = YES
|
||||||
ABBREVIATE_BRIEF = "The $name class" \
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
@@ -30,7 +29,6 @@ STRIP_FROM_INC_PATH =
|
|||||||
SHORT_NAMES = NO
|
SHORT_NAMES = NO
|
||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
INHERIT_DOCS = YES
|
INHERIT_DOCS = YES
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
TAB_SIZE = 8
|
TAB_SIZE = 8
|
||||||
@@ -70,7 +68,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
|
||||||
@@ -223,8 +221,6 @@ DIRECTORY_GRAPH = YES
|
|||||||
DOT_IMAGE_FORMAT = png
|
DOT_IMAGE_FORMAT = png
|
||||||
DOT_PATH =
|
DOT_PATH =
|
||||||
DOTFILE_DIRS =
|
DOTFILE_DIRS =
|
||||||
MAX_DOT_GRAPH_WIDTH = 1024
|
|
||||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
|
||||||
MAX_DOT_GRAPH_DEPTH = 1000
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
DOT_TRANSPARENT = NO
|
DOT_TRANSPARENT = NO
|
||||||
DOT_MULTI_TARGETS = NO
|
DOT_MULTI_TARGETS = NO
|
||||||
|
|||||||
@@ -40,6 +40,34 @@ END_REFLECTOR
|
|||||||
|
|
||||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread)
|
BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread)
|
||||||
I_DeclaringFile("OpenThreads/Thread");
|
I_DeclaringFile("OpenThreads/Thread");
|
||||||
|
I_StaticMethod1(int, SetConcurrency, IN, int, concurrencyLevel,
|
||||||
|
__int__SetConcurrency__int_S,
|
||||||
|
"Set the concurrency level for a running application. ",
|
||||||
|
"This method only has effect if the pthreads thread model is being used, and then only when that model is many-to-one (eg. irix). in other cases it is ignored. The concurrency level is only a *hint* as to the number of execution vehicles to use, the actual implementation may do anything it wants. Setting the value to 0 returns things to their default state.previous concurrency level, -1 indicates no-op. ");
|
||||||
|
I_StaticMethod0(int, GetConcurrency,
|
||||||
|
__int__GetConcurrency_S,
|
||||||
|
"Get the concurrency level for a running application. ",
|
||||||
|
"In this case, a return code of 0 means that the application is in default mode. A return code of -1 means that the application is incapable of setting an arbitrary concurrency, because it is a one-to-one execution model (sprocs, linuxThreads) ");
|
||||||
|
I_StaticMethod0(OpenThreads::Thread *, CurrentThread,
|
||||||
|
__Thread_P1__CurrentThread_S,
|
||||||
|
"Return a pointer to the current running thread. ",
|
||||||
|
"");
|
||||||
|
I_StaticMethod0(void, Init,
|
||||||
|
__void__Init_S,
|
||||||
|
"Initialize Threading in a program. ",
|
||||||
|
"This method must be called before you can do any threading in a program. ");
|
||||||
|
I_StaticMethod0(int, YieldCurrentThread,
|
||||||
|
__int__YieldCurrentThread_S,
|
||||||
|
"Yield the processor. ",
|
||||||
|
"This method operates on the calling process. And is equivalent to calling sched_yield(). 0 if normal, -1 if errno set, errno code otherwise. ");
|
||||||
|
I_StaticMethod0(OpenThreads::Thread::ThreadPriority, GetMasterPriority,
|
||||||
|
__ThreadPriority__GetMasterPriority_S,
|
||||||
|
"This method will return the ThreadPriority of the master process. ",
|
||||||
|
"(ie, the one calling the thread->start() methods for the first time) The method will almost certainly return Thread::THREAD_PRIORITY_DEFAULT if Init() has not been called.the Thread::ThreadPriority of the master thread. ");
|
||||||
|
I_StaticMethod1(int, microSleep, IN, unsigned int, microsec,
|
||||||
|
__int__microSleep__unsigned_int_S,
|
||||||
|
"microSleep method, equivilant to the posix usleep(microsec). ",
|
||||||
|
"This is not strictly thread API but is used so often with threads. It's basically UNIX usleep. Parameter is number of microseconds we current thread to sleep. Returns 0 on succes, non-zero on failure (UNIX errno or GetLastError() will give detailed description. ");
|
||||||
I_Constructor0(____Thread,
|
I_Constructor0(____Thread,
|
||||||
"Constructor. ",
|
"Constructor. ",
|
||||||
"");
|
"");
|
||||||
@@ -158,34 +186,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread)
|
|||||||
__int__setProcessorAffinity__unsigned_int,
|
__int__setProcessorAffinity__unsigned_int,
|
||||||
"Thread's processor affinity method. ",
|
"Thread's processor affinity method. ",
|
||||||
"This binds a thread to a processor whenever possible. This call must be made before start() or startThread() and has no effect after the thread has been running. In the pthreads implementation, this is only implemented on sgi, through a pthread extension. On other pthread platforms this is ignored. Returns 0 on success, implementation's error on failure, or -1 if ignored. ");
|
"This binds a thread to a processor whenever possible. This call must be made before start() or startThread() and has no effect after the thread has been running. In the pthreads implementation, this is only implemented on sgi, through a pthread extension. On other pthread platforms this is ignored. Returns 0 on success, implementation's error on failure, or -1 if ignored. ");
|
||||||
I_StaticMethod1(int, SetConcurrency, IN, int, concurrencyLevel,
|
|
||||||
__int__SetConcurrency__int_S,
|
|
||||||
"Set the concurrency level for a running application. ",
|
|
||||||
"This method only has effect if the pthreads thread model is being used, and then only when that model is many-to-one (eg. irix). in other cases it is ignored. The concurrency level is only a *hint* as to the number of execution vehicles to use, the actual implementation may do anything it wants. Setting the value to 0 returns things to their default state.previous concurrency level, -1 indicates no-op. ");
|
|
||||||
I_StaticMethod0(int, GetConcurrency,
|
|
||||||
__int__GetConcurrency_S,
|
|
||||||
"Get the concurrency level for a running application. ",
|
|
||||||
"In this case, a return code of 0 means that the application is in default mode. A return code of -1 means that the application is incapable of setting an arbitrary concurrency, because it is a one-to-one execution model (sprocs, linuxThreads) ");
|
|
||||||
I_StaticMethod0(OpenThreads::Thread *, CurrentThread,
|
|
||||||
__Thread_P1__CurrentThread_S,
|
|
||||||
"Return a pointer to the current running thread. ",
|
|
||||||
"");
|
|
||||||
I_StaticMethod0(void, Init,
|
|
||||||
__void__Init_S,
|
|
||||||
"Initialize Threading in a program. ",
|
|
||||||
"This method must be called before you can do any threading in a program. ");
|
|
||||||
I_StaticMethod0(int, YieldCurrentThread,
|
|
||||||
__int__YieldCurrentThread_S,
|
|
||||||
"Yield the processor. ",
|
|
||||||
"This method operates on the calling process. And is equivalent to calling sched_yield(). 0 if normal, -1 if errno set, errno code otherwise. ");
|
|
||||||
I_StaticMethod0(OpenThreads::Thread::ThreadPriority, GetMasterPriority,
|
|
||||||
__ThreadPriority__GetMasterPriority_S,
|
|
||||||
"This method will return the ThreadPriority of the master process. ",
|
|
||||||
"(ie, the one calling the thread->start() methods for the first time) The method will almost certainly return Thread::THREAD_PRIORITY_DEFAULT if Init() has not been called.the Thread::ThreadPriority of the master thread. ");
|
|
||||||
I_StaticMethod1(int, microSleep, IN, unsigned int, microsec,
|
|
||||||
__int__microSleep__unsigned_int_S,
|
|
||||||
"microSleep method, equivilant to the posix usleep(microsec). ",
|
|
||||||
"This is not strictly thread API but is used so often with threads. It's basically UNIX usleep. Parameter is number of microseconds we current thread to sleep. Returns 0 on succes, non-zero on failure (UNIX errno or GetLastError() will give detailed description. ");
|
|
||||||
I_SimpleProperty(void *, Implementation,
|
I_SimpleProperty(void *, Implementation,
|
||||||
__void_P1__getImplementation,
|
__void_P1__getImplementation,
|
||||||
0);
|
0);
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ suppress reflector "osg::MixinVector< GLuint >"
|
|||||||
suppress reflector "OpenThreads::Atomic"
|
suppress reflector "OpenThreads::Atomic"
|
||||||
suppress reflector "OpenThreads::AtomicPtr"
|
suppress reflector "OpenThreads::AtomicPtr"
|
||||||
|
|
||||||
|
suppress reflector "osg::BoundingBoxImpl< osg::Vec3f >"
|
||||||
|
suppress reflector "osg::BoundingBoxImpl< osg::Vec3d >"
|
||||||
|
|
||||||
|
suppress reflector "osg::BoundingSphereImpl< osg::Vec3f >"
|
||||||
|
suppress reflector "osg::BoundingSphereImpl< osg::Vec3d >"
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
@@ -294,6 +299,12 @@ end
|
|||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
# Suppress scoped lock template
|
||||||
|
|
||||||
|
suppress reflector "OpenThreads::ScopedLock< OpenThreads::Mutex >"
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
# Suppress nested nested class method
|
# Suppress nested nested class method
|
||||||
|
|
||||||
configure reflector "osgShadow::OccluderGeometry"
|
configure reflector "osgShadow::OccluderGeometry"
|
||||||
@@ -327,137 +338,24 @@ suppress reflector "osg::ref_ptr< const osgFX::Effect >"
|
|||||||
|
|
||||||
# Doxygen incorrectly parses function typedefs as methods
|
# Doxygen incorrectly parses function typedefs as methods
|
||||||
|
|
||||||
configure reflector "osg::VertexProgram::Extensions"
|
suppress reflector "osg::VertexProgram::Extensions"
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
suppress reflector "osg::StencilTwoSided::Extensions"
|
||||||
replace with ""
|
suppress reflector "osg::Texture3D::Extensions"
|
||||||
end
|
suppress reflector "osg::GL2Extensions"
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
suppress reflector "osg::Drawable::Extensions"
|
||||||
replace with ""
|
suppress reflector "osg::BufferObject::Extensions"
|
||||||
end
|
suppress reflector "osg::FBOExtensions"
|
||||||
end
|
suppress reflector "osg::Drawable::Extensions"
|
||||||
|
suppress reflector "osg::BlendColor::Extensions"
|
||||||
configure reflector "osg::StencilTwoSided::Extensions"
|
suppress reflector "osg::BlendEquation::Extensions"
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
suppress reflector "osg::BlendFunc::Extensions"
|
||||||
replace with ""
|
suppress reflector "osg::FragmentProgram::Extensions"
|
||||||
end
|
suppress reflector "osg::Multisample::Extensions"
|
||||||
end
|
suppress reflector "osg::Point::Extensions"
|
||||||
|
suppress reflector "osg::ClampColor::Extensions"
|
||||||
configure reflector "osg::Texture3D::Extensions"
|
suppress reflector "osg::Texture::Extensions"
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
suppress reflector "osg::Texture2DArray::Extensions"
|
||||||
replace with ""
|
suppress reflector "osgSim::ShapeAttribute"
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::GL2Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLuint__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::BufferObject::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::Drawable::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::BlendColor::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::BlendEquation::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::BlendFunc::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::FragmentProgram::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::Multisample::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::Point::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::ClampColor::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::Texture::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::Texture2DArray::Extensions"
|
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
|
||||||
replace with ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configure reflector "osg::State"
|
configure reflector "osg::State"
|
||||||
configure method "__typedef__void__APIENTRY_P1"
|
configure method "__typedef__void__APIENTRY_P1"
|
||||||
@@ -465,6 +363,20 @@ configure reflector "osg::State"
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
configure reflector "osgWidget::Window::Getter"
|
||||||
|
replace with ""
|
||||||
|
end
|
||||||
|
|
||||||
|
configure reflector "osgWidget::MouseHandler::MouseAction"
|
||||||
|
replace with ""
|
||||||
|
end
|
||||||
|
|
||||||
|
configure reflector "osgWidget::MouseHandler::MouseEvent"
|
||||||
|
replace with ""
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
# avoid functions that use protected types, since those are not handled
|
# avoid functions that use protected types, since those are not handled
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ BEGIN_OBJECT_REFLECTOR(osg::AlphaFunc)
|
|||||||
__osg_Object_P1__cloneType,
|
__osg_Object_P1__cloneType,
|
||||||
"Clone the type of an attribute, with Object* return type. ",
|
"Clone the type of an attribute, with Object* return type. ",
|
||||||
"Must be defined by derived classes. ");
|
"Must be defined by derived classes. ");
|
||||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||||
"Clone an attribute, with Object* return type. ",
|
"Clone an attribute, with Object* return type. ",
|
||||||
@@ -85,7 +85,7 @@ BEGIN_OBJECT_REFLECTOR(osg::AlphaFunc)
|
|||||||
__int__compare__C5_StateAttribute_R1,
|
__int__compare__C5_StateAttribute_R1,
|
||||||
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
||||||
"");
|
"");
|
||||||
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, usage,
|
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
||||||
"Return the modes associated with this StateAttribute. ",
|
"Return the modes associated with this StateAttribute. ",
|
||||||
@@ -115,7 +115,7 @@ BEGIN_OBJECT_REFLECTOR(osg::AlphaFunc)
|
|||||||
__float__getReferenceValue,
|
__float__getReferenceValue,
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
I_Method1(void, apply, IN, osg::State &, state,
|
I_Method1(void, apply, IN, osg::State &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__void__apply__State_R1,
|
__void__apply__State_R1,
|
||||||
"apply the OpenGL state attributes. ",
|
"apply the OpenGL state attributes. ",
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
#undef OUT
|
#undef OUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TYPE_NAME_ALIAS(std::map< double COMMA osg::AnimationPath::ControlPoint >, osg::AnimationPath::TimeControlPointMap)
|
|
||||||
|
|
||||||
BEGIN_ENUM_REFLECTOR(osg::AnimationPath::LoopMode)
|
BEGIN_ENUM_REFLECTOR(osg::AnimationPath::LoopMode)
|
||||||
I_DeclaringFile("osg/AnimationPath");
|
I_DeclaringFile("osg/AnimationPath");
|
||||||
I_EnumLabel(osg::AnimationPath::SWING);
|
I_EnumLabel(osg::AnimationPath::SWING);
|
||||||
@@ -37,6 +35,8 @@ BEGIN_ENUM_REFLECTOR(osg::AnimationPath::LoopMode)
|
|||||||
I_EnumLabel(osg::AnimationPath::NO_LOOPING);
|
I_EnumLabel(osg::AnimationPath::NO_LOOPING);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
|
TYPE_NAME_ALIAS(std::map< double COMMA osg::AnimationPath::ControlPoint >, osg::AnimationPath::TimeControlPointMap)
|
||||||
|
|
||||||
BEGIN_OBJECT_REFLECTOR(osg::AnimationPath)
|
BEGIN_OBJECT_REFLECTOR(osg::AnimationPath)
|
||||||
I_DeclaringFile("osg/AnimationPath");
|
I_DeclaringFile("osg/AnimationPath");
|
||||||
I_VirtualBaseType(osg::Object);
|
I_VirtualBaseType(osg::Object);
|
||||||
@@ -52,7 +52,7 @@ BEGIN_OBJECT_REFLECTOR(osg::AnimationPath)
|
|||||||
__osg_Object_P1__cloneType,
|
__osg_Object_P1__cloneType,
|
||||||
"Clone the type of an object, with Object* return type. ",
|
"Clone the type of an object, with Object* return type. ",
|
||||||
"Must be defined by derived classes. ");
|
"Must be defined by derived classes. ");
|
||||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||||
"Clone an object, with Object* return type. ",
|
"Clone an object, with Object* return type. ",
|
||||||
@@ -288,7 +288,7 @@ BEGIN_OBJECT_REFLECTOR(osg::AnimationPathCallback)
|
|||||||
__osg_Object_P1__cloneType,
|
__osg_Object_P1__cloneType,
|
||||||
"Clone the type of an object, with Object* return type. ",
|
"Clone the type of an object, with Object* return type. ",
|
||||||
"Must be defined by derived classes. ");
|
"Must be defined by derived classes. ");
|
||||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||||
"Clone an object, with Object* return type. ",
|
"Clone an object, with Object* return type. ",
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
#undef OUT
|
#undef OUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TYPE_NAME_ALIAS(std::map< std::string COMMA std::string >, osg::ApplicationUsage::UsageMap)
|
|
||||||
|
|
||||||
BEGIN_ENUM_REFLECTOR(osg::ApplicationUsage::Type)
|
BEGIN_ENUM_REFLECTOR(osg::ApplicationUsage::Type)
|
||||||
I_DeclaringFile("osg/ApplicationUsage");
|
I_DeclaringFile("osg/ApplicationUsage");
|
||||||
I_EnumLabel(osg::ApplicationUsage::NO_HELP);
|
I_EnumLabel(osg::ApplicationUsage::NO_HELP);
|
||||||
@@ -31,9 +29,15 @@ BEGIN_ENUM_REFLECTOR(osg::ApplicationUsage::Type)
|
|||||||
I_EnumLabel(osg::ApplicationUsage::HELP_ALL);
|
I_EnumLabel(osg::ApplicationUsage::HELP_ALL);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
|
TYPE_NAME_ALIAS(std::map< std::string COMMA std::string >, osg::ApplicationUsage::UsageMap)
|
||||||
|
|
||||||
BEGIN_OBJECT_REFLECTOR(osg::ApplicationUsage)
|
BEGIN_OBJECT_REFLECTOR(osg::ApplicationUsage)
|
||||||
I_DeclaringFile("osg/ApplicationUsage");
|
I_DeclaringFile("osg/ApplicationUsage");
|
||||||
I_BaseType(osg::Referenced);
|
I_BaseType(osg::Referenced);
|
||||||
|
I_StaticMethod0(osg::ApplicationUsage *, instance,
|
||||||
|
__ApplicationUsage_P1__instance_S,
|
||||||
|
"",
|
||||||
|
"");
|
||||||
I_Constructor0(____ApplicationUsage,
|
I_Constructor0(____ApplicationUsage,
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
@@ -162,10 +166,6 @@ BEGIN_OBJECT_REFLECTOR(osg::ApplicationUsage)
|
|||||||
__void__writeEnvironmentSettings__std_ostream_R1,
|
__void__writeEnvironmentSettings__std_ostream_R1,
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
I_StaticMethod0(osg::ApplicationUsage *, instance,
|
|
||||||
__ApplicationUsage_P1__instance_S,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_SimpleProperty(const std::string &, ApplicationName,
|
I_SimpleProperty(const std::string &, ApplicationName,
|
||||||
__C5_std_string_R1__getApplicationName,
|
__C5_std_string_R1__getApplicationName,
|
||||||
__void__setApplicationName__C5_std_string_R1);
|
__void__setApplicationName__C5_std_string_R1);
|
||||||
|
|||||||
@@ -21,16 +21,32 @@
|
|||||||
#undef OUT
|
#undef OUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TYPE_NAME_ALIAS(std::map< std::string COMMA osg::ArgumentParser::ErrorSeverity >, osg::ArgumentParser::ErrorMessageMap)
|
|
||||||
|
|
||||||
BEGIN_ENUM_REFLECTOR(osg::ArgumentParser::ErrorSeverity)
|
BEGIN_ENUM_REFLECTOR(osg::ArgumentParser::ErrorSeverity)
|
||||||
I_DeclaringFile("osg/ArgumentParser");
|
I_DeclaringFile("osg/ArgumentParser");
|
||||||
I_EnumLabel(osg::ArgumentParser::BENIGN);
|
I_EnumLabel(osg::ArgumentParser::BENIGN);
|
||||||
I_EnumLabel(osg::ArgumentParser::CRITICAL);
|
I_EnumLabel(osg::ArgumentParser::CRITICAL);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
|
TYPE_NAME_ALIAS(std::map< std::string COMMA osg::ArgumentParser::ErrorSeverity >, osg::ArgumentParser::ErrorMessageMap)
|
||||||
|
|
||||||
BEGIN_VALUE_REFLECTOR(osg::ArgumentParser)
|
BEGIN_VALUE_REFLECTOR(osg::ArgumentParser)
|
||||||
I_DeclaringFile("osg/ArgumentParser");
|
I_DeclaringFile("osg/ArgumentParser");
|
||||||
|
I_StaticMethod1(bool, isOption, IN, const char *, str,
|
||||||
|
__bool__isOption__C5_char_P1_S,
|
||||||
|
"Return true if the specified string is an option in the form -option or --option. ",
|
||||||
|
"");
|
||||||
|
I_StaticMethod1(bool, isString, IN, const char *, str,
|
||||||
|
__bool__isString__C5_char_P1_S,
|
||||||
|
"Return true if string is non-NULL and not an option in the form -option or --option. ",
|
||||||
|
"");
|
||||||
|
I_StaticMethod1(bool, isNumber, IN, const char *, str,
|
||||||
|
__bool__isNumber__C5_char_P1_S,
|
||||||
|
"Return true if specified parameter is a number. ",
|
||||||
|
"");
|
||||||
|
I_StaticMethod1(bool, isBool, IN, const char *, str,
|
||||||
|
__bool__isBool__C5_char_P1_S,
|
||||||
|
"Return true if specified parameter is a bool. ",
|
||||||
|
"");
|
||||||
I_Constructor2(IN, int *, argc, IN, char **, argv,
|
I_Constructor2(IN, int *, argc, IN, char **, argv,
|
||||||
____ArgumentParser__int_P1__char_P1P1,
|
____ArgumentParser__int_P1__char_P1P1,
|
||||||
"",
|
"",
|
||||||
@@ -225,22 +241,6 @@ BEGIN_VALUE_REFLECTOR(osg::ArgumentParser)
|
|||||||
__ApplicationUsage_Type__readHelpType,
|
__ApplicationUsage_Type__readHelpType,
|
||||||
"This convinience method handles help requests on the command line. ",
|
"This convinience method handles help requests on the command line. ",
|
||||||
"Return the type(s) of help requested. The return value of this function is suitable for passing into getApplicationUsage()->write(). If ApplicationUsage::NO_HELP is returned then no help commandline option was found on the command line. ");
|
"Return the type(s) of help requested. The return value of this function is suitable for passing into getApplicationUsage()->write(). If ApplicationUsage::NO_HELP is returned then no help commandline option was found on the command line. ");
|
||||||
I_StaticMethod1(bool, isOption, IN, const char *, str,
|
|
||||||
__bool__isOption__C5_char_P1_S,
|
|
||||||
"Return true if the specified string is an option in the form -option or --option. ",
|
|
||||||
"");
|
|
||||||
I_StaticMethod1(bool, isString, IN, const char *, str,
|
|
||||||
__bool__isString__C5_char_P1_S,
|
|
||||||
"Return true if string is non-NULL and not an option in the form -option or --option. ",
|
|
||||||
"");
|
|
||||||
I_StaticMethod1(bool, isNumber, IN, const char *, str,
|
|
||||||
__bool__isNumber__C5_char_P1_S,
|
|
||||||
"Return true if specified parameter is a number. ",
|
|
||||||
"");
|
|
||||||
I_StaticMethod1(bool, isBool, IN, const char *, str,
|
|
||||||
__bool__isBool__C5_char_P1_S,
|
|
||||||
"Return true if specified parameter is a bool. ",
|
|
||||||
"");
|
|
||||||
I_SimpleProperty(std::string, ApplicationName,
|
I_SimpleProperty(std::string, ApplicationName,
|
||||||
__std_string__getApplicationName,
|
__std_string__getApplicationName,
|
||||||
0);
|
0);
|
||||||
|
|||||||
@@ -27,8 +27,6 @@
|
|||||||
#undef OUT
|
#undef OUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TYPE_NAME_ALIAS(std::vector< osg::Vec3 >, osg::Billboard::PositionList)
|
|
||||||
|
|
||||||
BEGIN_ENUM_REFLECTOR(osg::Billboard::Mode)
|
BEGIN_ENUM_REFLECTOR(osg::Billboard::Mode)
|
||||||
I_DeclaringFile("osg/Billboard");
|
I_DeclaringFile("osg/Billboard");
|
||||||
I_EnumLabel(osg::Billboard::POINT_ROT_EYE);
|
I_EnumLabel(osg::Billboard::POINT_ROT_EYE);
|
||||||
@@ -36,6 +34,8 @@ BEGIN_ENUM_REFLECTOR(osg::Billboard::Mode)
|
|||||||
I_EnumLabel(osg::Billboard::AXIAL_ROT);
|
I_EnumLabel(osg::Billboard::AXIAL_ROT);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
|
TYPE_NAME_ALIAS(std::vector< osg::Vec3 >, osg::Billboard::PositionList)
|
||||||
|
|
||||||
BEGIN_OBJECT_REFLECTOR(osg::Billboard)
|
BEGIN_OBJECT_REFLECTOR(osg::Billboard)
|
||||||
I_DeclaringFile("osg/Billboard");
|
I_DeclaringFile("osg/Billboard");
|
||||||
I_BaseType(osg::Geode);
|
I_BaseType(osg::Geode);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendColor)
|
|||||||
__osg_Object_P1__cloneType,
|
__osg_Object_P1__cloneType,
|
||||||
"Clone the type of an attribute, with Object* return type. ",
|
"Clone the type of an attribute, with Object* return type. ",
|
||||||
"Must be defined by derived classes. ");
|
"Must be defined by derived classes. ");
|
||||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||||
"Clone an attribute, with Object* return type. ",
|
"Clone an attribute, with Object* return type. ",
|
||||||
@@ -75,7 +75,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendColor)
|
|||||||
__int__compare__C5_StateAttribute_R1,
|
__int__compare__C5_StateAttribute_R1,
|
||||||
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
||||||
"");
|
"");
|
||||||
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, usage,
|
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
||||||
"Return the modes associated with this StateAttribute. ",
|
"Return the modes associated with this StateAttribute. ",
|
||||||
@@ -95,7 +95,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendColor)
|
|||||||
__C5_osg_Vec4_R1__getConstantColor,
|
__C5_osg_Vec4_R1__getConstantColor,
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
I_Method1(void, apply, IN, osg::State &, state,
|
I_Method1(void, apply, IN, osg::State &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__void__apply__State_R1,
|
__void__apply__State_R1,
|
||||||
"apply the OpenGL state attributes. ",
|
"apply the OpenGL state attributes. ",
|
||||||
@@ -116,47 +116,3 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendColor)
|
|||||||
0);
|
0);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
BEGIN_OBJECT_REFLECTOR(osg::BlendColor::Extensions)
|
|
||||||
I_DeclaringFile("osg/BlendColor");
|
|
||||||
I_BaseType(osg::Referenced);
|
|
||||||
I_Constructor1(IN, unsigned int, contextID,
|
|
||||||
Properties::NON_EXPLICIT,
|
|
||||||
____Extensions__unsigned_int,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Constructor1(IN, const osg::BlendColor::Extensions &, rhs,
|
|
||||||
Properties::NON_EXPLICIT,
|
|
||||||
____Extensions__C5_Extensions_R1,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, lowestCommonDenominator, IN, const osg::BlendColor::Extensions &, rhs,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__lowestCommonDenominator__C5_Extensions_R1,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, setupGLExtensions, IN, unsigned int, contextID,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__setupGLExtensions__unsigned_int,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, setBlendColorSupported, IN, bool, flag,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__setBlendColorSupported__bool,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method0(bool, isBlendColorSupported,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__bool__isBlendColorSupported,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method4(void, glBlendColor, IN, GLclampf, red, IN, GLclampf, green, IN, GLclampf, blue, IN, GLclampf, alpha,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__glBlendColor__GLclampf__GLclampf__GLclampf__GLclampf,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
|
|
||||||
I_SimpleProperty(bool, BlendColorSupported,
|
|
||||||
0,
|
|
||||||
__void__setBlendColorSupported__bool);
|
|
||||||
END_REFLECTOR
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendEquation)
|
|||||||
__osg_Object_P1__cloneType,
|
__osg_Object_P1__cloneType,
|
||||||
"Clone the type of an attribute, with Object* return type. ",
|
"Clone the type of an attribute, with Object* return type. ",
|
||||||
"Must be defined by derived classes. ");
|
"Must be defined by derived classes. ");
|
||||||
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, copyop,
|
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
|
||||||
"Clone an attribute, with Object* return type. ",
|
"Clone an attribute, with Object* return type. ",
|
||||||
@@ -86,7 +86,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendEquation)
|
|||||||
__int__compare__C5_StateAttribute_R1,
|
__int__compare__C5_StateAttribute_R1,
|
||||||
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
|
||||||
"");
|
"");
|
||||||
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, usage,
|
I_Method1(bool, getModeUsage, IN, osg::StateAttribute::ModeUsage &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
__bool__getModeUsage__StateAttribute_ModeUsage_R1,
|
||||||
"Return the modes associated with this StateAttribute. ",
|
"Return the modes associated with this StateAttribute. ",
|
||||||
@@ -101,7 +101,7 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendEquation)
|
|||||||
__Equation__getEquation,
|
__Equation__getEquation,
|
||||||
"",
|
"",
|
||||||
"");
|
"");
|
||||||
I_Method1(void, apply, IN, osg::State &, state,
|
I_Method1(void, apply, IN, osg::State &, x,
|
||||||
Properties::VIRTUAL,
|
Properties::VIRTUAL,
|
||||||
__void__apply__State_R1,
|
__void__apply__State_R1,
|
||||||
"apply the OpenGL state attributes. ",
|
"apply the OpenGL state attributes. ",
|
||||||
@@ -122,57 +122,3 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendEquation)
|
|||||||
0);
|
0);
|
||||||
END_REFLECTOR
|
END_REFLECTOR
|
||||||
|
|
||||||
BEGIN_OBJECT_REFLECTOR(osg::BlendEquation::Extensions)
|
|
||||||
I_DeclaringFile("osg/BlendEquation");
|
|
||||||
I_BaseType(osg::Referenced);
|
|
||||||
I_Constructor1(IN, unsigned int, contextID,
|
|
||||||
Properties::NON_EXPLICIT,
|
|
||||||
____Extensions__unsigned_int,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Constructor1(IN, const osg::BlendEquation::Extensions &, rhs,
|
|
||||||
Properties::NON_EXPLICIT,
|
|
||||||
____Extensions__C5_Extensions_R1,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, lowestCommonDenominator, IN, const osg::BlendEquation::Extensions &, rhs,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__lowestCommonDenominator__C5_Extensions_R1,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, setupGLExtensions, IN, unsigned int, contextID,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__setupGLExtensions__unsigned_int,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, setBlendEquationSupported, IN, bool, flag,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__setBlendEquationSupported__bool,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method0(bool, isBlendEquationSupported,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__bool__isBlendEquationSupported,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method0(bool, isSGIXMinMaxSupported,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__bool__isSGIXMinMaxSupported,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method0(bool, isLogicOpSupported,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__bool__isLogicOpSupported,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
I_Method1(void, glBlendEquation, IN, GLenum, mode,
|
|
||||||
Properties::NON_VIRTUAL,
|
|
||||||
__void__glBlendEquation__GLenum,
|
|
||||||
"",
|
|
||||||
"");
|
|
||||||
|
|
||||||
I_SimpleProperty(bool, BlendEquationSupported,
|
|
||||||
0,
|
|
||||||
__void__setBlendEquationSupported__bool);
|
|
||||||
END_REFLECTOR
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user