Commit Graph

1826 Commits

Author SHA1 Message Date
Robert Osfield
c24289315a Fixed comment 2006-11-15 20:24:09 +00:00
Robert Osfield
d0cc014f1b Further migration to using RenderInfo 2006-11-14 12:51:31 +00:00
Robert Osfield
7cb1bcbd7d From Farshid Lashkari, "This patch adds a CoordOriginMode to the osg::PointSprite attribute.
The mode needs to be changed to LOWER_LEFT when rendering point
sprites to pbuffers or FBOs, otherwise the points will be transformed
on the CPU."
2006-11-14 12:29:54 +00:00
Robert Osfield
c3f3093ecc From John Kelso, add support for default frame time for children of a Sequence node 2006-11-10 15:25:04 +00:00
Robert Osfield
8983544a86 Further work on osgShadow::GeometryOccluder 2006-11-10 15:07:13 +00:00
Robert Osfield
d23c04018b Updated wrappers 2006-11-08 11:49:35 +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
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
06cca16a2a Added convinience constructors to help support picking with the new osgUtil::Intersector classes. 2006-11-02 17:05:46 +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
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
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
358b96e953 Added osgUtil::IntersectorGroup to handle groups of osgUtil::Intersectors 2006-10-27 15:11:17 +00:00
Robert Osfield
ce3929fd5f Added beginings of new osgUtil::IntersectionVisitor and osgintersection class 2006-10-26 16:03:17 +00:00
Robert Osfield
44a77dda7c Tweaked doxygen docs. 2006-10-24 16:24:24 +00:00
Robert Osfield
85dc696c09 Added FadeText::setFadeSpeed and made internal data structures protected. 2006-10-24 09:06:28 +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
f257285efc From Chuck Seberion, added support reading ARB float format textures. 2006-10-14 21:50:29 +00:00
Robert Osfield
660cda57c8 From Terry Welsh, mplemented POINT_ROT_EYE. 2006-10-14 21:47:13 +00:00
Robert Osfield
5163c4a762 First cut at class interfaces and stubs for implementations for the new osgShadow NodeKit 2006-10-06 14:16:11 +00:00
Robert Osfield
f95a913daa Removed osgGA::GUIEventHandlerVisitor and osgGA::SetSceneVistor classes/headers as
this classes weren't being actively used the distribution, effectively being noops.
2006-10-06 09:54:45 +00:00
Robert Osfield
632df7f3ff Added osgGA::GraphicsWindow base class that derives from osg::GraphicsContext but
adds default overrides its pure virtue methods, and an EventQueue.
2006-10-05 10:06:19 +00:00
Robert Osfield
8e3a092a00 Removed the redundent relaseGLObjects() method declerations 2006-10-03 20:42:57 +00:00
Robert Osfield
e0599f652e Added releaseGLObjects to NodeCallbacks, Drawable::DrawCallbacks and wired up
osgProducer to use it when doing cleanup_frame.
2006-10-02 15:38:31 +00:00
Robert Osfield
f97759405a From Farshid Lashkari, "Here is the patch we discussed previously about adding a flag to
CullSettings which allows CameraNode to inherit the clear color."
2006-10-02 14:11:40 +00:00
Robert Osfield
3bfa8a27a8 From Edgar Ellis, "Changed return type of osg::equivalent methods from float/double to bool.
"
2006-10-02 13:11:32 +00:00
Robert Osfield
42dfe67c0c From Farshid Lashkari, "There was a bug in ParticleSystem where the bounds is not properly
flagged as computed when there is only 1 particle. Attached is the
fix."
2006-10-02 11:26:43 +00:00
Robert Osfield
ba7d27c9b2 From Chris Hanson, "These changes break out the implementation of the fill/wireframe/point, texture,
lighting and backface culling settings from the event handling code in StatesetManipulator
into public methods. The event handler now calls the public methods. This allows user code
to invoke this same functionality from non-keyboard event inputs without clashing with the
keyboard-invoked functionality."

From Robert Osfield, tweaks to the above to kepp the coding style the same as the rest of the OSG, also
made getPolygonMode() const, and updated the wrappers.
2006-10-01 19:19:31 +00:00
Robert Osfield
2ed98b56c9 Added subclassing from osg::Referenced to allow the SimpleViewer to be safely managed on the heap. 2006-09-30 14:10:15 +00:00
Robert Osfield
5c0eb0b013 Added bare bones osgGA::SimpleViewer class to help simplify OSG setup when embedding the OSG
into existing GUI applications, and for one one a single camera, single window is required.
2006-09-25 16:25:53 +00:00
Robert Osfield
35d134f712 From Farshid Lashkari, added function for querring whether a mode is a texture related mode or not. 2006-09-21 10:01:27 +00:00
Robert Osfield
def74d3471 Introduced new osg::View, and osg::RenderInfo classes into the core OSG to help
handle scenes with multiple views with elements that need coordinating on a per view basis.

Added beginings of new osgText::FadeText class (not functionality yet).
2006-09-18 20:54:48 +00:00
Robert Osfield
515225cfb9 Fixed the drawArrays() method checking of _drawArrayPtr 2006-09-12 15:21:41 +00:00
Robert Osfield
5915584b37 Revised the osg::ClampColor API to allow vertex, fragment and read color clamping to
be applied together.
2006-09-12 09:26:42 +00:00
Robert Osfield
292eee4c1e From Mike Weiblen, added missing export to fix osgTerrain wrapper linking under VS 2006-09-07 10:41:38 +00:00
Robert Osfield
9d02b2314f From Mike Weiblen, build fixes for Windows. 2006-09-05 09:51:33 +00:00
Robert Osfield
5c1b0f1bbd Added support for imagery and DEM's that wrap around the dateline, this required
two passes over the copying of imagery and DEM's to the destination graphs, once for
the original position, and once for the wrap around 360 degrees on or before.

Also fixed the GeospationExtents constructor that was setting the _max to DBL_MIN rather
than -DBL_MAX.  This bug causesd the y axis to be computed incorrectly.
2006-09-04 20:43:07 +00:00
Robert Osfield
625c0173b2 Missing part of Farshid Laskari's submission relating to CameraNode RenderOrder. 2006-09-04 13:35:26 +00:00
Robert Osfield
daa54a3b09 From Farshid Lashkari,
"I've made some changes to osg which I think make it easier to control
the render order of CameraNode's. Instead of using the built-in orders
(PRE_RENDER, POST_RENDER, NESTED_RENDER), you can specify an integer
order. Values less than zero are pre rendered in order. Values greater
than zero are post rendered in order. And a value of 0 is equivalent
to NESTED_RENDER.

The changes should be fully backward compatible. Also, I changed the
RenderStageList type from a vector to a list because I needed to be
able to insert values anywhere in the list.

The reason I made these changes was because I wanted to be able to set
the render order of a CameraNode at runtime without having to reorder
it in the scenegraph."

and later in the final submission message (relating to what has been finally been merged)    :

"I've rethought my implementation and came up with something a little
better. The setRenderOrder will continue to take an enum, but will
have an optional orderNum parameter which can be both positive and
negative. I think this method is more intuitive and flexible."
2006-09-04 13:15:08 +00:00
Robert Osfield
f0277df858 Added osg::TexMat::s/getScaleByTextureRectangleSize feature that allows
one to use the osg::TexMat to automatically scale non dimensional tex coordinats to
the size of the last texture rectangle applied.
2006-09-04 12:46:49 +00:00
Robert Osfield
616097e465 From David Callu,
"bug fix to reflect the wchar_t in Value and Value.cpp I add the toWString() function.
in Type and Type.cpp I just add two function to get a map of propertyList and a map of methodList
i need this map in my editor a i think it's could be util to put this functionnality in osgIntrospection,
2006-09-01 12:52:15 +00:00
Robert Osfield
96e1630cc7 Removed the String inhertiance from osg::Referenced. 2006-09-01 12:46:45 +00:00
Robert Osfield
5d1de02afa Updated Version number for 1.2 release 2006-08-31 20:55:46 +00:00