Class Drag3D allows free dragging of an ObjectContainer3D onto a given plane.
locks on world planes locks on ObjectContainer3D planes locks on ObjectContainer3D rotations planes
Static variables
Constructor
new(view:View3D, ?object3d:ObjectContainer3D, plane:String = PLANE_XZ)
Class Drag3D allows to drag 3d objects with the mouse.Drag3D
Parameters:
view | View3D. The view3d where the object to drag is or will be addChilded. |
|---|---|
object3d | [optional] ObjectContainer3D. The object3D to drag. |
plane | [optional] String. The plane to drag on. |
Variables
Methods
getIntersect(?x:Float, ?y:Float):Vector3D
Returns the Vector3D where mouse to scene ray hits the plane set for the class.
*
* @return Vector3D The intersection Vector3D
* If both x and y params are NaN, the class will return the hit from mouse coordinates
* @param x [optional] Number. x coordinate.
* @param y [optional] Number. y coordinate.
updateDrag():Void
if an ObjectContainer3D is set this handler will calculate the mouse intersection on given plane and will update position and rotations of the ObjectContainer3D set accordingly