Hi,
I see the two lines in octTree() is comment out
transInterpolator.setEnable(false);
rotatorInterpolator.setEnable(false);
when I uncomment the lines, it throws:
Exception occurred during Behavior execution:
java.lang.NullPointerException
at TMove.octTree(TMove.java:243)
at TMove.octTree(TMove.java:411)
at TMove.octTree(TMove.java:427)
at TMove.octTree(TMove.java:427)
at TMove.octTree(TMove.java:427)
at TMove.processStimulus(TMove.java:171)
at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167)
at javax.media.j3d.J3dThread.run(J3dThread.java:256)
when the two shape collide.
In Tetrahedron, you have
tetra.setCoordinates(0, pnts);
tetra.setColors(0, clrs);
To set the normal in tetrahedon, you can use
one of the
public void setNormal(int index, float normal[])
public void setNormal(int index, Vector3f normal)
etc..
API under GeomtryArray.java
Thanks.
- Kelvin
------------------
Java 3D Team
Sun Microsystems Inc.
>X-Originating-IP: [200.246.10.87]
>From: "HAroldo Pereira" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] RotationInterpolator
>Date: Wed, 24 May 2000 00:18:18 EST
>Mime-Version: 1.0
>
>Hi Kelvin
>
> You dont understand my e-mail.
>
> I wait to stop the cube when the cube colide with tetrahedron. Its dont
>works. If I click in the button it works. there is a method call octree(...)
>in class Tmove. In this method there is a :
>
>" if ( dis + Math.min(filhoObjA.raio, filhoObjB.raio)
><=Math.max(filhoObjA.raio, filhoObjB.raio) ) "
>
>I wait stop the cube into this command (if).
>
>Now, I dont understand this e-mail. How I set the Normal in the Tetrahedron.
>
>[]s
>
> Haroldo
>
>
>
>>From: Kelvin Chung <[EMAIL PROTECTED]>
>>Reply-To: Kelvin Chung <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: [JAVA3D] RotationInterpolator
>>Date: Tue, 23 May 2000 11:52:23 -0700
>>
>>Hi HAroldo,
>>
>>
>> I can't reproduce the behavior problem under windows and
>>solaris, when I press the stop behavior button. The object
>>stop moving as expect. Please verify that you are using v1.2
>>release and not beta version.
>>
>> I got some capabilities not set exception in your code,
>>after setting them correctly. The collision works fine.
>>Note that you have to set both Shape3D geomery read capability
>>and Shape3D geoemtry geometryarray coordinate read capability.
>>
>> For the getNormals() problem, it is because in
>>Tetrahedron.java the normals is not set although
>>the TriangleArray is initialized with NORMALS flags.
>>
>>Thanks.
>>
>>- Kelvin
>>
>>----------
>>Java 3D Team
>>Sun Microsystems Inc.
>>
>
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
===========================================================================
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".