Hi Robert,

25.05.2011 11:53, Robert Osfield wrote:
Hi Mikhail,

Thanks for the explanation.  Could you post fixes to osg-submissions
so I can review them and merge the bug fixes.

I'm not yet clear on the disaptch issue, is it that any sublcass from
MotionCommand will be ast to MotionCommand and then handled by all the
contraints as a MotionCommand rather than the subclass?  If so then
this is a design issue rather than a local bug.

For example you can take a look to RotateCylinderDragger, it create Rotate3DCommand and pass it to dispatch method.

Only for that reason I believed that Constraint is deprecated.


Cheers,
Robert.

On Wed, May 25, 2011 at 8:08 AM, Mikhail I. Izmestev
<[email protected]>  wrote:
Hi Robert,

Yes, I'm talking about latest svn/trunk version.

Bug in Dragger::addConstraint using "=" instead "=="

void Dragger::addConstraint(Constraint* constraint)
{
    // check to make sure constaint hasn't already been attached.
    for(Constraints::iterator itr = _constraints.begin();
        itr != _constraints.end();
        ++itr)
    {
        if (*itr = constraint) return;
    }

    _constraints.push_back(constraint);
}

same bug in Dragger::removeConstraint.

About constrain methods of Constraint class, Dragger::dispatch can only call
bool constrain(MotionCommand&) const

void Dragger::dispatch(MotionCommand&  command)
{
    // apply any constraints
    for(Constraints::iterator itr = _constraints.begin();
        itr != _constraints.end();
        ++itr)
    {
        (*itr)->constrain(command);
    }

    // move self
    getParentDragger()->receive(command);


    for(DraggerCallbacks::iterator itr =
getParentDragger()->getDraggerCallbacks().begin();
        itr != getParentDragger()->getDraggerCallbacks().end();
        ++itr)
    {
        (*itr)->receive(command);
    }
}

Same feature/bug with DraggerCallback::receive methods.

Mikhail.

25.05.2011 10:52, Robert Osfield wrote:

Hi Mikhail,

I'm not the original author of osgManipulator, and alas, the original
author hasn't contributed since submitting, so it's now down the us to
maintain it.  I did some updates to it last year to fix some issue,
but can't claim to be an expert and certainly can't off the top of my
head make too much sense of your email just based on method names.  I
also don't know if you are referring to svn/trunk, 2.9.x or a previous
stable release.  I would suggest moving to svn/trunk or a recent 2.9.x
dev release for discussion purposes as these contain the improvements
I made.

Robert.

On Wed, May 25, 2011 at 7:13 AM, Mikhail I. Izmestev
<[email protected]>    wrote:

Hi,

I have discovered some problems with osgManipulator::Constraint such as
methods which will never called:
bool constrain(TranslateInLineCommand&    command) const
bool constrain(TranslateInPlaneCommand&    command) const
bool constrain(Scale1DCommand&    command) const
bool constrain(Scale2DCommand&    command) const
bool constrain(ScaleUniformCommand&    command) const

Some bugs in osgManipulatro::Dragger's methods addConstraint and
removeConstraint.

So is osgManipulator::Constraint deprecated or it needed in submissions?

Mikhail.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to