[sldev] [VWR] change an object?

Anna Gulaev annagulaev at gmail.com
Mon Feb 25 19:41:16 PST 2008


I'd like to be able to change the shape of an object.

I have an object of this type...

        LLViewerObject *object

I'm able to get its parameters like this...

        object->getVolume()->getParams().getProfileParams().getCurveType();

I'd like to change its parameters, something like this...

        params = object->getVolume()->getParams();
        profileparams = params.getProfileParams();

        profileparams.setCurveType( LL_PCODE_PROFILE_CIRCLE);

If I take a peak at the curve type now...

        llinfos << (int) profileparams.getCurveType() << llendl;

I can see that it's been changed. Now to tell the server about it...

        object->updateVolume( params);

And this does...nothing. I can follow through with a debugger to find the
point at which it decides to do nothing. That goes something like this...

LLViewerObject::setVolume
        LLPrimitive::setVolume
                if ( volume_params == mVolumep->getParams() && (
volume_detail == mVolumep->getDetail())

It passes that conditional and returns FALSE, without updating geometry.
Since I don't know what it's *supposed* to do, I don't know if this is good
or bad, but it looks to me like it's deciding that nothing has changed. Am I
not supposed to make changes  to the original parameters? Do I need to make
changes to a copy? I tried that and got the same results.

Is there a concise snippet of code somewhere that shows how to make a
change--any change--to an object?

Thanks,
Anna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080225/5aaf5e5e/attachment.htm


More information about the SLDev mailing list