public bool Equal(Box3 arg0) { bool ret = VixenLibPINVOKE.Box3_Equal(swigCPtr, Box3.getCPtr(arg0)); if (VixenLibPINVOKE.SWIGPendingException.Pending) { throw VixenLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box3 Mul(Matrix arg0) { Box3 ret = new Box3(VixenLibPINVOKE.Box3_Mul(swigCPtr, Matrix.getCPtr(arg0)), false); if (VixenLibPINVOKE.SWIGPendingException.Pending) { throw VixenLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box3 Assign(Sphere arg0) { Box3 ret = new Box3(VixenLibPINVOKE.Box3_Assign__SWIG_1(swigCPtr, Sphere.getCPtr(arg0)), false); if (VixenLibPINVOKE.SWIGPendingException.Pending) { throw VixenLibPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Vec3 WorldFromTrack2D(Vec3 p) { Scene scene = SharedWorld.MainScene; Camera cam = scene.Camera; Box3 vvol = cam.ViewVol; float camdist = cam.Translation.Length; float zdist = camdist - ZOffset; Vec3 w = new Vec3(); Vec3 v = new Vec3(); Matrix mtx = new Matrix(); float tmp = 0.5f * vvol.Height / vvol.min.z; v.x = p.x * tmp * zdist; v.y = p.y * tmp * zdist; v.z = -zdist; cam.TotalTransform(mtx); mtx.Transform(v, w); SharedWorld.Trace(System.String.Format(Name + " Track({0}, {1}, {2}) -> World({3}, {4}, {5})\n", p.x, p.y, p.z, w.x, w.y, w.z)); return(w); }
public Vec3 WorldFromScreen(Vec3 pos) { Scene scene = SharedWorld.MainScene; Camera cam = scene.Camera; Box3 vv = cam.ViewVol; Vec3 p = Normalize(pos); Matrix mtx = cam.GetViewTrans(); Vec3 w = new Vec3(vv.min.x + p.x * vv.Width, vv.max.y - p.y * vv.Height, vv.min.z - p.z * vv.Depth + ZOffset); float tmp = -0.5f * w.z / cam.Hither; tmp = -w.z / cam.Hither; w.x *= tmp; w.y *= tmp; cam.TotalTransform(mtx); mtx.Transform(w, w); SharedWorld.Trace(System.String.Format(Name + " Screen({0}, {1}, {2}) -> World({3}, {4}, {5})\n", pos.x, pos.y, pos.z, w.x, w.y, w.z)); return(w); }
public Vec3 Normalize(Vec3 p) { Scene scene = SharedWorld.MainScene; Camera cam = scene.Camera; Box3 viewarea = ViewArea; Vec3 n = new Vec3(); if (viewarea != null) { n.z = (p.z - viewarea.min.z) / viewarea.Depth; } else { viewarea = new Box3(0, 0, cam.Hither, scene.Viewport.Width, scene.Viewport.Height, cam.Yon); n.z = cam.Translation.z / viewarea.Depth; } n.x = (p.x - viewarea.min.x) / viewarea.Width; n.y = (p.y - viewarea.min.y) / viewarea.Height; //SharedWorld.Trace(System.String.Format("HandTracker:Normalize ({0}, {1}, {2}) -> ({3}, {4}, {5})\n", p.x, p.y, p.z, n.x, n.y, n.z)); return(n); }
public virtual bool GetBound(Box3 arg0) { bool ret = VixenLibPINVOKE.Geometry_GetBound(swigCPtr, Box3.getCPtr(arg0)); return(ret); }
public virtual bool CalcBound(Box3 arg0) { bool ret = VixenLibPINVOKE.Model_CalcBound(swigCPtr, Box3.getCPtr(arg0)); return(ret); }
public virtual void SetBound(Box3 INPUT) { VixenLibPINVOKE.Model_SetBound__SWIG_0(swigCPtr, Box3.getCPtr(INPUT)); }
public bool GetBound(Box3 OUTPUT) { bool ret = VixenLibPINVOKE.Model_GetBound__SWIG_3(swigCPtr, Box3.getCPtr(OUTPUT)); return(ret); }
public bool GetBound(Box3 OUTPUT, int transformtype) { bool ret = VixenLibPINVOKE.Model_GetBound__SWIG_2(swigCPtr, Box3.getCPtr(OUTPUT), transformtype); return(ret); }
public virtual Box3 GetCullVol() { Box3 ret = new Box3(VixenLibPINVOKE.Camera_GetCullVol(swigCPtr), false); return(ret); }
public virtual void GetViewVol(Box3 arg0) { VixenLibPINVOKE.Camera_GetViewVol(swigCPtr, Box3.getCPtr(arg0)); }
internal static HandleRef getCPtr(Box3 obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }