public unsafe static OpenTK.Vector3 LocalGetSupportingVertexWithoutMargin(this TriangleMeshShape obj, ref OpenTK.Vector3 vec)
	{
		fixed (OpenTK.Vector3* vecPtr = &vec)
		{
			return obj.LocalGetSupportingVertexWithoutMargin(ref *(BulletSharp.Math.Vector3*)vecPtr).ToOpenTK();
		}
	}
	public unsafe static void SetGravity(this DynamicsWorld obj, ref OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			obj.Gravity = *(BulletSharp.Math.Vector3*)valuePtr;
		}
	}
	public unsafe static void GetAnchor(this Hinge2Constraint obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.Anchor;
		}
	}
Example #4
0
        public static void Init(OpenTK.Graphics.IGraphicsContext context, OpenTK.Platform.IWindowInfo wininf)
        {
            Graphics.context = context;
            Graphics.windowInfo = wininf;

            init = true;
        }
	public unsafe static void SetAppliedForceBodyB(this JointFeedback obj, ref OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			obj.AppliedForceBodyB = *(BulletSharp.Math.Vector3*)valuePtr;
		}
	}
       public unsafe static void GetPreferredPenetrationDirection(this ConvexShape obj, int index, out OpenTK.Vector3 penetrationVector)
	{
		fixed (OpenTK.Vector3* penetrationVectorPtr = &penetrationVector)
		{
               obj.GetPreferredPenetrationDirection(index, out *(BulletSharp.Math.Vector3*)penetrationVectorPtr);
		}
	}
	public unsafe static OpenTK.Vector3 LocalGetSupportVertexWithoutMarginNonVirtual(this ConvexShape obj, ref OpenTK.Vector3 vec)
	{
		fixed (OpenTK.Vector3* vecPtr = &vec)
		{
			return obj.LocalGetSupportVertexWithoutMarginNonVirtual(ref *(BulletSharp.Math.Vector3*)vecPtr).ToOpenTK();
		}
	}
Example #8
0
        public override void OnRenderFrame(OpenTK.FrameEventArgs e)
        {
            bg.draw(e);
            txt.draw(e);

            base.OnRenderFrame(e);
        }
	public unsafe static void GetPivotInB(this Point2PointConstraint obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.PivotInB;
		}
	}
	public unsafe static void SetHitPointInWorld(this VehicleRaycasterResult obj, ref OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			obj.HitPointInWorld = *(BulletSharp.Math.Vector3*)valuePtr;
		}
	}
	public unsafe static void GetHitNormalInWorld(this VehicleRaycasterResult obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.HitNormalInWorld;
		}
	}
	public unsafe static void GetCachedSeparatingAxis(this GjkPairDetector obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.CachedSeparatingAxis;
		}
	}
	public unsafe static void SetCachedSeparatingAxis(this GjkPairDetector obj, ref OpenTK.Vector3 seperatingAxis)
	{
		fixed (OpenTK.Vector3* seperatingAxisPtr = &seperatingAxis)
		{
			obj.CachedSeparatingAxis = *(BulletSharp.Math.Vector3*)seperatingAxisPtr;
		}
	}
	public unsafe static void GetLocalAabbMax(this TriangleMeshShape obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.LocalAabbMax;
		}
	}
	public unsafe static bool IsInside(this PolyhedralConvexShape obj, ref OpenTK.Vector3 pt, float tolerance)
	{
		fixed (OpenTK.Vector3* ptPtr = &pt)
		{
			return obj.IsInside(ref *(BulletSharp.Math.Vector3*)ptPtr, tolerance);
		}
	}
	public unsafe static void SetPivotB(this Point2PointConstraint obj, ref OpenTK.Vector3 pivotB)
	{
		fixed (OpenTK.Vector3* pivotBPtr = &pivotB)
		{
			obj.PivotInB = *(BulletSharp.Math.Vector3*)pivotBPtr;
		}
	}
Example #17
0
 /// <summary>
 /// x = distance |
 /// y = theta   
 /// </summary>
 /// <param name="coords"></param>
 /// <returns></returns>
 public static OpenTK.Vector2 GetPolarCoords(OpenTK.Vector2 value)
 {
     OpenTK.Vector2 vector = new OpenTK.Vector2(value.Length,(value.X != 0 ? (float)Math.Atan(value.Y / value.X) : (value.Y < 0 ? (float)Math.PI : 0))
         + (GetSign(value.X) == 1 ? 1.5f : 0.5f) * (float)Math.PI);//fix errors
     //fix errors
     return vector;
 }
        public override ModelBase LoadModel(OpenTK.Vector3 scale)
        {
            XmlDocument doc = new XmlDocument();
            doc.Load(m_ICAName);

            XmlNode node_anm_info = doc.SelectSingleNode("/ica/body/node_anm_info");
            ReadNodeAnmInfo(node_anm_info);

            XmlNode node_scale_data = doc.SelectSingleNode("/ica/body/node_scale_data");
            this.node_scale_data = ReadNodeTransformationData(node_scale_data);

            XmlNode node_rotate_data = doc.SelectSingleNode("/ica/body/node_rotate_data");
            this.node_rotate_data = ReadNodeTransformationData(node_rotate_data);
            ConvertRotateDataToRadians();

            XmlNode node_translate_data = doc.SelectSingleNode("/ica/body/node_translate_data");
            this.node_translate_data = ReadNodeTransformationData(node_translate_data);

            XmlNode node_anm_array = doc.SelectSingleNode("/ica/body/node_anm_array");
            ReadNodeAnimations(node_anm_array);

            m_Model.ScaleAnimations(scale);

            return m_Model;
        }
	public unsafe static OpenTK.Vector3 LocalGetSupportingVertex(this ConvexShape obj, ref OpenTK.Vector3 vec)
	{
		fixed (OpenTK.Vector3* vecPtr = &vec)
		{
			return obj.LocalGetSupportingVertex(ref *(BulletSharp.Math.Vector3*)vecPtr).ToOpenTK();
		}
	}
	public unsafe static void GetFrameOffsetB(this ConeTwistConstraint obj, out OpenTK.Matrix4 value)
	{
		fixed (OpenTK.Matrix4* valuePtr = &value)
		{
			*(BulletSharp.Math.Matrix*)valuePtr = obj.FrameOffsetB;
		}
	}
Example #21
0
 public override void draw(OpenTK.FrameEventArgs e)
 {
     foreach (var i in links)
     {
         if (Game.pbox.expanded)
         {
             if (i.Key.ModifiedBounds.Contains(new Point(Game.game.Mouse.X, Game.game.Mouse.Y)))
             {
                 if (Game.MouseState.LeftButton && canpress)
                 {
                     launchSite(i.Value);
                     canpress = false;
                 }
                 if (!i.Key.Fading)
                 {
                     i.Key.Colour = Color.FromArgb(100, Color.Orange);
                 }
             }
             else
             {
                 if (!i.Key.Fading)
                 {
                     i.Key.Colour = Color.FromArgb(100, Color.SteelBlue);
                 }
             }
         }
         i.Key.draw(e);
         //    Console.WriteLine(i.Key.Fading + " " + i.Key.Colour.A);
     }
     base.draw(e);
     if (!Game.MouseState.LeftButton)
     {
         canpress = true;
     }
 }
	public unsafe static void SetPointInWorld(this PointCollector obj, ref OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			obj.PointInWorld = *(BulletSharp.Math.Vector3*)valuePtr;
		}
	}
	public unsafe static void GetAppliedForceBodyA(this JointFeedback obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.AppliedForceBodyA;
		}
	}
	public unsafe static void GetNormalOnBInWorld(this PointCollector obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.NormalOnBInWorld;
		}
	}
	public unsafe static void GetHalfExtentsWithMargin(this BoxShape obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.HalfExtentsWithMargin;
		}
	}
Example #26
0
 Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data)
 {
     unsafe
     {
         return Delegates.gluBuild1DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data);
     }
 }
	public unsafe static void GetGravity(this DynamicsWorld obj, out OpenTK.Vector3 value)
	{
		fixed (OpenTK.Vector3* valuePtr = &value)
		{
			*(BulletSharp.Math.Vector3*)valuePtr = obj.Gravity;
		}
	}
       public unsafe static void GetVertex(this PolyhedralConvexShape obj, int i, out OpenTK.Vector3 vtx)
	{
		fixed (OpenTK.Vector3* vtxPtr = &vtx)
		{
               obj.GetVertex(i, out *(BulletSharp.Math.Vector3*)vtxPtr);
		}
	}
Example #29
0
 internal Vector3(OpenTK.Vector3d vec)
     : this()
 {
     X = vec.X;
     Y = vec.Y;
     Z = vec.Z;
 }
Example #30
0
 public override void OnUpdateFrame(OpenTK.FrameEventArgs e)
 {
     base.OnUpdateFrame(e);
     int count = 0;
     int ycount = 0;
     lock (Client.User.users)
     {
         foreach (var pair in Client.User.users)
         {
             if (pair.Value.UpdateGraphics)
             {
                 pair.Value.Disp = new UI.UserDisplay(pair.Value, new System.Drawing.Point(0, 0));
                 pair.Value.UpdateGraphics = false;
             }
             if (pair.Value != null && pair.Value.Disp != null)
             {
                 pair.Value.Disp.update(e);
             }
             pair.Value.Disp.move(new System.Drawing.Point(count * 350, ycount * 104), 0);
             count++;
             if (count * 350  + 350 > Config.ResWidth)
             {
                 ycount++;
                 count = 0;
             }
         }
     }
 }