Transform to Quat4 error

Hello all,

I have a Transform3D and I KNOW that the rotation is correct - I can see it in my model. Now I need the transformation and rotation out. I am using the function

trans.get(qu, v3d);

Since the transform (v3d) is ALWAYS correct the rotation part (qu) isn’t. Sometimes I even get no result at all like in this example:

Transform3D: -0.4142623543739319, -0.6481832265853882, 0.6397499442100525, 1.7305200099945068
-0.605660080909729, -0.30813145637512207, -0.7046793103218079, 0.22455823421478271
0.6536045670509338, -0.6780937314033508, -0.2652207612991333, 0.022245589643716812
0.0, 0.0, 0.0, 1.0

Quat4d: (NaN, NaN, NaN, NaN)
Vector3d: (1.7305200099945068, 0.22455823421478271, 0.022245589643716812)

Again: Vector3d is 100% correct but no Quat4d at all.

Can please someone help me?

Thank you!

Umm… what library are you even talking about?

None of those sounds like JME3 classes.

1 Like

Java3D 1.5.2

Well, then you probably want to try a Java3d forum. None of us use that here because this is the jMonkeyEngine forum and we don’t need it.

jMonkeyEngine is already a 3D game engine. Not really sure how you ended up here but you are welcome to stay and switch to jME. :slight_smile:

Besides, I think Java3D was dead and buried like a decade ago… together with Symbian phones and playstation 2

2 Likes

I am sorry. I was under the impression jME is using Java3D.

I checked you jME several times and I am impressed but I think it is not what I need for my cad application.

Thanks

JME uses OpenGL directly and therefore bypasses all of the Java3D overhead. It lets you get very low level if you need to… ie: down to just creating your own meshes, shaders, etc…

If I were starting from scratch, I’d definitely use it for CAD over something like Java3D. Though honestly if I was writing a CAD application then I might go straight to OpenGL.

What is the advantage of ditching jme for CAD applications?

You drag a lot of stuff around with you that you don’t need in a CAD application… while also getting limited by a scene graph geared towards game development. You could make it work but it seems simpler to just do something similar but directly off of the assembly or whatever data structures that are already a graph and would be annotated with a ton of other data as well.

Never mind that you often render and a bunch of different forms that is non-trivial in JME… because games don’t need that stuff.

Edit: that being said, JME is at least no more crazy than J3D.