Similiar MonkeyWorld3d or 3ds move rotation scale ability

hello

I am new to jme

I try to make my editor can move , rotation , scale similiar 3ds or MonkeyWorld 3d

can give me any idea , how to do that



now , my editor can picking anything in the scene

thanks any help



sorry , my bad english

Hello and welcome qckde



Don't know how MW3D or 3Ds does it but basically You have to

call setLocalTranslation(), setLocalRotation() or setLocalScale on the picked Spatial according to some user Input

and somehow call updateGeometricState() on it afterwards (SimpleGame does that for You already)



hth

1 Like

hi winkman

thx your help

you say , I understand

(1) try to loading move (or rotation or sacle axis model)

(2) attach to picking spatial

(3) then doing input handler … and somthing to achieve goal



but my editor selecting somthing , something bounding box is show

if we attch axis to spatial , the axis show bounding box too :expressionless:

I am don't like that

(I know we can do decision when picking somthing , to exclude axis show bounding box , but my think this matter is not good)



I don't know JME is support similiar plotter3D object ?

(plotter3D can draw box , draw line when render)



this is the Plotter3D sample code :

render(float tpf , Plotter3D plotter3D)

{

qckde, if i understand You right You want to attach an inputhandler to the spatial that was picked, manipulate it with the mouse and detach it

when Your'e done ?  -  should work i think



From there on i'm sorry but i can't follow Your problem further because of both Our not so good english knowledge.

Please try to explain it more clearly  (with example code? screenshots?)




@qckde:

as far as i understood you want to display the bouding box of the selected model (not of the entire scene).

you could take a look at the source of com.jme.util.geom.Debugger to see how jme draws the bounding boxes of the entire scene.

for bounding boxes it's basically just a Box object with a wireframe state, adjusted to match the bounding box volume of the scene element. then the Box is drawn at the scene element's position.



another option is to use the outline pass. that way, you just have to add the selected objects to the outline pass.



i hope this helps

thanks anything help

I'm think a while how to implement



(1) implement ObjectHandler (public ObjectHandler extend InputHandler {…})

(2) loading axis model in ObjectHandler constructor

(3) ObjectHandler implement [selecting somthing behavior]

(4) ObjectHandler implement [transfrom control , move rotation scale]

(5) axis always show in top (don't anyting depth test with axis)



this sample code

public class ObjectHandler extends InputHandler

{

don’t get me wrong qckde, but your code seems wrong all the way. you have an InputHandler which implements a render() method !?



you should probably take a look at the source of jme tests and do some of the tutorials.

sorry sfera

sample code is no work

First of all , my real need to reading tutorial

thanks help

i wish you good luck  :wink: