Skip to main content

How to get status (position, rotation) from object?

7 replies [Last post]
gzdillon
Offline
Joined: 2010-10-18

I know the Behavior class can control the objects in scenes. If I want to watch or log the trace of the objects in a SWING gui, how can the object notify this information to gui windows?
The point is the message from each Behavior is not necessary to log, instead, the combined result of an object has to be displayed on GUI.
Any comments?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
darwinjob
Offline
Joined: 2004-11-16

Or... If you want a challenge :) use this wake up condition http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Wake... and then decompose the transformation matrix.

>the combined result of an object has to be displayed on GUI.
Use this transform:
http://download.java.net/media/java3d/javadoc/1.5.2/javax/media/j3d/Node...

gzdillon
Offline
Joined: 2010-10-18

Thank you very much!
That is what I want!

darwinjob
Offline
Joined: 2004-11-16

Just be aware that this approach is compute-intensive comparing to the one suggested by aces.

gzdillon
Offline
Joined: 2010-10-18

Does not the invoking method work in Observer Pattern in awtevent and wakeup?
I believe these all run on Event-Based. Am I wrong?

darwinjob
Offline
Joined: 2004-11-16

You are right. I'm talking about the decomposition itself - it's a tricky beast.

gzdillon
Offline
Joined: 2010-10-18

I believe making a new model without existing wakeup-family is more complicated than operations on Quat4v, Vector3d, Matrix4d,etc. Do you think so?

aces
Offline
Joined: 2003-07-17

Use "Observer" and "Command" Design Patterns