| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // SoundSource3D.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- 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.Audio
- {
- /// <summary>
- /// %Sound source component with three-dimensional position.
- /// </summary>
- public unsafe partial class SoundSource3D : SoundSource
- {
- unsafe partial void OnSoundSource3DCreated ();
- [Preserve]
- public SoundSource3D (IntPtr handle) : base (handle)
- {
- OnSoundSource3DCreated ();
- }
- [Preserve]
- protected SoundSource3D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnSoundSource3DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int SoundSource3D_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (SoundSource3D_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr SoundSource3D_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (SoundSource3D_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int SoundSource3D_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(SoundSource3D));
- return new StringHash (SoundSource3D_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr SoundSource3D_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(SoundSource3D));
- return Marshal.PtrToStringAnsi (SoundSource3D_GetTypeNameStatic ());
- }
- [Preserve]
- public SoundSource3D () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr SoundSource3D_SoundSource3D (IntPtr context);
- [Preserve]
- public SoundSource3D (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(SoundSource3D));
- handle = SoundSource3D_SoundSource3D ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnSoundSource3DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(SoundSource3D));
- SoundSource3D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
- /// <summary>
- /// Visualize the component as debug geometry.
- /// </summary>
- public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_Update (IntPtr handle, float timeStep);
- /// <summary>
- /// Update sound source.
- /// </summary>
- public override void Update (float timeStep)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_Update (handle, timeStep);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetDistanceAttenuation (IntPtr handle, float nearDistance, float farDistance, float rolloffFactor);
- /// <summary>
- /// Set attenuation parameters.
- /// </summary>
- public void SetDistanceAttenuation (float nearDistance, float farDistance, float rolloffFactor)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetDistanceAttenuation (handle, nearDistance, farDistance, rolloffFactor);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetAngleAttenuation (IntPtr handle, float innerAngle, float outerAngle);
- /// <summary>
- /// Set angle attenuation parameters.
- /// </summary>
- public void SetAngleAttenuation (float innerAngle, float outerAngle)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetAngleAttenuation (handle, innerAngle, outerAngle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetNearDistance (IntPtr handle, float distance);
- /// <summary>
- /// Set near distance. Inside this range sound will not be attenuated.
- /// </summary>
- private void SetNearDistance (float distance)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetNearDistance (handle, distance);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetFarDistance (IntPtr handle, float distance);
- /// <summary>
- /// Set far distance. Outside this range sound will be completely attenuated.
- /// </summary>
- private void SetFarDistance (float distance)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetFarDistance (handle, distance);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetInnerAngle (IntPtr handle, float angle);
- /// <summary>
- /// Set inner angle in degrees. Inside this angle sound will not be attenuated.By default 360, meaning direction never has an effect.
- /// </summary>
- private void SetInnerAngle (float angle)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetInnerAngle (handle, angle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetOuterAngle (IntPtr handle, float angle);
- /// <summary>
- /// Set outer angle in degrees. Outside this angle sound will be completely attenuated. By default 360, meaning direction never has an effect.
- /// </summary>
- private void SetOuterAngle (float angle)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetOuterAngle (handle, angle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_SetRolloffFactor (IntPtr handle, float factor);
- /// <summary>
- /// Set rolloff power factor, defines attenuation function shape.
- /// </summary>
- public void SetRolloffFactor (float factor)
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_SetRolloffFactor (handle, factor);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void SoundSource3D_CalculateAttenuation (IntPtr handle);
- /// <summary>
- /// Calculate attenuation and panning based on current position and listener position.
- /// </summary>
- public void CalculateAttenuation ()
- {
- Runtime.ValidateRefCounted (this);
- SoundSource3D_CalculateAttenuation (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float SoundSource3D_GetNearDistance (IntPtr handle);
- /// <summary>
- /// Return near distance.
- /// </summary>
- private float GetNearDistance ()
- {
- Runtime.ValidateRefCounted (this);
- return SoundSource3D_GetNearDistance (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float SoundSource3D_GetFarDistance (IntPtr handle);
- /// <summary>
- /// Return far distance.
- /// </summary>
- private float GetFarDistance ()
- {
- Runtime.ValidateRefCounted (this);
- return SoundSource3D_GetFarDistance (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float SoundSource3D_GetInnerAngle (IntPtr handle);
- /// <summary>
- /// Return inner angle in degrees.
- /// </summary>
- private float GetInnerAngle ()
- {
- Runtime.ValidateRefCounted (this);
- return SoundSource3D_GetInnerAngle (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float SoundSource3D_GetOuterAngle (IntPtr handle);
- /// <summary>
- /// Return outer angle in degrees.
- /// </summary>
- private float GetOuterAngle ()
- {
- Runtime.ValidateRefCounted (this);
- return SoundSource3D_GetOuterAngle (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float SoundSource3D_RollAngleoffFactor (IntPtr handle);
- /// <summary>
- /// Return rolloff power factor.
- /// </summary>
- public float RollAngleoffFactor ()
- {
- Runtime.ValidateRefCounted (this);
- return SoundSource3D_RollAngleoffFactor (handle);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return near distance.
- /// Or
- /// Set near distance. Inside this range sound will not be attenuated.
- /// </summary>
- public float NearDistance {
- get {
- return GetNearDistance ();
- }
- set {
- SetNearDistance (value);
- }
- }
- /// <summary>
- /// Return far distance.
- /// Or
- /// Set far distance. Outside this range sound will be completely attenuated.
- /// </summary>
- public float FarDistance {
- get {
- return GetFarDistance ();
- }
- set {
- SetFarDistance (value);
- }
- }
- /// <summary>
- /// Return inner angle in degrees.
- /// Or
- /// Set inner angle in degrees. Inside this angle sound will not be attenuated.By default 360, meaning direction never has an effect.
- /// </summary>
- public float InnerAngle {
- get {
- return GetInnerAngle ();
- }
- set {
- SetInnerAngle (value);
- }
- }
- /// <summary>
- /// Return outer angle in degrees.
- /// Or
- /// Set outer angle in degrees. Outside this angle sound will be completely attenuated. By default 360, meaning direction never has an effect.
- /// </summary>
- public float OuterAngle {
- get {
- return GetOuterAngle ();
- }
- set {
- SetOuterAngle (value);
- }
- }
- }
- }
|