Olivier,

We are going to propose a new View method in 1.2 to cause the renderer
to run (sort of like Component.repaint).  However, that may not solve
the off-by-one problem that you are having.  We'll take a look at that
to see whether it is a bug or a design limitation.  The easiest way
to work around it for now is to override processStimulus, check
whether the WakeupCondition was transformchanged, and, if so, set a
flag indicating that your wakeupOn routine should OR in the passed in
WakeupCondition with the WakeupOnTransformChange.  Something like the
following (some of this is psuedo-code):

        boolean wakeupNextFrame = true;

        processStimulus(Enumeration criteria) {
            super.processStimulus(criteria);
            if (criteria includes WakeupOnTransformChange)      // psuedo-code
                wakeupNextFrame = true;
            else
                wakeupNextFrame = false;
        }

        protected void wakeupOn(WakeupCondition p0) {
            WakeupCondition w;
            if (wakeupNextFrame)
                w = WakeupOr(wakeupFrameTG OR p0)               // psuedo-code
            else
                w = wakeupFrameTG
            super.wakeupOn(w);
        }

Hope this helps.

--
Kevin Rushforth
Java 3D Team
Sun Microsystems

>Date:         Fri, 3 Sep 1999 10:05:27 +1000
>From: Olivier fillon <[EMAIL PROTECTED]>
>Subject:      Re: [JAVA3D] behaviours and rendering, manual render trigger
>To: [EMAIL PROTECTED]
>
>Thanks Kevin,
>basically it works except for the fact that, as explained, the screen is not
>updated .
>Being not rendered, I am always one step behind for my expected billboard
>behaviour
>Any clue?? except retriggering it a second time articially??
>How can I force a graph traversal?
>Olivier
>-----Original Message-----
>From: Kevin Rushforth <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Friday, September 03, 1999 9:47 AM
>Subject: Re: [JAVA3D] behaviours and rendering, manual render trigger
>
>
>>We are aware of this problem and plan to address it in 1.2.  In the
>>mean time, your solution should work, if you know what transforms above
>>you can change.
>>
>>--
>>Kevin Rushforth
>>Java 3D Team
>>Sun Microsystems
>>
>>>
>>
>>>Date:         Wed, 1 Sep 1999 07:42:03 +1000
>>>From: Olivier fillon <[EMAIL PROTECTED]>
>>>Subject:      [JAVA3D] behaviours and rendering, manual render trigger
>>>To: [EMAIL PROTECTED]
>>>
>>>Hi fellow j3D addicts,
>>>Following a related issue discussed a couple of days ago, I am overloading
>>>the Billboard behaviour to only wakeup on a change of viewing platform
>>>transform.
>>>The purpose is to avoid continuous rendering which is taking all my CPU
>>>To achieve this, I use the following class
>>>
>>>public class MyBillboard extends Billboard
>>>{
>>>    TransformGroup pt = null;
>>>    WakeupOnTransformChange wakeupFrameTG;
>>>    public MyBillboard(TransformGroup transformgroup, int i, Point3f
>>>point3f, TransformGroup platformTransform)
>>>    {
>>>        super( transformgroup, i, point3f);
>>>        pt = platformTransform;
>>>        wakeupFrameTG = new  WakeupOnTransformChange(pt);
>>>    }
>>>
>>>
>>>    protected void wakeupOn(WakeupCondition p0) {
>>>        super.wakeupOn(wakeupFrameTG);
>>> }
>>>
>>>}
>>>
>>>This seems to work my billboard is triggered after each transform change,
>>>sadly the result is not displayed:
>>>indeed the rendering loop seems to ignore the change and do not force a
>new
>>>render
>>>Is this the reason behing the continuous rendering set in Billboard?
>>>Is this a bug?
>--
>Olivier Fillon    Minestar Project
>[EMAIL PROTECTED]  Mincom Limited
>Ph.+61-7-3303-3344               61 Wyandra Street
>Fax+61-7-3303-3232               Teneriffe Qld. 4005.
>Australia
>Company home page: http://www.mincom.com/
>Personal home page: http://www.home.gil.com.au/~fillon
>--
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to