hi
i am new to zith . so i need your help.
actually i have a 3d object with faces. now i wanna click on any face and then it should show the selected face by getting perpendicul to the eye(the place from where object is scene).
regards
rose
hi
i am new to zith . so i need your help.
actually i have a 3d object with faces. now i wanna click on any face and then it should show the selected face by getting perpendicul to the eye(the place from where object is scene).
regards
rose
I don’t know, if I got you right. But have a look at PickingLibrary and ExtXith3DEnvironment.pick(…). They should do what you want.
Well its somewhat complicated ,
I am doing this ,i’ll share my algo.
so lets do this in step:
hope this will help…
Interesting algorithm. Maybe we should add this functionality to the PickingLibrary, such that it saves the actually picked face of the geometry and it’s normal into the PickResult.
I think this is wrong. The face’s normal does not necessarily point to the eye’s position, well, in this special case it certainly does, but it is not general. So you’ll need to calculate the center point of the picked face and build a vector from this point to the eye’s position. the negation of this vector can serve as your new view’s direction vector. Correct me, if I’m wrong. But I think this should be correct. As the center point of a (non regular) face you can e.g. take its mass’ center point. This should be possible to calculate.
Marvin
Yaa you are right , but i was doing what rosemary is doing …i think so,
Basically you want face to be perpendicualr so for that your eye To Object vector has be perpendicular to face.
No you are not wrong infact in last two steps i have pointed out the same thing .
That is to figure a point on Face and drive a equation of line from that point and parallel to the calculated Normal to Face.
[quote]Interesting algorithm. Maybe we should add this functionality to the PickingLibrary, such that it saves the actually picked face of the geometry and it’s normal into the PickResult.
[/quote]
Yaa …if many people require this than we can add this to PickingLibray or we can have a separate Package dedicated to all Selection Problems but it depends what people are doing with Xith
thanks alot. really it will work.
Qudus, i guess khangharoth is genious.