Commit Graph

5484 Commits

Author SHA1 Message Date
Robert Osfield
d23c04018b Updated wrappers 2006-11-08 11:49:35 +00:00
Robert Osfield
a11dd1c479 From Eric Wing, updates to Xcode project for new osgViewer library 2006-11-08 10:00:43 +00:00
Robert Osfield
a1f20f1a00 From Eric Wing, change osgGA::SimpleViewer to osgViewer::Viewer.
From Robert Osfield, added -losgViewer & -losgGA to makefiles.
2006-11-08 09:50:27 +00:00
Robert Osfield
530e9e08d4 Added better handling of writeNode operations that arn't successful. 2006-11-07 17:00:56 +00:00
Robert Osfield
ac9a28051f Fixed the writeNode function so it was properly return FILE_NOT_HANDLED, fixing
a big with it writing out an empty .flt file.
2006-11-07 17:00:29 +00:00
Robert Osfield
c607a6dd7f Updated wrappers 2006-11-07 14:26:48 +00:00
Robert Osfield
5ac6ea9a8d Ben van Basten, "1 Bug fix in reuseParticle where originally an old particle that was already killed would be killed again, but instead should have been placed on the dead stack for future reuse.
2 Getter/setter for _maxNumberOfParticlesToSkip that is used for filtering of particles during draw. This enables you to turn the filtering of by setting this value to zero.

3 Getter for retrieval of the first particle in the trail. This allows you to directly manipulate the trail from your application by walking from the start particle towards the end of the trail."

Submitted on Ben's behalf by Roland Smeenk.
2006-11-07 13:48:20 +00:00
Robert Osfield
c9fed221a5 Added initial cut of osgShadow::OccluderGeometry 2006-11-07 13:43:01 +00:00
Robert Osfield
d199fd0072 Changed debug output from NOTICE to INFO 2006-11-07 13:26:31 +00:00
Robert Osfield
6a81dc157d From Tery Welsh, added support for inheriting all CameraNode CullSettings and then restoring the original values. 2006-11-07 13:00:14 +00:00
Robert Osfield
d061c087fa Removed debug comment. 2006-11-07 12:08:03 +00:00
Robert Osfield
86c6a88c98 From Mathias Froehlich, workaround fix for problematic run length encoded RGB files. Robert Osfield ammend workaround to support multi-byte colour channels. 2006-11-07 12:02:37 +00:00
Robert Osfield
c289cdca57 Thanks to Björn Hein for spotting mistakes in EventQueue.cpp and StateSetManipulator, now fixed by Robert Osfield. Problems were:
"StateSetManipulator.cpp (rev 1.12, l. 85): cyclePolygonMode() is called but
no aa.requestRedraw() afterwards. Is this intended?

EventQueue.cpp (rev 1.8): in keyRelease & keyPressed KEY_Alt_R was mapped to
MODKEY_LEFT_ALT"
2006-11-06 13:22:57 +00:00
Robert Osfield
28defbbbad Added osgViewer library to build list 2006-11-03 14:07:20 +00:00
Robert Osfield
5be6995022 Added IntersectionVisitor to wrappers 2006-11-02 18:58:01 +00:00
Robert Osfield
4606948bb8 Added IntersectionVisitor to osgUtil project 2006-11-02 17:07:32 +00:00
Robert Osfield
06cca16a2a Added convinience constructors to help support picking with the new osgUtil::Intersector classes. 2006-11-02 17:05:46 +00:00
Robert Osfield
7d12b85632 Added basic PolytopeIntersector functionality based on checking vertices against
polytopes.
2006-11-02 15:50:04 +00:00
Robert Osfield
c3643a738c Renamed osgviewer.dsp to osgviewerapplication.dsp and fixed directory name of osgsimpleviewerProducer 2006-11-02 15:40:42 +00:00
Robert Osfield
1c91b505dd Fixed bug in Polytope::contains(const std::vector<Vec3>& vertices) which resulted
in false positives.
2006-11-02 15:22:38 +00:00
Robert Osfield
984ac93749 Updated wrappers 2006-11-02 12:32:41 +00:00
Robert Osfield
e0f395fd07 Moved SimpleViewer and GraphicsWindow into their own osgViewer library, updated simpleviewer examples to reflect this change 2006-11-02 12:27:15 +00:00
Robert Osfield
f9fb99dc43 Added prelimnary work on PolytopeIntersector. 2006-11-02 12:17:06 +00:00
Robert Osfield
15f7abe100 Improved handling of projected coords in new intersection classes 2006-11-01 17:18:45 +00:00
Robert Osfield
75169ad16f Added support for osgUtil::Intersectors being in WINDOW, PROJECTION, VIEW or MODEL coordinates 2006-11-01 14:41:32 +00:00
Robert Osfield
a253e17d3e Implemented HeightAboveTerrain and added usage into osgintersection 2006-10-31 12:59:51 +00:00
Robert Osfield
e9b501002c Added LineOfSight and HeightAboveTerrain classes 2006-10-31 08:41:24 +00:00
Robert Osfield
16c238fc60 Added osgSim::LineOfSight and osgSim::HeightAboveTerrain classes 2006-10-30 20:29:06 +00:00
Robert Osfield
c615f7345c Updated wrappers 2006-10-30 12:39:05 +00:00
Robert Osfield
0f65ed9189 From Per Fahlberg, "Attached is a fix to get the proper normals on an md2 model, actually
the way it was before would sometimes lead to a crash since it was
attaching the wrong array to the geometry..."
2006-10-30 12:28:37 +00:00
Robert Osfield
f9b9efec16 From Vladimir Shabanov, "The DDS plugin didn't correctly read mipmapped A8L8 textures.
I've attached a small fix for this.

Cause: uncompressed mipmap handling was done only for RGB pixel format.

Fix: added condition for handling alpha and luminance formats too."
2006-10-30 12:23:37 +00:00
Robert Osfield
baeb41a416 From Michael Henheffer, "There's a problem with OverlayNodes where the texture will not display
if continuous updating is set to false.

The problem was being caused by the camera update call never being made
if continuous updating was not set to true.  This fix adds a flag that
is set when dirtyOverlayTexture() is called and checked in the update
visitor section of the traversal to determine if the camera should be
updated.

I tested the fix by making some changes to the osgAnimate example
program so it has continuous updating off and calls dirtyOverlayTexture
for each frame.  The overlay texture now displays properly."
2006-10-30 12:19:41 +00:00
Robert Osfield
c5c4c5da1d From Edgar Ellis, "
method may not take the node into consideration when computing its bound.

In this case of:
switch->insertChild(0, child, false);
switch->insertChild(1, child, true);

child will not be used in computeBound, but will be drawn.

Solution:
Changed compute bound to loop over children using an index instead of an
iterator. This behaviour matches that of the traverse method."

-----------------------------------------------
2006-10-30 12:14:00 +00:00
Robert Osfield
a48a4aa7d3 From Michael Henheffer, "Bug: The reader would crash when trying to load a .tif image that
contained an 8-bit color map.  The crash occured at line 545:

remap_row(currPtr, inbuf, w, red, green, blue);


Cause:  The code was trying to write past the end of the buffer while
doing this remapping.  The size of the buffer is determined based on the
value of 'format', which was 1 in this case since bitspersample is
8(indicating a 8-bit color map).  The buffer should have been created 3
times as large since that 8-bit value is indexing a 24-bit color.


Fix:  I've put in an if statement to set format to 3 if 'photometric'
indicates the tif contains a palette as the output data will always be
24-bit color data in this case."
2006-10-30 12:05:56 +00:00
Robert Osfield
321215c6ec From Mathieu Marache, fixed osgsimpleviewerQt4 so that it uses the correction options 2006-10-30 11:55:02 +00:00
Robert Osfield
b4135398da Added handling of geometry indices offset when merging geometries with indices 2006-10-30 11:00:25 +00:00
Robert Osfield
358b96e953 Added osgUtil::IntersectorGroup to handle groups of osgUtil::Intersectors 2006-10-27 15:11:17 +00:00
Robert Osfield
0fe424996d From Andrew Lorino and Robert Osfield, Improvements to the handling of texture paths 2006-10-26 16:52:10 +00:00
Robert Osfield
ce3929fd5f Added beginings of new osgUtil::IntersectionVisitor and osgintersection class 2006-10-26 16:03:17 +00:00
Robert Osfield
d5aaa6e530 Updatd wrappers 2006-10-26 16:02:38 +00:00
Robert Osfield
44a77dda7c Tweaked doxygen docs. 2006-10-24 16:24:24 +00:00
Robert Osfield
c892fafa1c Updated wrappers 2006-10-24 09:45:50 +00:00
Robert Osfield
85dc696c09 Added FadeText::setFadeSpeed and made internal data structures protected. 2006-10-24 09:06:28 +00:00
Robert Osfield
648455da34 Changed the dependency list to use -losg -losgDB instead of OSG_LIBS 2006-10-23 15:29:59 +00:00
Robert Osfield
8544337aca Fixed OSX x86 endian issue in Quicktime movie plugin. 2006-10-21 21:06:27 +00:00
Robert Osfield
f3b71fc2ac From David Callu:
"
  the main problem is the wrapper generation:
       The PropertyInfo class use MethodInfo class to access to the value.
       When the property are define with the I_Property* macro,
       the MethodInfo use by the property to have access to the value
       are instancied in the I_Property* macro, but there
       are already instantied by the I_Method* macro before


   secondary problem:
      - the function used by the property could no be customized
        in the genwrapper.conf file
      - an array property can't insert a value
      - the std::map reflector (and indexedProperty in general) haven't remove method
      - about the help in wrapper ... why not ...



   solution :
      To use the function define by the I_Method, I add a MethodInfo variable in the I_Method0 macro
        old macro :
           #define I_Method0(ret, fn) (\
           params.clear(),\
           addMethod(new osgIntrospection::TypedMethodIn
fo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params)))

        new macro :
           #define I_Method0(ret, fn, signature, briefHelp, detailedHelp) \
           params.clear(); \
          osgIntrospection::MethodInfo* signature = addMethod(new osgIntrospection::TypedMethodInfo0<reflected_type, ret >(qualifyName(#fn), &reflected_type::fn, params, briefHelp, detailedHelp)); sink(signature)



    the osgIntrospection::MethodInfo* signature is used by the I_Property macro to define the MethodInfo that it use

    so for I_Property macro :
        old macro :
          #define I_PropertyWithReturnType(t, n, r) \
          cap=addProperty(new osgIntrospection::PropertyInfo(osgIntrospection::Reflection::getType(typeid(reflected_type)), osgIntrospection::Reflection::getType(typeid(t)), #n, \
          I_Method0(t, get##n), \
          I_Method1(r, set##n, IN, t, value)))

         new macro:
           #define I_SimpleProperty(t, n, get, set) \
           get, \
           set))

      The genwrapper has been modified in this way.
      The method signature is define by the prototype of the method
      For example, the "const char* libraryName();" have "__C5_char_P1__libraryName" for signature


   solution for secondary problem:
      The genwrapper accept new tokens in the configuration to custumize the property.
      The new PropertyInserter and the CustomPropertyInsertAttribute class has been defined
      The PropertyRemover has been added to the StdMapReflector
      The _briefHelp and _detailedHelp variable has been added in PropertyInfo, MethodInfo and ContructorInfo class






   modification:

      I have modify the genwrapper files
          Configuration.cpp Configuration.h                          add some tokens to custumize the property
          Doxyfile.template                                                 add the comment in the output xml
          genwrapper.conf                                                  customize some property in osg::Geometry
          RegistryBuilder.h RegistryBuilder.cpp                    add the process_help function (to extract help from xml)
          TypeRegister.cpp TypeRegister.h                         optimize the property detection
          TypeDesc.h TypeDesc.cpp                                   modify FunctionDesc and PropertyDesc
          WrapperGenerator.h WrapperGenerator.cpp          modify the output




      I also modify the fallowing osgIntrospection files:

          include/osgIntrospection/Attributes                              add the PropertyInserter and the CustomPropertyInsertAttribute class
          include/osgIntrospection/ConstructorInfo                      add the _briefHelp and _detailedHelp variable in the ConstructorInfo class
                                                                                          add access function for the two new variables (_briefHelp and _detailedHelp)
                                                                                          modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
          include/osgIntrospection/MethodInfo                            add the _briefHelp and _detailedHelp variable in the MethodInfo class
                                                                                          add access function for the two new variables (_briefHelp and _detailedHelp)
                                                                                          modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
          include/osgIntrospection/PropertyInfo                          add the _briefHelp and _detailedHelp variable in the PropertyInfo class
                                                                                          add access function for the two new variables (_briefHelp and _detailedHelp)
                                                                                          modify the constructor to define the two new variables (_briefHelp and _detailedHelp)
          include/osgIntrospection/ReflectionMacro                    remove unused I_Property* macro
                                                                                          modify all I_Method macro to accept the help string
                                                                                          modify all I_Method macro to define a MethodInfo signature
          include/osgIntrospection/Reflector                              add the PropertyInserter in StdVectorReflector and StdListReflector
                                                                                          add the PropertyRemover in the StdMapReflector
          include/osgIntrospection/StaticMethodInfo                   modify all StaticMethodInfo* to accept the help in parameter
          include/osgIntrospection/TypedMethodInfo                  modify all TypedMethodInfo* to accept the help in parameter
          include/osgIntrospection/TypedConstructorInfo             modify all TypedConstructorInfo* to accept the help in parameter
          include/osgIntrospection/Type                                     add the _briefHelp and _detailedHelp variable in the Type class

"
2006-10-17 15:17:06 +00:00
Robert Osfield
763c25a1ed Changed name osg osgshadow example.dsp to avoid MS conflicts 2006-10-17 12:29:07 +00:00
Robert Osfield
a24eb4f9ef Added osgshadow example 2006-10-17 11:28:34 +00:00
Robert Osfield
efd543d1b0 Ported FLTK example across to using GraphicsWindow 2006-10-15 11:56:52 +00:00
Robert Osfield
a8f44479db Ported across to using GraphicsWindow. 2006-10-15 11:39:35 +00:00