and a fix to osg::State's secondary color code from Bob Kuehne.
Moved the body of the getGLExtensionFuncPtr() into the header to help out
support for Windows mapping of different OpenGL extensions function ptr per
dll.
Added osg::Matrix/Quat::makeRotate(angle1,axis1,angle2,axis2,angle3,axis3) and
osg::Matrix::rotate(angle1,axis1,angle2,axis2,angle3,axis3) method.
Made osg::Matrix/Quat::makeRotate(heading,pitch,roll) and
osg::Matrix::rotate(heading,pitch,roll) all deprecated API.
Fixed the Quat*Quat & Quat*=Quat multiplication methods so that they multiplied
in the correct order - they were reversed originally due to the Quat code being
based on code example which used the v' = M v ordering, rather than the OSG's
v' = v M ordering.
rather than depending upon callbacks for animating and compute matrices. Merged the
put/inverseput code between Sasa's and Ferndinand's DOF code.
From Bora Utka, Added support to osg::Sequence/OpenFlight AnimNode to the flt plugin.
on osgUtil by implementing a NodeVisitor::VisitorType enum, and associated
g/setVisitorType. This allows callbacks to querry the visitor/traversal
type without doing down cast's to specific visitor subclasses such as
osgUtil::AppVisitor/CullVisitor.
Rewrote the osgbillboard demo so that it creates a point rotatated billbaord
and X,Y and Z axis billboards to both test and demonstrate this types of
billboards in action.
so that they cannot be overriden from above via the OVERRIDE flag. This is
useful for things like manipulators that have handles display in the scene, you
might want to prevent their state being affected by other overriding of
light, wireframe modes etc.
code in Texture::apply() to set the _image to 0 on apply. Note,
this will only work when you have a single graphics context, as
with multiple graphics contexts one can't delete the image after
the first apply, as there will be more than one texture object to
update.
Added default computeBound() implementation to osg::Drawable which uses
a PrimtiveFunctor to compute the bounding box in a generic way, that
will work for all Drawable subclasses that implement the accept(PrimitiveFunctor&).
decoupled from osg::Drawable. The Drawable::getStats() virtual method
no longer exists.
Updated the Viewer to use the osg::Statistics incarnation and reformated stats
to clean it up.
OpenGL range of 0.0 to 128.0 instead of the previous normalised shiniess
range. This brings it inline with the way the rest of the OSG uses a
1 to 1 mapping to OpenGL.
Converted the various loaders to use the new range, which is almost all
cases was simply removing the /128.0f which was required before!
all unsed texture units can be turned off simply within Drawables such
as Geometry and GeoSet. This can be used to prevent bleed of arrays from
one object to the next - which can cause crashes.
various
osg header and source files to optional compile in deprecated parts of
the
OSG API.
Have renamed osg::Transparency osg::BlendFunc to bring it in line with
the
rest of the OSG's StateAttribute classes which are named after their
OpenGL counterparts. include/osg/Transparency still exists and is
simply
a typedef to BlendFunc and is enclosed in a #ifdef USE_DEPRECTATED_API
block.
The matrix methods in the osg::Transform class have been
moved/replicated in
a osg::MatrixTransform sublcass from osg::Transform. The old matrix
functionality is still present in the osg::Transform class but is guard
by #ifdef USG_DEPRECATED_API blocks. One should now think of
osg::Transform
as being a Transform Node base class. MatrixTransform has all the
functionality of the original Transform class, so should be used
instead.
it inline with the CullStack/CullVisitor implementation. Also added the
setSmallFeatureCullingPixelSize() method and wired them up inside
SceneView.cpp so they set the corresponding CullVisitor paramters.
Intergrated pfImage copying change in the Performer plugin, submission sent in by Ulrich Hertlein
implementations for all the public functions found in the header,
this should prevent problems when not compiling in the MemoryManager
under IRIX 64 build.
the number of occluder that will be used in cull traversal to only the
ones that will be effective. Note. Holes in occluders arn't handled in
this occluder occlusion test, will implement this later.
a fully functioning NodeKit.
Also reimplement notify() to try an prevent a crash which has been caused by
to objects in notify.cpp being initiliazed twice, the second time the auto_ptr
holding the dev/null ofstream was being initilized to 0.
removal of node which could have been removed.
Added so extra convinience methods to ClippingVolume and utilized them in the
CullVisitor to push and pop only culling planes that are active.
VisualStudio .NET compile.
Added support for OSG_NOTIFY_LEVEL and OSG_FILE_PATH into the relevant getenv
routines. This compliments the exisiting OSGNOTIFYLEVEL & OSGFILEPATH which
are deprecated but still supported. The OSG_ version are more consistent
with the rest of the env variables used in the OSG.
Windows PATH environmental variable for searching for libraries. Sent in
by Norman Vine.
Reoder of the makedefs/makedirdefs to fix Mac OSX compilation. Sent in by
Bob Kuehne.
Supported added for precompiled mip maps stored in osg::Image, and read
by osg::Texture.
Updates to TerraPage loader for support of compressed texture images and
precompiled mip maps.
the current projection matrix into CullVisitor itself. Similar code to
support this has been moved out of SceneView completely.
Added Matrix:: infront of the definition of the static
osg::Matrix::inverse(Matrix) method which was missing.
Converted AnimationPath so it is now subclassed from osg::Transform::ComputeTransfromCallback()
so that it can be directly attached to the scene to move objects about.
Changed the osg::SateSet::setGlobalDefaults() so that is sets GL_DEPTH_TEST
to ON.
Added guards and creation of default helper classes in osgGLUT::Viewer and
osgUtil::SceneView so that sensible defaults are used when no settings
are used of osg::State/StateSet,osgUtil::RenderStage/RenderGraph/CullVisitor.
it conforms to the OpenFlight convention of euler angles. Added documentation
into Matrix and Quat to reflect this.
Added so test code to osgcube for stress testing memory allocation and deallocation.
Commented out the registering of app and cull callbacks in osghud.
modelview matrix rathan than an identity matrix, this matrix is then modified
locally.
Changed the osg::Matrix set methods so they are inline.
Added a few useful comments to MemoryManager.cpp to help people understand
the assert's better.
renamed osg::Image::pixelFormat(), internalTextureFormat(),dataType() to
osg::Image::getPixelFormat() etc. These changes are to bring it more
into line with the style of the rest of the OSG.
Updated the rest of the distribution to take account for these names changes.
osg::Camrea::getModelViewMatrix() and osg::Camera::getProjectionMatrix() are
calculated on the fly. Removed various redudent methods, including the
project and unproject methods which are better supported within osgUtil::SceneView.
Added a computeWindowMatrix() method to Viewport, to make it easier to construct
a MV*P*W matrix for converting local coords into screen coords and visa versa.
Converted SceneView and CullVisitor to use this new method.
support out of Camera and into SceneView. Also enabled the option to set the
projection and modelview matrices directly on SceneView thereby removing the
dependance on osg::Camrea to control the view of the scene.
which objects have values that vary over the lifetime of the object (DYNAMIC)
and ones that do not vary (STATIC). Removed the equivalent code in
osg::Transform, StateSet and StateAttribute, as these are now encompassed
by the new DataVariance field.
Removed MatrixMode enum from Matrix, and associated fields/parameters from
osg::Transfrom and osg::NodeVisitor, since MatrixMode was not providing
any useful functionality, but made the interface more complex (MatrixMode
was an experimental API)
Added ReferenceFrame field to osg::Transform which allows users to specify
transforms that are relative to their parents (the default, and previous behavior)
or absolute reference frame, which can be used for HUD's, camera relative
light sources etc etc. Note, the view frustum culling for absolute Transform
are disabled, and all their parents up to the root are also automatically
have view frustum culling disabled. However, once passed an absolute Transform
node culling will return to its default state of on, so you can still cull
underneath an absolute transform, its only the culling above which is disabled.
osg::Image::readPixels to encapsulate glReadPixels.
Reordering of includes in include/osg/Fog and include/osg/Light to remove silly warnings under Visual Studio.
osg::Drawable. Added osg::Image::readPixels to osg::Image.
Made osg::LightSource to default to cullActive set to false to that LightSource
nodes don't get culled by default.
in progress for the new support for controlling the projection matrix from
within the scene graph.
Also Added osg::State::getClippingVolume(), getProjectionMatrix() and
getModelViewMatrix() with allows drawables to access the current projection,
and model view matrices and the view frustum in local coords to the drawable.
it now maintains references to the last applied matrices, automatically doing
lazy state updating. This simplifies the various places in the OSG which
were previously doing the applying, add paves the way for managing the
projection matrix within the scene graph.
Remove MemoryAdapter and mem_ptr as they arn't being used, and can potentially
confuse users by their existance.
osg::Texture. The values default to 0, and in this state they are
sizes of the glTexSubImage2D are taken from the source image size. This
allows the previous setup with no settings for subload size to work as
before.
memory manager published at flipcode.com. This can be turned on
with the OSG_USE_MEMORY_MANGER option which then uses custom global
new and delete operators as well as provide osgNew and osgDelete macro's
which add ability to log line and file from which calls are made.
Updated osg,osgUtil,osgDB,osgText and osgPlugins/osg to use osgNew/osgDelete,
and fixed memory leaks highlighted by the new memory manager.
published at flipcode. I havn't adopted Paul's macro's for new/delete etc, but use
osg prefixed versions instead to allow greater flexiblity in handling include
ordering.
Have fixed a couple of new/delete[] problems which existed as a result.
To use the MemoryManager to track memory usage simply add
-DOSG_USE_MEMEORY_TRACKING to the compile line.
Have yet to move the osg from using new to osgNew, will do this next.
easier to specify which modes and attributes have been modified without
the user requiring to know to what value, or to have an equivilant attribute
to pass to the have_applied_attribute method. The original have_applied(mode)
and have_applied(attribute) methods have been renamed have_applied_mode(),
have_applied_attribute() as this was required to prevent the mode and type
values colliding during compile (it was causing a compile error when the method
names were the same.)
not delete the object even if its count goes to 0 or below. This should
only be called in special circumstances, the ReaderWriter::ReadResult
being one of them. This new method has allowed the problem of objects
being multiple referenced on return from readNodeFile() & readImageFile().
much more of the core texture setup code. This largely invloved paramterizing
the applyImmediateMode, which has also been rename applyTexImage to reflect
its functionality better.
include change the CameraManipulators so they work with double for time
instead of float. Also added support for DataType to osg::StateAttribute
and StateSet so that they can be set to either STATIC or DYNAMIC, this
allows the optimizer to know whether that an attribute can be optimized
or not.
mode by using a _texParamtersDirty flag in combination with an
applyTexParamters(State&) method which does the paramters setting in one
tidy bundle. This new implementations replaces the CompileFlags submitted
yesterday.
Simplified NodeCallback by remove osg::NodeCallback::Requirements as they
are no longer needed.
Fixed comments in Drawable.
Put guards around cosf definations so that they are only used under Win32/Mac.
Fixed warning in CullVisitor.
the conclusion that the osg::Matrix::inverse was broken, have lifted a new
implementation from sgl and it seems to work fine. Will need further testing
but looks good.
objects that are deleted whilest still having a positive _refCount, such
as when a object has been deleted on the stack, yet other references still
exist for it. Have put the desctructor implementation in Object.cpp to
avoid adding yet another file with only a couple of lines of code in.
by adding a ComputeTransformCallback to osg::Transform, and have now removed
the recently added AutoTransform since it is nolonger required. Have also
updated CullVisitor to account for the new ways for tracking transformation
matrices in the scene.
on the stack thus ensure that they arn't created locally and have their
memory deleted incorrectly.
Also updated the IntersectVisitor so that it no used osg::ref_ptr<> internally
for storing all data. Have also move the IntersectState helper class to inside the
IntersectVisitor which simplifies the external interface to the class.
class now combines Cloner and DeepCopy into one class. Cloner and DeepCopy
will be removed in next commit.
Also have added osgcopy app to Demos which shows how the CopyOp have be
subclassed to create users own specific handling of copying.
Have fixed copy constructor problems in GeoSet which fix the deep copy
problem experienced yesterday.
copy constructor which takes an optional Cloner object, and the old
osg::Object::clone() has changed so that it now requires a Cloner as paramter.
This is passed on to the copy constructor to help control the shallow vs
deep copying. The old functionality of clone() which was clone of type has
been renamed to cloneType().
Updated all of the OSG to work with these new conventions, implemention all
the required copy constructors etc. A couple of areas will do shallow
copies by design, a couple of other still need to be updated to do either
shallow or deep.
Neither of the shallow or deep copy operations have been tested yet, only
the old functionality of the OSG has been checked so far, such running the
viewer on various demo datasets.
Also fixed a problem in osg::Optimize::RemoveRendundentNodesVisitor which
was not checking that Group didn't have have any attached StateSet's, Callbacks
or UserData. These checks have now been added, which fixes a bug which was
revealled by the new osgscribe demo, this related to removal of group acting
as state decorator.
method
and getWorldToLocalMatrix(), computeLocalToWorld() and computeWorldToLocal()
methods.
Have updated the CullVisitor, IntersectVisitor and Optimizer to use the
new osg::Transform::getLocalToWorldMatrix() which has the same functionality
as the old getMatrix() but is now supports subclasses of osg::Transform
transparently.
Have added osg::PositionAttitudeTransform as subclass of osg::Transform
which manages the transform as position and attitude via a Vec3 and Quat
respectively.
OpenGL light is being operated on, and also now relies upong the standard
osg::State handling of OpenGL modes to switch on the appropriate lights.
The previous static counter mechansim for the light number was causing a
redundent light to be created when the osg plugin created the first osg::Light
to use a prototype for other osg::Light's to be cloned from in the
.osg plugin execution.
The static count mechanism also prevent the lights modes being controlled
independantly from the setting of the light paramters themselves. This
meant that a light once created was global, and couldn't be turned off
locally via the OSG's support for OpenGL mode enabling/disabling. This
has been overcome with the new implementation, the user has complete
flexiblity of when and where to use the different lights at their
disposal.
Renamed the osg::VisualsSettings to osg::DisplaySettings, and
osgUtil::VisualsRequirementsVisitor to osgUtil::DisplayRequirementsVisitor.
Added support for OSG_SCREEN_HEIGHT into osg::DisplaySettings, and added
a DisplaySettings* to the constructors of osg::SceneView and osg::Camera.
it consistent with the rest of the osg::Matrix naming. Updated OSG
distribution to account for new name.
Added support for the STATIC/DYNAMIC osg::Transform::Type to the .osg
ASCII reader/writer plugin and the flt reader plugin.
Removed the non cost version of osg::Transform::getMatrix() as this could
by pass the dirty mechinism.
that used it, all references to the Standard C++ stream classes use the
std::ostream etc convention, all references to "using namespace std" and
"using namespace std::ostream etc" have been removed.
the functionality clear given the name. This will break user code unfortunately
so please be away of the following mapping.
osg::Matrix::makeTrans(..)?\026 -> osg::Matrix::makeTranslate(..)
osg::Matrix::makeRot(..)?\026 -> osg::Matrix::makeRotate(..)
osg::Matrix::trans(..)?\026 -> osg::Matrix::translate(..)
osg::Quat::makeRot(..)?\026 -> osg::Quat::makeRotate(..)
Also updated the rest of the OSG distribution to use the new names, and
have removed the old deprecated Matrix methods too.
default AttributeDeleteFunctor which uses delete []. Users can create
their own handlers for the attribute memory to override this default
behavior.
Fixed a typo in ReaderWriterOBJ.cpp.
Updates to the osg::Transform, adding preMult and postMult methods and
deprecating the old preRotate,preTranslate,preScale.
Updated the rest of the OSG so that it nolonger uses the deprecated
osg::Transform nodes.
Renamed osgUtil::SceneView::setGlobalState() to
osgUtil::SceneView::setGlobalStateSet() so that the name reflects its
functionality better. Updated osgGLUT::Viewer etc to cope with new
name change.
list of text drawables as a paragraph block, handles breaking of text into
individual lines automatically.
Changed the osg::Node::setUserData so that the data type has to be an
osg::Referenced, and removes the dependancy on osg::MemoryAdapter. I have
done this since it simplifies the OSG side of the interface and makes it
less like that the user might abuse the memory managment of the data. It
does however mean that user data will have by subclassed from Referenced,
and therefor may require users to have their own adapter to do this.
However, this little nuasance is worth the extra cleaness and robustness
afforded by going the osg::Referenced route.
Modified osg/Drawable::draw(..) so that it uses display list COMPILE
rather than COMPILE_AND_EXECUTE to solve performance problems under
NVidia drivers. The old behavior is still available by comments out
a #define.
Fixed the default compilation list src/osgPlugins/Makefile so that it
compiles by defalt png and gif.
to allow it to use different comparison schemes, now it can use checking for pointer equality (the default)
or attribute contexts. This has been added to assist optimization of databases within the flt loader, but
also could be useful for other operations too.
should be applied to a node or its child with the new osg::Node::setCullingActive()
flag. A mechanism has been implemented so that if child has its culling disabled
then their parents, all the way up to the root are also have their culling
implicitly disabled.
The osg::CullVisitor has updated to take account of
both the explicit control via setCullingActive and the implicit culling
disabling through children being disabled.
This feature is useful for nodes which don't have a bounding volume to cull
against, earth sky implementations and light sources.
The default osg::Node::_cullingActive is true, i.e. culling is enabled by
default.
these global attributes are created by cloning any attributes which are
applied during rendering, the clone in a shallow copy, which will set up
default valus for that attribute. This should prevent attribute bleed
from one stateset to the next when the global StateSet doesn't contain
an attribute used within the scene graph.
and have updated GeoSet to use mutable values for the _numverts etc, allowing
osg::GeoSet::computeNumVerts() to be a const operation. osg::GeoSet::getNumVerts
is now a const once more, so avoiding compilation problems. Also chaned the new
osgconv orientation code to use a Drawable::AttributeFunctor so it can work on
other Drawables other than just GeoSets.
updated the ReaderWriterBMP.cpp (mods sent in my Geoff Michel) and
moved the osgUtil::Statistics to osg::Statistics in preperation to adding it
to the the Drawable base class.