Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Make a complete clone of an Object3D
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Make a complete clone of an Object3D (Read 4977 times)
hytparadisee
int
Posts: 86
Make a complete clone of an Object3D
«
on:
June 14, 2007, 08:39:02 pm »
Is it possible to clone an Object3D that is fully independent from the source object (don't share mesh etc.)? I want it cloned to the extent that it looks like loading the object twice from the model file?
Logged
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution
EgonOlsen
Administrator
quad
Posts: 12297
Re: Make a complete clone of an Object3D
«
Reply #1 on:
June 14, 2007, 11:37:48 pm »
You may get the mesh of the clone, clone it and set it again. That way, they don't share the same mesh.
Logged
hytparadisee
int
Posts: 86
Re: Make a complete clone of an Object3D
«
Reply #2 on:
June 15, 2007, 04:47:57 am »
Thanks, the cloning works. But it doesn't seem to reset the location/orientation of the object. I know that's not required. Just want to ask how to properly reset the translation/origin/orientation of a cloned object.
Logged
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution
hytparadisee
int
Posts: 86
Re: Make a complete clone of an Object3D
«
Reply #3 on:
June 15, 2007, 05:18:20 am »
Arrrgghh. What a misconception i've made.
LOL, i mixed up the Object3D.translate() with the Node.setLocalTranslation() in jME. Object3D.translate() is actually doing the offset right?
Logged
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution
EgonOlsen
Administrator
quad
Posts: 12297
Re: Make a complete clone of an Object3D
«
Reply #4 on:
June 15, 2007, 08:59:10 am »
Actually yes. But it depends a little bit on how you define offset. There also a setOrigin() which does basically the same as translate() but doesn't have an influence on child objects where translate() has.
Logged
Kearnan
Guest
Re: Make a complete clone of an Object3D
«
Reply #5 on:
October 09, 2007, 01:31:23 am »
This looks like the best place to post this question, it's of a similar topic:
Question: Is there a better way to clone?
«
Last Edit: October 17, 2007, 04:26:08 am by Kearnan
»
Logged
Kearnan
Guest
Re: Make a complete clone of an Object3D
«
Reply #6 on:
October 10, 2007, 02:41:52 am »
Err, nevermind. Lame question. I can just check to see if I've already loaded it, copy the Mesh and go from there. I don't know why that seemed too obscure yesterday.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Make a complete clone of an Object3D