the specification. With these mods, blink sequences are now created for
flashing light point nodes, either palletized (v.15.8 and later) or
non-palletized (15.7 and earlier). Thanks to Brede for his
implementation of the palletized light point nodes.
There is still work to do on adding the capability to properly handle
light point system nodes, but this does add some capability that did not
previously exist. So, I wanted to at least submit this and I will
hopefully provide the additional capability in the near future.
I've tested the code modifications with Visual Studio 2005. I don't
have the means to test any other operating system, but I would suspect
that there shouldn't be any issue (famous last words). I used the test
files that I uploaded to the users forum to test the changes.
In addition to the added capability, I changed the light point node
radius to the "actualPixelSize" value in the file. Previously, the
radius was set to half the actual pixel size (see
LightPointRecords.cpp). Not sure why this was the case. But, it was
brought to my attention by a co-worker who created the OpenFlight files
and was testing them with different viewers. If there's some history
for setting the radius to half the size, then this change can be
omitted."
implements the LightPointSystem class to allow for the OpenFlight
plug-in to read and handle light point system nodes. The behavior is
very similar to the old plug-in in that a MultiSwitch node is created to
handle the "enabled" flag bit set in the node record. The code also
reverts the changes for the actualPixelSize as mentioned above. And
lastly, the code requires the previously submitted changes for the
plug-in.
As for the other changes, I've tested the code with Visual Studio 2005
and the files that I posted in the users forum.
With all of the submitted changes, the OpenFlight plug-in should now be
capable of loading files with light point system nodes and the use of
palletized light points and non-palletized light points.
"
accepted file extensions, so that once the plugin was loaded in the
Registry it would grab any image file write request, regardless of the
file extension. This was a particular problem if it was statically loaded."
"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).
"
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.
"
according to the OpenSceneGraph/CMakeLists.txt and the include/osg/Version settings.
These changes mean that the 1.9.5 release will have a libs/osgPlugins-1.9.5 directory.
I added a new protected virtual method to ImageStream called
applyLoopingMode() which is called from setLoopingMode. The
quicktime-plugin has an implementation of applyLoopingMode which sets
some flags for the quicktime, so that quicktime handles the loop
playback by itself.
This has some benefits:
+ no gaps when looping audio
+ simplified code
Attached you'll find the modified files, hope you'll find them useful."
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.
"
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.xmlhttp://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml
"
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."
"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.
"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.
"
~~~~~~~~~~~~~~~~~~~~~~~~~
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.
"
return the length of the stream.
Implemented the virtual methods in QuicktimeImageStream, (getLength,
getReferenceTime, setTimeMultiplier), to return valid value for each.
"
a collegue of mine noticed that on Windows and X11 the modifier state (such as
Alt or Ctrl) would be applied one key press too late: e.g. press & hold Alt,
press a, release Alt, press a, press a would generate the key sequence a,
Alt-a, a instead of Alt-a, a, a.
The problem is also present on Carbon. Moving the call to setModKeyMask in
front of the call to keyPress fixed it for me on Carbon and X11. I suppose
that this will fix the problem for Windows as well."
Just as in the pre-r6419 I used the COIN_BASIC_H define in order to discriminate
between the two versions of Inventor.
Additionally, I had to change the CMakeLists.txt to use the proper include path.
"
"I was working on a new version of Inventor plugin.
It was inspired by the need to get correct and high quality conversion,
so I verified the plugin on complex models and made number of serious fixes:
- the geometry is not two times on the output file (!)
- SoVRMLImageTexture: VRML texture support was rewritten according to
Inventor programming practices, since it does not worked correctly on
many models (Anyway, thanks for Gerrick Bivins to introduce it.)
- osg::ref wrong usage related crash fixed
- code cleaning and texture code overhaul
- LOD fixes
- appended README.txt with all the contributors I was able to get from
SVN logs"
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.