Commit Graph

2322 Commits

Author SHA1 Message Date
Robert Osfield
8c727acddc Added new shader support 2007-06-13 19:53:48 +00:00
Robert Osfield
d2c16c2fa0 Added better handling of 0,0,0 values 2007-06-13 13:41:23 +00:00
Robert Osfield
a9a55de053 Added osgViewer::View::setUpViewInWindow(...) method and command line option into
osgViewer::Viewer to allow you to specify the window dimentions and screen for
the window on startup.
2007-06-13 10:38:40 +00:00
Robert Osfield
7016db5f26 Removed ParallelSplitShadowMap as its currently a non op. 2007-06-13 09:56:12 +00:00
Robert Osfield
a7a0e2c4d3 Added Image::g/setOrigin to help movie plugins tell applications that the imagery
is not the usual OpenGL BOTTOM_LEFT orientation, but with the origin TOP_LEFT.  This
allows geometry setup code to flip the t tex coord to render the movie the correct way up.
2007-06-12 16:55:44 +00:00
Robert Osfield
e01e50c271 Moved the className, libraryName and isSameAs into public. 2007-06-12 15:32:04 +00:00
Robert Osfield
08a793eb87 From Stephan Huber and Robert Osfield,
Stephan: "attached you'll find some modifications to the GraphicsWindow-class and
their platform-dependant implementations.

The problem:
setWindowRectangle and setWindowDecoration do not update the
traits-object, so, if you call setWindowRectangle on a
not-realized-window it will open with another size when realized later.
getWindowRectangle reports possible wrong sizes if setWindowRectangle
called before.

My solution:
split the implementation in two parts:
GraphicsWindow::setWindowRectangle will update its traits-object and
call afterwards the virtual method setWindowRectangleImplementation
(which is implemented by the derived platformspecific classess). For
setWindowDecoration I am useing a similar mechanism.

I hope you'll find the submission useful, the Win32 and X11 changes are
not tested but should work."

Changes to this made by Robert are call of resized in setWindowRectangle 
instead of setting of Traits, and use of a bool return type.
2007-06-10 19:53:18 +00:00
Robert Osfield
b48ed1a4d4 Improved the set up of static build, added freetype plugin to plugins that support static usage 2007-06-10 09:51:29 +00:00
Robert Osfield
90ae3f385b Added DisplaySettings to osg::Camera, and support into osg::View for initializing
the Camera to the DisplaySettings ScreenWidth/Height/Distance.  Added support
for dual screen horizontal split stereo.
2007-06-09 10:06:38 +00:00
Robert Osfield
3e8be9ac7d From Stephan Huber, "attached you'll find a new GraphicsWindowCarbon-header and .cpp, the
changes I made:

+ put a warning in the console if a nonexistant screen is requested
+ add getters for the aglcontext and pixelformat -- I need access to
them in my own code.
"
2007-06-08 11:04:30 +00:00
Robert Osfield
2fbbbca1a0 From Mike Wittman, "This change to genwrapper and osgIntrospection gives access to
the declaring file for a given type via the new member function
osgIntrospection::Type::getDeclaringFile.  This information is useful
in order to know what header to include when auto-generating wrappers
for a given type.

During the C# wrapper generator development I've been keeping the
declaring file configuration state up-to-date manually with changes
to OSG, and it's proven to require substantial effort.  So it would be
extremely valuable to get this change in before 2.0 to reduce maintenance
during the lifetime of the release.  It'll also be equally useful to
others looking to create wrapper generators using osgIntrospection.

This is a fairly simple change and was tested with a fresh rebuild of the
entire suite of osgWrapper libraries, so it should be relatively low risk
(fingers crossed)."
2007-06-08 10:11:00 +00:00
Robert Osfield
191e12c4b1 Added const get*Matrix() methods 2007-06-08 09:17:42 +00:00
Robert Osfield
5a8ec8f470 Commented out the Scene Stats entry as its not implemented yet. 2007-06-07 20:26:29 +00:00
Robert Osfield
3b1c5c3b96 Introduced a destruct method to help clean up the Registry. 2007-06-07 11:19:02 +00:00
Robert Osfield
51d489fb97 Added View::home() method and updated wrappers 2007-06-07 09:58:49 +00:00
Robert Osfield
211abb16dc Updated version numbers for release 2007-06-06 21:43:38 +00:00
Robert Osfield
36d50301cf From Olaf Flebbe, "an implementation of GraphicsWindow::setCursor for WIN32." 2007-06-06 11:28:44 +00:00
Robert Osfield
85c8797bc4 Moved HelpHandler and StatsHandler classes into ViewerEventHandlers header, removed HelpHandler and StatsHandler headers 2007-06-06 11:21:13 +00:00
Robert Osfield
6844ac0209 Moved SimpleViewer from osgViewer into the osgviewerCocoa example directory as this
is the only place in the OSG that now relies upon SimpleViewer.
2007-06-06 10:58:21 +00:00
Robert Osfield
6e3c9ad3d3 Added support for passing in ArgumentParser in Viewer and CompositeViewer constructor 2007-06-06 10:57:02 +00:00
Robert Osfield
2c16c5b87d Change interator to const_iterator to try and avoid Solaris build failure 2007-06-05 14:37:55 +00:00
Robert Osfield
11ccf8f936 Removed const to try and avoid Sun compiler error 2007-06-05 08:46:32 +00:00
Robert Osfield
497604a192 Removed redundent comma 2007-06-05 08:30:24 +00:00
Robert Osfield
5138ff300b Updated version for 1.9.7 release 2007-06-04 16:20:24 +00:00
Robert Osfield
448efe0722 Added osg::Hint class 2007-06-04 10:47:15 +00:00
Robert Osfield
a9d9d387df Fixed spelling of Receives 2007-06-04 08:38:11 +00:00
Robert Osfield
30e4eb833f Updated wrappers 2007-06-03 10:00:09 +00:00
Robert Osfield
b5791629ea Added Viewer::setUpViewerAsEmbeddedInWindow convinience method 2007-06-03 09:34:28 +00:00
Robert Osfield
179f903c90 Added osgViewer::GraphicsWindowEmbedded and ported GLUT, SDL and WX examples across from SimpleViewer to Viewer. 2007-06-02 15:31:21 +00:00
Robert Osfield
b92ebca928 From Maria Ten, "The constructor method of the EllipsoidLocator of osgTerrain assumes
that the terrain is always the Earth planet. I changed the constructor
method to accept the Equator radius and the Polar radius like
parameters. By default, it assumes the Earth radius for the
EllipsoidLocator. I added a setEllipsoidModel method, too.

Now, we are developing some libraries for a GIS applicacion, and our
libraries can visualize terrains of planets like Mars. I think that is
a interesting change."
2007-06-01 21:33:29 +00:00
Robert Osfield
053ba0c543 From Wojciech Lewandowski, "I did few tests to see whether adding PreDraw callback would help us with SPI problems when using Viewer. Results were positive so I decided to give it a try and ask you to verify and maybe merge with existing codebase.
I added _preDrawCallback member and neccessary access methods plus modified osgUtil RenderStage.cpp to invoke it before all drawInner calls are made. I tried to maintain symmetry with postDrawCallback but you know better where is a proper place for this call ;-)
"
2007-06-01 19:45:24 +00:00
Robert Osfield
01c1bd28ef Updates to OverlayData 2007-06-01 19:44:09 +00:00
Robert Osfield
822868ca31 From Mathias Froelich, "have done an interface to change the mouse cursor in the X11 graphics
window.
The win32 implementation is still in its original shape since I have no win32
implementation available.

I have chosen the enum approach for the first cut. That is benefitial since
the user does not need to track creation of mouse cursors for different
windows and displays in presence of multiple viewer windows.

The default set of available mouse shapes is the same set that was available
with glut. That set served many OpenGL applications well, so the hope is that
this is enough.

Even though, that implementation is still extensible:
I have digged out the way SDL defines new mouse cursors and added a still
documented out function prototype in the GraphicsWindow that can be used to
extend the current implemtation for arbitrary mouse shapes. That is not
implemented yet.

I hope that somebody with a win32 test system can catch up that implementation
on win32."
2007-06-01 19:43:28 +00:00
Robert Osfield
fcafd4db06 From Stephan Huber, "attached you'll find the modified ImageStream
and a small fix for QuicktimeImageStream to disable debug-logging :)"
2007-06-01 19:19:23 +00:00
Robert Osfield
8f87e14416 From Mike Wittman, "Just found another issue building the C# wrappers: the osgTerrain ValidDataOperator file uses osg::Vec2, osg::Vec3, and osg::Vec4, but does not include their headers. The file with the relevant includes is attached.
"
2007-06-01 19:10:59 +00:00
Robert Osfield
0e62b4f0e9 From Paul Martz, added Win32 export 2007-06-01 16:14:47 +00:00
Robert Osfield
78c831f850 Changed name of AnimationPathHandler to RecordCameraPathHandler 2007-06-01 10:42:24 +00:00
Robert Osfield
5a80e4bfdc From Jeremy Moles, new event handler to record the camera path. A few small tweaks by Robert Osfield to make it more consistent with the old osgProducer::Viewer behavior. 2007-06-01 10:39:27 +00:00
Robert Osfield
02d2963df4 Updated version number, wrappers and readme for release 2007-05-28 10:17:52 +00:00
Robert Osfield
49217e8a88 From Frauciel Luc, "Added support for other pointers than mouses by using a nearpoint and farpoint instead of mousex,mousey + Camera (see Dragger and Dragger.cpp).
The major modification concern the LineProjector class in Projector.cpp. The intersection was previously done in window space, I've modified it to compute it in object space."
2007-05-28 10:14:29 +00:00
Robert Osfield
c072e4adac Updated wrappers 2007-05-27 19:35:50 +00:00
Robert Osfield
784383ac08 Added camera event callback support into osgViewer 2007-05-27 17:29:29 +00:00
Robert Osfield
005268e982 Fixes to help C# binding dev. 2007-05-26 15:49:35 +00:00
Robert Osfield
a8cae09c30 Added s/getOverlayBaseHeight methods 2007-05-25 16:00:38 +00:00
Robert Osfield
8a1ac890f3 Introduce C entry point support for plugin setup for better static build support 2007-05-25 15:27:06 +00:00
Robert Osfield
02b31fdcd9 From Peter Hrenka, fixes regarding line-strips and -loops. 2007-05-24 10:15:50 +00:00
Robert Osfield
30a06a033e From Peter Hrenka, (note from Robert Osfield, renamed GenericPrimitiveFunctor mention below to TemplatePrimitiveFunctor).
"Since we desperately needed a means for picking Lines
and Points I implemented (hopefully!) proper geometrical tests
for the PolytopeIntersector.

First of all I implemented a new "GenericPrimiteFunctor"
which is basically an extended copy TriangleFunctor which also
handles Points, Lines and Quads through suitable overloads of
operator(). I would have liked to call it "PrimitiveFunctor"
but that name was already used...
I used a template method to remove redundancy in the
drawElements method overloads. If you know of platforms where
this will not work I can change it to the style used
in TriangleFunctor.

In PolytopeIntersector.cpp I implemented a
"PolytopePrimitiveIntersector" which provides the needed
overloads for Points, Lines, Triangles and Quads to
the GenericPrimitiveFunctor. This is then used in the
intersect method of PolytopeIntersector.

Implementation summary:
- Points: Check distance to all planes
- Lines: Check distance of both ends against each plane.
  If both are outside -> line is out
  If both are in -> continue checking
  One is in, one is out -> compute intersection point (candidate)
  Then check all candidates against all other polytope
  planes. The remaining candidates are the proper
  intersection points of the line with the polytope.
- Triangles: Perform Line-Checks for all edges of the
  triangle as above. If there is an proper intersection
  -> done.
  In the case where there are more than 2 polytope
  plane to check against we have to check for the case
  where the triangle encloses the polytope.
  In that case the intersection lines of the polytope
  planes are computed and checked against the triangle.
- Quads: handled as two triangles.

This is implementation is certainly not the fastest.
There are certainly ways and strategies to improve it.


I also enabled the code for PolytopeIntersector
in osgkeyboardmouse and added keybindings to
switch the type of intersector ('p') and the picking
coordinate system ('c') on the fly. Since the
PolytopeIntersector does not have a canonical
ordering for its intersections (as opposed to
the LineSegementIntersector) I chaged the
implementation to toggle all hit geometries.


I tested the functionality with osgkeyboardmouse
and several models and it seems to work for
polygonal models. Special nodes such as billboards
do not work.


The next thing on my todo-list is to implement
a an improved Intersection-Structure for the
PolytopeIntersector. We need to know
which primitives where hit (and where).

"
2007-05-23 11:05:59 +00:00
Robert Osfield
c58221ddae Added _firstTimeToInitEyePoint = true to the setAutoRotateMode to force the AutoTransform
to recompute its position on next frame.
2007-05-22 15:17:52 +00:00
Robert Osfield
5056f6fee6 Added osg::Camera::ProjectionResizePolicy enum and associated methods for controlling
how the field of view is adjust on window resizes.
2007-05-22 09:32:38 +00:00
Robert Osfield
d22208f701 Added extra checks to make sure that graphics operations arn't done on no longer valid graphics contexts 2007-05-21 18:46:57 +00:00
Robert Osfield
08aabf9312 Fixed const method type 2007-05-21 11:49:37 +00:00
Robert Osfield
ccede7740e Updated version numbers for 1.9.5 release 2007-05-21 09:27:01 +00:00
Robert Osfield
d2aefbc09a Added static build support to export macros 2007-05-21 07:54:01 +00:00
Robert Osfield
e138b956c5 From Stephan Huber, "attached you'll find some modifications and enhancements to the carbon's
implementation of GraphicsWindow:

- usage of WindowData, you can specify an existing window to use via
osg::Traits
- implementation of setScreenResolution and setScreenRefreshRate
- implementation of setWindowDecoration when window is already created.

There seems to be  a bug regarding multiple threads and closing windows,
see my other mail on osg-users.
"
2007-05-20 13:42:41 +00:00
Robert Osfield
dd796df02a Added support for SG_USE_FLOAT_MATRIX and OSG_USE_FLOAT_PLANE in CMake build and
include/osg/Matrix and include/osg/Plane.
2007-05-20 11:45:09 +00:00
Robert Osfield
e37ec98748 Various additions to better support view dependent overlay node, and updated wrappers 2007-05-19 13:43:38 +00:00
Robert Osfield
e3747b1004 From Rafa Giatan and Robert Osfield, added support for User defined events, by adding
UserData to Events.
2007-05-19 13:39:55 +00:00
Robert Osfield
0d71586ee0 Added support for tracking the CoordinateSystemNode path, and passing this on to
camera manipulators.
2007-05-18 10:33:56 +00:00
Robert Osfield
cf9518f346 Added support for View::setFustionDistance(..) 2007-05-17 19:58:57 +00:00
Robert Osfield
c7fc2e018e From Andre Garneau, warnings fixes fo VC++ 2007-05-17 10:59:05 +00:00
Robert Osfield
8c10301d30 From Andre Garneau,"Please find attached changes to have the GraphicsWindowWin32 class
selectively set the pixel format for windows that are inherited, following
some discussions on the mailing list last week.

This is implemented through a new traits flag
(setInheritedWindowPixelFormat) with a default state of false (to avoid
breaking existing applications). When set to true, the pixel format of the
inherited window will be set according to the traits specifications.
"
2007-05-17 10:33:44 +00:00
Robert Osfield
78800829ed Refactored the internals of OverlayNode 2007-05-16 14:22:10 +00:00
Robert Osfield
9cfff7fa19 From Blasius Czink, "when creating windows with decorations (titlebar) the mouse position
should be adjusted."
2007-05-15 19:32:55 +00:00
Robert Osfield
1e0af35900 Added code to better compute the view frustum that is appropriate for a traversed
subgraph.
2007-05-15 17:04:57 +00:00
Robert Osfield
ab4398e440 From Farshid Lashkari, "I made a modification to the setClientActiveTextureUnit and
setActiveTextureUnit methods of osg::State so they return false if the
texture unit is outside the range of allowable units for the driver.
Currently, the functions would return true even if the units are
invalid. This would cause the osg::State to become out of sync with
the actual driver state, which can cause some bugs in certain cases.

The change I made would verify that the unit passed to
setClientActiveTextureUnit is below GL_MAX_TEXTURE_COORDS, and the
unit passed to setActiveTextureUnit is below
max(GL_MAX_TEXTURE_COORDS,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS). I
modeled this behavior from the OpenGL docs for these commands which
can be found here:

http://www.opengl.org/sdk/docs/man/xhtml/glClientActiveTexture.xml
http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml
"
2007-05-15 11:25:14 +00:00
Robert Osfield
dd1f6982dd Futher work on new view dependent overlay node 2007-05-15 11:22:25 +00:00
Robert Osfield
e41cd46da8 Set up new view dependent overlay technique control methods 2007-05-14 20:23:10 +00:00
Robert Osfield
55bd6129f4 Added include of GraphicsWindow to fix wrapper build error 2007-05-14 17:01:07 +00:00
Robert Osfield
4d6c08c543 Removed redundent comment '.' 2007-05-14 16:17:16 +00:00
Robert Osfield
51a4de5ec7 Fixed parameter name 2007-05-14 16:16:22 +00:00
Robert Osfield
74e968df76 Clean up comments and rebuilt wrappers.
Added extra event handlers to osgsimulator example
2007-05-14 16:14:40 +00:00
Robert Osfield
52b2548d31 Renamed ViewerEventHandler to ViewerEventHandlers 2007-05-14 15:16:26 +00:00
Robert Osfield
701ea582e5 Renamed the ScreenHandler to WindowSizeHandler, fixed the code style to be conform more
to the rest of the OSG, and moved the osgviewer across to using the event handlers
in osgViewer.
2007-05-14 15:07:04 +00:00
Robert Osfield
43549f3df6 From Serge Lages, "Here is a ViewerEventHandler file with a collection of helper handlers for osgViewer.
Most of the code is from the osgviewer application, I have took the fullscreen handler and the threading one, and I have just added a fonctionality to be able to change the screen resolution in windowed mode."
2007-05-14 14:41:22 +00:00
Robert Osfield
9e60a5d222 Updated wrappers and version numbers for 1.9.4 dev release 2007-05-14 09:33:32 +00:00
Robert Osfield
b97d8c0fe0 Added TerrainNode::init() and s/getTreatBoundariesToValidDataAsDefaultValue flag. 2007-05-13 09:54:51 +00:00
Robert Osfield
91ddcdf531 Added include 2007-05-11 20:16:52 +00:00
Robert Osfield
1cb4dfbcb5 Added new areThreadsRunning() method to Viewer and CompositeViewer.
Added removeView(View*) method to CompositeViewer

Added stopping/starting of threads in addView/removeView
2007-05-11 19:25:44 +00:00
Robert Osfield
acb2ed177c Added ValidDataOperator base class and NoDataValue and ValidRange subclasses, and
support for it in osgTerrain::Layer and GeometryTechniqnue.
2007-05-11 18:25:06 +00:00
Robert Osfield
8c7b5b5865 Added supoort for transforming layers by an offset and scale 2007-05-10 18:07:54 +00:00
Robert Osfield
c1332f6893 Removed rendundent const 2007-05-10 18:07:15 +00:00
Robert Osfield
63245f4147 Added getHWND, getHDC and getWGLContext methods 2007-05-10 10:52:35 +00:00
Robert Osfield
d8ee198735 From John Kelso,
"Attached are updates of src/osg/Sequence.spp and include/osg/Sequence.

I've taken _sbegin/_send/_ubegin/_uend and _step our of the include file
and made them local variables in whatever method might need them.

I got rid of the _recalculate method as it was only getting used in
one place.

I also found a cut/paste bug in setMode's START case."

Note from Robert Osfield, Also includes some guards against crashes that was occuring in this new
code when handling empty Sequences.
2007-05-09 11:11:19 +00:00
Robert Osfield
5d23bf7739 From Mike Weiblen, with mods of using references by Robert Osfield for efficiency. Submission notes from Mike:
"By repurpose, I'm creating a new plugin that uses much of the .osg fileformat,
but with some changes.  Specifically, I'm creating a ".osgfs" plugin, which
represents the scenegraph hierarchy as a filesystem of nested subdirectories and
individual files for each node, rather than nested braces with everything in a
single monolithic file.  I intend to incorporate file alteration monitor events
to watch the filesystem for modifications and automatically reload.

The problem I'm running into is osgDB is too tightly coupled to the .osg format.
osgDB::Output::writeObject() contains literal .osg format-specific strings like
"{" to represent the Object hierarchy at too low a semantic level.  I propose
using virtual methods; my plugin can then derive from osgDB::Output and
represent Object hiearchy differently.
"
2007-05-09 10:01:15 +00:00
Robert Osfield
790a1ea66f From Alan Harris, "Registry and Archive
~~~~~~~~~~~~~~~~~~~~~~~~~
This is a simple change to permit databases other than those named
"*.osga" to be used. It is hardcoded in read() at present.

It is non-critical and does not affect existing program functionality.

Registry and Registry.cpp
~~~~~~~~~~~~~~~~~~~~~~~~~
Added a new typedef:      typedef std::vector< std::string>
ArchiveExtensionList;

a list of extensions:     ArchiveExtensionList  _archiveExtList;

and an "add" method:      addArchiveExtension(const std::string ext)

This is initialised by adding "osga" in Registry() and used in
Registry::read() where the list is searched for the extension used.

Archive.cpp
~~~~~~~~~~~
This submission is a little more tentative. openArchive() is modified to
automatically add the filename extension to the Registry extension list.
"
2007-05-09 09:43:18 +00:00
Robert Osfield
6c74589014 Added signOrZero template method, and to Matrix_implementation.cpp usage of this
method in the get(Quat&) code.
2007-05-09 09:26:33 +00:00
Robert Osfield
5b9883516a Added CullSettings inheritance mask for LIGHTING_MODE and LIGHT 2007-05-08 10:02:07 +00:00
Robert Osfield
963cd837e3 Added s/getLightingMode and s/getLight to osg::View to allow control of the viewers
global light source.
2007-05-07 22:07:23 +00:00
Robert Osfield
0612fabc47 Updated version numbers for 1.9.3 release, combined INSTALL.txt and README.txt 2007-05-07 07:51:02 +00:00
Robert Osfield
dadb92ea64 Reorganised the managment of margins around glyphs so that is done entirely
with src/osgText/Font.cpp rather than the font plugins or Text.cpp
2007-05-04 12:05:29 +00:00
Robert Osfield
af5b6aa43e Added CartizianLocator 2007-05-03 16:23:19 +00:00
Robert Osfield
368f9b0034 Added return *this to operator = 2007-05-03 14:51:02 +00:00
Robert Osfield
65811d0233 Added virtual orientationOpenGL() method into osgTerrain::Locator. 2007-05-03 11:11:03 +00:00
Robert Osfield
859bcf3c4b Further perfomrmance optimizations and clean up on new VBO/EBO/PBO API. 2007-05-01 18:03:32 +00:00
Robert Osfield
40db1a8934 Moved VBO switching code into inline methods into osg::State to speed performance 2007-05-01 06:28:20 +00:00
Robert Osfield
d625a5e114 Implementated new dirty buffer mechansim for BufferObjects to make it more efficient 2007-04-30 12:18:27 +00:00
Robert Osfield
efb52dfab9 Added TerrainNode::setColorFilter(layerNum,Filter) to allow developers to set
what type of texture filter to use, either LINEAER and NEAREST.
2007-04-30 09:47:35 +00:00
Robert Osfield
22ad53d7d9 Updated version number for 1.9.2 dev release 2007-04-30 08:31:25 +00:00
Robert Osfield
aa56bddefc Added a MatrixTransform set up to provide a local origin for better precision. 2007-04-29 20:10:43 +00:00
Robert Osfield
921eb0fdd0 Further work on new VertexBufferObject/ElementsBufferObject support 2007-04-29 08:12:29 +00:00
Robert Osfield
47598ce1a9 Added back in osg::Geometry path 2007-04-27 17:03:06 +00:00
Robert Osfield
4968eb7136 Further work on the new VBO support 2007-04-27 14:52:30 +00:00
Robert Osfield
a3e6d8283d Further work VertexBufferObject and ElementsBufferObject classes 2007-04-26 16:50:06 +00:00
Robert Osfield
a1639c3d2d From Brad Colbert, "Added a new method to ImageStream called getLength that is used to
return the length of the stream.

Implemented the virtual methods in QuicktimeImageStream, (getLength,
getReferenceTime, setTimeMultiplier), to return valid value for each.
"
2007-04-26 08:11:09 +00:00
Robert Osfield
4b71e3948b Added VertexBufferObject and ElementBufferObject class interfaces, and wired
up osg::Array and osg::DrawElements* to these respectively.

Updated wrappers
2007-04-25 18:50:11 +00:00
Robert Osfield
5325653f30 Cleaned up numToTop method 2007-04-25 10:32:28 +00:00
Robert Osfield
cfe746f795 From Martin Aumueller, fixed unused parameter warnings 2007-04-25 10:12:46 +00:00
Robert Osfield
0e6bcc61f0 Updated version to 1.9.1 2007-04-23 20:21:06 +00:00
Robert Osfield
f242570269 Unified the setup of version numbers so that they all are based on the version
number setup in the include/osg/Version header file.
2007-04-22 20:19:43 +00:00
Robert Osfield
abd0c7fe67 Added support for sorting the graphics contexts so that the first context/window
returned from Viewer::getContexts/getWindows will be the left most window on the lowest screen number.

Added ability for StatsHandler and HelpHandler to support end users setting their
Camera's graphics context.
2007-04-20 16:17:48 +00:00
Robert Osfield
835e315494 Implement basic TerrainGeometry code 2007-04-16 19:34:25 +00:00
Robert Osfield
9db23e0b22 Fixed bug associated with complex RenderBin setup. 2007-04-16 12:18:56 +00:00
Robert Osfield
934ed30314 Added setWindowRectangle implementation for GraphicsWindowWin32, and
place holder for setWindowRectangle implementation for GraphicsWindowCarbon.
2007-04-13 14:23:10 +00:00
Robert Osfield
035b98993f Added s/getWindowRectangle to GraphicsWindow and implementation in GraphicsWindowX11 2007-04-13 13:22:52 +00:00
Robert Osfield
07c3503dbb Changed hitItr to be a const_iterator. 2007-04-13 13:19:29 +00:00
Robert Osfield
5954722c07 From Mike Wittman, fix to CopyOp&. 2007-04-12 09:32:34 +00:00
Robert Osfield
73f980bd49 Prep work on new TerrainGeometry Drawable which supports selective display list/VBO's usage.
Updated wrappers
2007-04-11 17:39:13 +00:00
Robert Osfield
557fdacba2 Added support for multiple colour layers, and fixed handling of elevation
and colour layers having different locator
2007-04-11 11:20:04 +00:00
Robert Osfield
cc1ab2c711 Create new incliude/osgViewer/api directory to hold platform specific classes such as GraphicsWindow implementations.
Moved GraphicsWindowWin32,X11 and Carbon into their api/Win32, api/X11 and api/Carbon directories.
2007-04-10 11:03:37 +00:00
Robert Osfield
6d7b5e7ebd From Eric Wing, pedantic warning fixes 2007-04-06 15:36:13 +00:00
Robert Osfield
8a5b8d9656 Set default ShadeModel back to SMOOTH 2007-04-05 20:27:02 +00:00
Robert Osfield
6c12c71337 Added constructor argument to ShadeModel 2007-04-05 16:12:10 +00:00
Robert Osfield
538a83dad4 Added support for flushing buffer objects 2007-04-04 09:07:46 +00:00
Robert Osfield
9b5bbe862d From Mike Wittman, C# build fixes 2007-04-04 08:05:23 +00:00
Robert Osfield
307a9a9a78 From Andy Skinner, warning fix for Windows 64-bit build 2007-04-03 19:42:43 +00:00
Robert Osfield
31d9f40a2f Preliminary work on TransferFunction support 2007-04-03 15:39:05 +00:00
Robert Osfield
43c24da12d Added setValue method and osg::Image setup to osg::TransferFunction1D, and setup
of TransferFunction1D into osgterrain example.
2007-04-02 13:06:59 +00:00
Robert Osfield
d434ee0db8 Added support for reading values from an ImageLayer, and building of the
elevation data in GeometryTechnique.
2007-03-30 14:57:57 +00:00
Robert Osfield
a2ecb93c2b Converted osg::HeightField across to using a osg::FloatArray internally to enable
it to be assigned as a vertex attribute array to an osg::Geometry.

Removed the osgTerrain::ArrayLayer as its no longer required thanks to the above change
which makes the osgTerrain::HeightFieldLayer more flexible.  

Updated wrappers
2007-03-29 19:42:07 +00:00
Robert Osfield
5ba0e5b930 Fixed missing initializer in Options constrctor 2007-03-29 19:39:20 +00:00
Robert Osfield
0f507e317d Removed the using to avoid VS 7.1 build problem 2007-03-29 15:41:59 +00:00
Robert Osfield
cb811aa7cd Added support for compute the extents on local NDC coordiantes of the
elevation and colour layers
2007-03-28 16:28:20 +00:00
Robert Osfield
b7967b7007 From Mike Wittman, "Here is a change to the .cpp file to fix it by disambiguating the cull invocation." 2007-03-28 15:05:49 +00:00
Robert Osfield
7fc714ada1 Removed deprecated drawImplementation(State&) method from Drawable and Drawable::DrawCallback 2007-03-28 11:30:38 +00:00
Robert Osfield
d30a33247d Replaced the X11 Window by Carbon WindowRef in the WindowData structure. 2007-03-28 08:52:44 +00:00
Robert Osfield
78ed8f9219 Add computeBound support to TerrainNode and Layer. 2007-03-27 19:27:36 +00:00
Robert Osfield
4688d5ae8e Rearranged the traversal and initialization of TerrainTechnique 2007-03-27 16:01:01 +00:00
Robert Osfield
e76e4e82db Added EllipsoidLocator. 2007-03-27 11:23:57 +00:00
Robert Osfield
404d583b3e Added return false; to default implementations of convert functions 2007-03-26 19:24:18 +00:00
Robert Osfield
8dc2a28945 Removed WindowData parameter from init(). 2007-03-26 16:28:26 +00:00
Robert Osfield
1cdda0654f Added Locator and layer setting to osgterrain example 2007-03-26 15:52:22 +00:00
Robert Osfield
7013c12a0d From Mike Wittman, "This is another weirdo change to support code generation. It brings all the Drawable::supports and Drawable::accepts overloads into the ShapeDrawable scope to avoid errors invoking the ones that are not defined in ShapeDrawable. Currently you'll get compilation errors if you pass a Drawable::AttributeFunctor or PrimitiveIndexFunctor to the "accept" function invoked on a ShapeDrawable pointer or reference, since those overloads are only defined in the base class. You'll also get the same error passing a PrimitiveIndexFunctor to the "supports" function. These errors occur because C++ function overload resolution does not cross inheritance boundaries." 2007-03-26 13:00:29 +00:00
Robert Osfield
37f4740c45 From Mike Wittman, remove redundent const from in front of unsigned int.
From Robert Osfield, updated wrappers
2007-03-23 17:27:53 +00:00
Robert Osfield
56a1808794 Added ImageLayer, ArrayLayer and HeightFieldLayer classes 2007-03-21 17:18:53 +00:00
Robert Osfield
541c3f13e9 Added GeometryTechinque to osgTerrain. Added usage of GeometryTechnique into osgterrain example
Added --width and --height command line options to osgdistortion to allow users
to control the window size.
2007-03-21 16:34:04 +00:00
Robert Osfield
32166ca631 Build fixes 2007-03-19 10:54:39 +00:00
Robert Osfield
ed9aa1c6bf Removed now redundent method 2007-03-18 11:04:12 +00:00
Robert Osfield
069adcf555 From David Callu, " bug:
Lost the functionality to find the real type pointed by a pointer.
   Ex: a osg::Node pointer point on a osg::Group, if I look for information
       on the pointer type, the introspection say it is a "osg::Node*".
       But if I want information on the pointed type,
       the introspection must return the "osg::Group".
   

   This bug come from the osgIntrospection::Value::Ptr_instance_box::ptype() function.
   In the original version, this function use the member "Instance_base *inst_"
   like this :
      typeof(*static_cast<Instance<T> *>(inst_)->_data)

   But in the new version, this function use the template argument "T":
      typeof(typename remove_pointer<T>::type)

   This is a good meta-programming use, but here we need a dynamic request.

   Moreover the "typeof" macro define in "Reflection" header accept only a type in parameter with the new version.
   


 fix:
   Add the macro "typeofvalue" in "Reflection" header which accept a value or a type in parameter.
   Restore original code in osgIntrospection::Value::Ptr_instance_box::ptype() function.
"
2007-03-16 14:28:27 +00:00
Robert Osfield
aa28f60357 Added WindowData structures to GraphicsWindowX11,Win32 and Carbon to help support
GraphicsWindow inheriting their window handles from an external toolkit
2007-03-16 13:22:05 +00:00
Robert Osfield
2fae221f2d Added class shells for osgTerrain::Locator and osgTerrain::Layer classes 2007-03-14 12:00:54 +00:00
Robert Osfield
c489b0af2c Renamed HeightFieldNode and HeightFieldRenderer to TerrainNode and TerrainTechnique respectively 2007-03-14 11:24:04 +00:00
Robert Osfield
083618cc65 Added inheritedWindowData member variable to Traits. 2007-03-11 11:48:03 +00:00
Robert Osfield
bff1b51361 Added preliminary work on osg::TransferFunction 2007-03-10 11:53:31 +00:00
Robert Osfield
ebb571473f Changed _pixel_x and _pixel_y to be floats 2007-03-06 12:01:55 +00:00
Robert Osfield
579700bedf From Mike Wittman, " noticed that some type references of osg::Drawable::AttributeFunctor, osg::Drawable::ConstAttributeFunctor, and osg::StateAttribute::ModeUsage in osg and osgSim were not being properly reflected in osgIntrospection. This appears to be due to Doxygen not handling nested types from superclasses if they're not qualified when referenced in subclasses.
These changes add the necessary superclass type qualification so that Doxygen now recognizes the references."
2007-03-05 17:34:36 +00:00
Robert Osfield
6c56383ba9 From Mike Wittman, added protected function support 2007-03-01 11:54:30 +00:00
Robert Osfield
96b30c3509 Added mention of LODScale in docs 2007-02-28 10:10:21 +00:00
Robert Osfield
459696fdb2 From Paul Martz, updated the LOD documentation 2007-02-28 10:08:45 +00:00
Robert Osfield
b00cbe5a17 Moved include/osgTerrain/DataSet/.cpp, gdal plugin and osgdem out into the VirtualPlaneBuilder project.
Updated examples to remove DataSet/GDAL dependency.

Updated wrappers
2007-02-27 21:12:48 +00:00
Robert Osfield
eb4ad4229f Moved osgProducer and osgproducerviewer out into their own repository.
Clean up the source for remaining references to osgProducer/Producer.
2007-02-27 13:16:18 +00:00
Robert Osfield
7f8f4e331a Completed changes to osgManipulator to make it more flexible w.r.t viewer usage, and
ported osgmanipulator example across of osgViewer
2007-02-26 13:01:17 +00:00
Robert Osfield
f43cd7332c Further work on add serialization support for osgViewer configurations 2007-02-25 20:05:23 +00:00
Robert Osfield
ad3cac84e9 Moved Block, ReentrantMutex and ReadWriteMutex into OpenThreads. 2007-02-23 16:31:34 +00:00
Robert Osfield
96f567eff3 Added bool View::Slave::_useMastersSceneData to help manage HUD's and RTT
cameras that are embedded in the Viewer's View
2007-02-23 11:53:45 +00:00
Robert Osfield
ee9440d155 Added Camera::s/getAllowsEventFocus() method to allow osgViewer to have non interfactive cameras such as RTT ones 2007-02-21 19:06:43 +00:00
Robert Osfield
228fd04a19 Removed the exclusion of CullSettings from the genwrapper.conf, and then changed the CullStack RefMatrix& methods to RefMatrix*
as the RefMatrix& versions caused the wrappers to fail.
2007-02-21 13:48:01 +00:00
Robert Osfield
57c2939174 Added g/setUpdateVistor method 2007-02-19 20:57:08 +00:00
Robert Osfield
37526e3bea Implemented basic ShadowMap technique 2007-02-19 14:20:18 +00:00
Robert Osfield
d5c68cfa02 Moved CameraCullCallback into ShadowTechnique scope to make it more resusable between various Techniques 2007-02-19 12:13:30 +00:00
Robert Osfield
a3594bc653 Added new osg::ComputeBoundsVisitor 2007-02-16 17:34:34 +00:00
Robert Osfield
3817dbf1a2 From Roland Smeenk, "ClipNode contains a method getClipPlaneList that should actually be called setClipPlaneList." 2007-02-16 15:17:43 +00:00
Robert Osfield
526ba8c506 From Stephan Huber, "I added a bool to GraphicsContext::Traits to indicate wether to use the
multithreaded-opengl-engine on os x or not. I set its default to false,
perhaps other os x users can test this setting with their data/apps, to
see if we can enable it by default.

I changed also the borderless-window-type, so expos?works correctly."
2007-02-16 13:33:29 +00:00
Robert Osfield
fd3a0c25ba Fleshed out a bit more of the ShadowTexture implementation 2007-02-16 10:20:10 +00:00
Robert Osfield
dbb7c3c74c Added support for using the new osgShadow plugin as a psuedo loader such that:
osgviewer cow.osg.shadow

Or to ShadowVolume rechnique specifically:

  osgviewer cow.osg.sv.shadow
2007-02-15 22:28:32 +00:00
Robert Osfield
3e6a91c079 From Mike Wittman, "The template-argument-list errors look to be due to a lack of spaces in the typeof macro. Here's a new Reflection header which should fix those problems. For consistency I think that's the best solution." 2007-02-15 15:03:30 +00:00
Robert Osfield
272ab99767 Reorganised the text comments so that they are shorter length, and hopefully will
avoid VS2003's silly text string limits when compiling osgIntrospection wrappers
2007-02-15 14:53:54 +00:00
Robert Osfield
ed01ae9387 From André Garneau, Win32 build fixes 2007-02-15 14:04:22 +00:00
Robert Osfield
3fe4be6e70 Added context sharing support. 2007-02-15 12:24:04 +00:00
Robert Osfield
b717790dcb Removed inappropriate Stats:: prefix 2007-02-15 10:25:11 +00:00
Robert Osfield
f60330df31 Added extra spaces between <> template declarations 2007-02-15 09:17:03 +00:00
Robert Osfield
acf10c827e Removed setFrameStamp 2007-02-15 08:29:09 +00:00
Robert Osfield
b7b8e7ed98 Removed extrandous Stats:: prefix 2007-02-15 00:53:52 +00:00
Robert Osfield
87ff8e2b55 Added support for sharing context to GraphicsWindowX11 2007-02-14 20:14:45 +00:00
Robert Osfield
f82c34ff11 Added getState()->setGraphicsContext(this); to the various GrpahicsWindow implementations 2007-02-14 17:28:33 +00:00
Robert Osfield
810e7291fc Added use of Mutex into osg::Stats to better handle multi-threaded usage 2007-02-14 16:24:49 +00:00
Robert Osfield
07411f3246 Introduced new osg::Object::DataVariance type of UNSPECIFIED, and changed the deafult
values of DataVariance to UNSPECIFIED to all types.
2007-02-14 13:18:58 +00:00
Robert Osfield
89c99a88fa Added computeDataVariance method into osg::Object and implementations in Drawable and StateSet,
and calling of osgUtil::StaticObjectDetectionVisitor in osgViewer::Viewer
2007-02-14 11:24:42 +00:00
Robert Osfield
5dcb7af6a4 From Mike Wittman, added spaces into < > macros 2007-02-14 11:21:41 +00:00
Robert Osfield
264d69e0c9 From Mike Wittman, support for reference parameters 2007-02-13 09:33:35 +00:00
Robert Osfield
d28a6011f1 From Mike Wittman, "Here is the next in the series of changes I'm making to OSG introspection to support the attributes needed for C# bindings. This change adds virtual/pure virtual attributes to MethodInfo and an explicit attribute to ConstructorInfo using the implementation strategy that David Callu recommended a few months back (thanks David!). This change updates both genwrapper and osgIntrospection, and assumes the osgIntrospection reference support that's still pending in your submission queue." 2007-02-12 17:59:18 +00:00
Robert Osfield
a725e0af7d From Mike Wittman, "These changes add support for reflection of reference and const reference type representations via osgIntrospection::Type. This covers just the static type information; the dynamic behavior via Type::createInstance/Type::InvokeMethod should not be affected." 2007-02-12 17:14:46 +00:00
Robert Osfield
fe177e42d5 Added osgViewer::HelpHandler 2007-02-12 13:39:18 +00:00
Robert Osfield
3006bb14f4 Changed osgManipulator::Dragger::handle(..) method to use a nested PointerInfo
class to encapsulate the pixel coords, SceneView and picking operations in prep for
making the code more general purpose, and less reliant on classes like osgUtil::SceneView and osgUtil::IntersectVisitor.
2007-02-11 21:12:34 +00:00
Robert Osfield
1484ab515e Changed the osg::Shape related projectors so that they used pointers rather
than references.
2007-02-11 12:22:58 +00:00
Robert Osfield
19db0c1674 From Vivek Rajan, new osgManipulator library, with a few minor tweaks and rename for osgDragger to osgManipulator for build by Robert Osfield.
Vivek's email to osg-submissions:

"I'm happy to release the osgdragger nodekit to the OSG community. I
implemented the nodekit for my company, Fugro-Jason Inc., and they
have kindly agreed to open source it.

The nodekit contains a few draggers but it should be easy to build new
draggers on top of it. The design of the nodekit is based on a
SIGGRAPH 2002 course - "Design and Implementation of Direct
Manipulation in 3D". You can find the course notes at
http://www.pauliface.com/Sigg02/index.html. Reading pages 20 - 29 of
the course notes should give you a fair understanding of how the
nodekit works.

The source code also contains an example of how to use the draggers."
2007-02-11 10:33:59 +00:00
Robert Osfield
f1a82f35b2 From Vivek Rajan, MatrixDecomposition implementaion, adapted by Robert Osfield
to be part of osg::Matrixf and osg::Matrixd classes.
2007-02-10 18:01:37 +00:00
Robert Osfield
760cfeaadb Cleaned up osgshadow example so that it now relies upon osgShadow for its
shadow implementation
2007-02-09 21:31:29 +00:00
Robert Osfield
9aae37e357 Moved the basic ShadowVolume code into osgShadow 2007-02-09 16:03:29 +00:00
Robert Osfield
2a9d2bb25a Changed GraphicsWindowX11 so that it creates two Display* connextions to the Xserver,
one for the graphics thread, one for the main thread that querries events
2007-02-09 13:51:28 +00:00
Robert Osfield
c2665963bb Further work on osgShadow::ShadowTechnique API 2007-02-08 19:34:38 +00:00