Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ParadoxMotionState.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core.Mathematics;
4 
5 namespace SiliconStudio.Paradox.Physics
6 {
7  class ParadoxMotionState : BulletSharp.SharpMotionState
8  {
9  private readonly RigidBody rigidBody;
10 
12  {
13  rigidBody = rb;
14  }
15 
16  public override void GetWorldTransform(out Matrix transform)
17  {
18  if (rigidBody.GetWorldTransformCallback != null)
19  {
20  rigidBody.GetWorldTransformCallback(out transform);
21  }
22  else
23  {
24  transform = Matrix.Identity;
25  }
26  }
27 
28  public override void SetWorldTransform(Matrix transform)
29  {
30  if (rigidBody.SetWorldTransformCallback != null)
31  {
32  rigidBody.SetWorldTransformCallback(transform);
33  }
34  }
35  }
36 }
override void GetWorldTransform(out Matrix transform)
using SiliconStudio.Paradox. Physics
override void SetWorldTransform(Matrix transform)
Represents a 4x4 mathematical matrix.
Definition: Matrix.cs:47