forked from urho3d/urho3d
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] add binding for Profiler.BeginBlock
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Collections.Generic; | ||
using Urho.Urho2D; | ||
using Urho.Gui; | ||
using Urho.Resources; | ||
using Urho.IO; | ||
using Urho.Navigation; | ||
using Urho.Network; | ||
|
||
namespace Urho | ||
{ | ||
/// <summary> | ||
/// Construct. | ||
/// </summary> | ||
public unsafe partial class KinematicCharacterController : Component | ||
{ | ||
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)] | ||
internal static extern void KinematicCharacterController_GetTransform (IntPtr handle , out Urho.Vector3 position, out Urho.Quaternion rotation); | ||
|
||
/// <summary> | ||
/// Set character position and rotation in world space as an atomic operation. | ||
/// </summary> | ||
public void GetTransform(out Urho.Vector3 position, out Urho.Quaternion rotation) | ||
{ | ||
Runtime.ValidateRefCounted (this); | ||
KinematicCharacterController_GetTransform (handle, out position, out rotation); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Collections.Generic; | ||
using Urho.Urho2D; | ||
using Urho.Gui; | ||
using Urho.Resources; | ||
using Urho.IO; | ||
using Urho.Navigation; | ||
using Urho.Network; | ||
|
||
namespace Urho | ||
{ | ||
/// <summary> | ||
/// Hierarchical performance profiler subsystem. | ||
/// </summary> | ||
public unsafe partial class Profiler : UrhoObject | ||
{ | ||
|
||
[DllImport(Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)] | ||
internal static extern void Profiler_BeginBlock(IntPtr handle, string name); | ||
|
||
/// <summary> | ||
/// Begin timing a profiling block.. | ||
/// </summary> | ||
public void BeginBlock(string name) | ||
{ | ||
Runtime.ValidateRefCounted(this); | ||
Profiler_BeginBlock(handle, name); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters