コード例 #1
0
        private void SetupKinect()
        {
            // Check to see if there are any Kinect devices connected.
            if (Runtime.Kinects.Count == 0)
            {
                MessageBox.Show("No Kinect connected");
            }
            else
            {
                // Use first Kinect.
                kinectRuntime = Runtime.Kinects[0];

                // Initialize to return both Color & Depth data.
                kinectRuntime.Initialize(RuntimeOptions.UseColor | RuntimeOptions.UseDepth);

                // Attach to the event to receive video frame data.
                kinectRuntime.VideoFrameReady += KinectRuntime_VideoFrameReady;

                // Attach to the event to receive the depth frame data.
                kinectRuntime.DepthFrameReady += KinectRuntime_DepthFrameReady;

                // Start capturing video by opening the stream.
                kinectRuntime.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);

                // Start capturing the depth data by opening the stream.
                kinectRuntime.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution640x480, ImageType.Depth);

                kinectRuntime.NuiCamera.ElevationAngle = 0;
            }
        }
コード例 #2
0
        public void Serialize(Runtime.Serialization.IO.CompactWriter writer)
        {
            writer.WriteObject(_updatedCacheConfig);
            writer.WriteObject(_affectedNodesList);
            writer.WriteObject(_affectedPartitions);

        }
コード例 #3
0
        /// <summary>
        /// For a given list of formal parameters, get the function end points that resolve
        /// </summary>
        /// <param name="context"></param>
        /// <param name="formalParams"></param>
        /// <param name="replicationInstructions"></param>
        /// <param name="stackFrame"></param>
        /// <param name="core"></param>
        /// <param name="unresolvable">The number of argument sets that couldn't be resolved</param>
        /// <returns></returns>
        public Dictionary<FunctionEndPoint, int> GetExactMatchStatistics(
            Runtime.Context context,
            List<List<StackValue>> reducedFormalParams, StackFrame stackFrame, RuntimeCore runtimeCore, out int unresolvable)
        {
            List<ReplicationInstruction> replicationInstructions = new List<ReplicationInstruction>(); //We've already done the reduction before calling this

            unresolvable = 0;
            Dictionary<FunctionEndPoint, int> ret = new Dictionary<FunctionEndPoint, int>();

            foreach (List<StackValue> formalParamSet in reducedFormalParams)
            {
                List<FunctionEndPoint> feps = GetExactTypeMatches(context,
                                                                  formalParamSet, replicationInstructions, stackFrame,
                                                                  runtimeCore);
                if (feps.Count == 0)
                {
                    //We have an arugment set that couldn't be resolved
                    unresolvable++;
                }

                foreach (FunctionEndPoint fep in feps)
                {
                    if (ret.ContainsKey(fep))
                        ret[fep]++;
                    else
                        ret.Add(fep, 1);
                }
             }

             return ret;
        }
コード例 #4
0
        private void SetupKinect()
        {
            if (Runtime.Kinects.Count == 0)
            {
                this.Title = "No Kinect connected"; 
            }
            else
            {
                //use first Kinect
                nui = Runtime.Kinects[0];

                //Initialize to do skeletal tracking
                nui.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseColor | RuntimeOptions.UseDepthAndPlayerIndex);

                //add event to receive skeleton data
                nui.SkeletonFrameReady += new EventHandler<SkeletonFrameReadyEventArgs>(nui_SkeletonFrameReady);

                //to experiment, toggle TransformSmooth between true & false and play with parameters            
                nui.SkeletonEngine.TransformSmooth = true;
                TransformSmoothParameters parameters = new TransformSmoothParameters();
                // parameters used to smooth the skeleton data
                parameters.Smoothing = 0.3f;
                parameters.Correction = 0.3f;
                parameters.Prediction = 0.4f;
                parameters.JitterRadius = 0.7f;
                parameters.MaxDeviationRadius = 0.2f;
                nui.SkeletonEngine.SmoothParameters = parameters;

            }
        }
コード例 #5
0
ファイル: Platform.cs プロジェクト: 0x0all/FFTTools
        static Platform()
        {
            var p = (int) Environment.OSVersion.Platform;
            OS = ((p == 4) || (p == 6) || (p == 128)) ? OS.Unix : OS.Windows;

            Runtime = (Type.GetType("Mono.Runtime") == null) ? Runtime.Mono : Runtime.DotNet;
        }
コード例 #6
0
ファイル: MainWindow.xaml.cs プロジェクト: knu2/JustinThrow
        private void Clean()
        {
            swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;

            CloseGestureDetector();

            ClosePostureDetector();

            //if (voiceCommander != null)
            //{
            //    voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
            //    voiceCommander.Dispose();
            //    voiceCommander = null;
            //}

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (kinectRuntime != null)
            {
                kinectRuntime.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectRuntime.VideoFrameReady -= kinectRuntime_VideoFrameReady;
                kinectRuntime.Uninitialize();
                kinectRuntime = null;
            }
        }
コード例 #7
0
ファイル: LockFileUtils.cs プロジェクト: leloulight/dnx
        public static LockFileTargetLibrary CreateLockFileTargetLibrary(Runtime.Project projectDependency,
                                                                        RestoreContext context)
        {
            var targetFrameworkInfo = projectDependency.GetCompatibleTargetFramework(context.FrameworkName);

            var lockFileLib = new LockFileTargetLibrary
            {
                Name = projectDependency.Name,
                Version = projectDependency.Version,
                TargetFramework = targetFrameworkInfo.FrameworkName, // null TFM means it's incompatible
                Type = "project"
            };

            var dependencies = projectDependency.Dependencies.Concat(targetFrameworkInfo.Dependencies);

            foreach (var dependency in dependencies)
            {
                if (dependency.LibraryRange.IsGacOrFrameworkReference)
                {
                    lockFileLib.FrameworkAssemblies.Add(
                        LibraryRange.GetAssemblyName(dependency.LibraryRange.Name));
                }
                else
                {
                    lockFileLib.Dependencies.Add(new PackageDependency(
                        dependency.LibraryRange.Name, 
                        dependency.LibraryRange.VersionRange));
                }
            }

            return lockFileLib;
        }
コード例 #8
0
ファイル: StateTxfrInfo.cs プロジェクト: javithalion/NCache
 void Runtime.Serialization.ICompactSerializable.Serialize(Runtime.Serialization.IO.CompactWriter writer)
 {
     writer.WriteObject(data);
     writer.Write(transferCompleted);
     //writer.WriteObject(_payLoadCompilationInformation);
     writer.Write(this.sendDataSize);
 }
コード例 #9
0
        /// <summary>
        /// Return true if the request should be retried. Implements additional checks 
        /// specific to S3 on top of the checks in DefaultRetryPolicy.
        /// </summary>
        /// <param name="executionContext">Request context containing the state of the request.</param>
        /// <param name="exception">The exception thrown by the previous request.</param>
        /// <returns>Return true if the request should be retried.</returns>
        public override async Task<bool> RetryForExceptionAsync(Runtime.IExecutionContext executionContext, Exception exception)
        {
            var syncResult = RetryForExceptionSync(executionContext, exception);
            if (syncResult.HasValue)
            {
                return syncResult.Value;
            }
            else
            {
                var serviceException = exception as AmazonServiceException;
                string correctedRegion = null;
                AmazonS3Uri s3BucketUri;
                if (AmazonS3Uri.TryParseAmazonS3Uri(executionContext.RequestContext.Request.Endpoint, out s3BucketUri))
                {
                    var credentials = executionContext.RequestContext.ImmutableCredentials;
                    correctedRegion = await BucketRegionDetector.DetectMismatchWithHeadBucketFallbackAsync(s3BucketUri, serviceException, credentials).ConfigureAwait(false);
                }

                if (correctedRegion == null)
                {
                    return base.RetryForException(executionContext, exception);
                }
                else
                {
                    // change authentication region of request and signal the handler to sign again with the new region
                    executionContext.RequestContext.Request.AuthenticationRegion = correctedRegion;
                    executionContext.RequestContext.IsSigned = false;
                    return true;
                }
            }
        }
コード例 #10
0
ファイル: ConcreteKinectService.cs プロジェクト: jnsn/kinect
        public void Initialize()
        {
            try
            {
                Runtime.Kinects.StatusChanged += OnKinectStatusChanged;

                foreach (var kinect in Runtime.Kinects.Where(kinect => kinect.Status == KinectStatus.Connected))
                {
                    Kinect = kinect;
                    break;
                }

                if (Runtime.Kinects.Count == 0)
                {
                    MessageBox.Show("No Kinect device connected.");
                }
                else
                {
                    Setup();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #11
0
ファイル: StateTxfrInfo.cs プロジェクト: javithalion/NCache
        //public ArrayList PayLoad
        //{
        //    get { return _payLoad; }
        //}

        //public ArrayList PayLoadCompilationInfo
        //{
        //    get { return _payLoadCompilationInformation; }
        //}

        #region ICompactSerializable Members

        void Runtime.Serialization.ICompactSerializable.Deserialize(Runtime.Serialization.IO.CompactReader reader)
        {
            data = (HashVector)reader.ReadObject();
            transferCompleted = reader.ReadBoolean();
            //_payLoadCompilationInformation = reader.ReadObject() as ArrayList;
            this.sendDataSize = reader.ReadInt64();
        }
コード例 #12
0
ファイル: AssemblyUtil.cs プロジェクト: externl/ice
        private static Dictionary<string, Type> _typeTable = new Dictionary<string, Type>(); // <type name, Type> pairs.

        #endregion Fields

        #region Constructors

        static AssemblyUtil()
        {
            PlatformID id = Environment.OSVersion.Platform;
            if(   id == PlatformID.Win32NT
               || id == PlatformID.Win32S
               || id == PlatformID.Win32Windows
               || id == PlatformID.WinCE)
            {
                platform_ = Platform.Windows;
            }
            else
            {
                platform_ = Platform.NonWindows;
            }

            if(System.Type.GetType("Mono.Runtime") != null)
            {
                runtime_ = Runtime.Mono;
            }
            else
            {
                runtime_ = Runtime.DotNET;
            }

            System.Version v = System.Environment.Version;
            runtimeMajor_ = v.Major;
            runtimeMinor_ = v.Minor;
            runtimeBuild_ = v.Build;
            runtimeRevision_ = v.Revision;

            v = System.Environment.OSVersion.Version;

            osx_ = false;
            if (platform_ == Platform.NonWindows)
            {
                try
                {
                    Assembly a = Assembly.Load(
                        "Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756");
                    Type syscall = a.GetType("Mono.Unix.Native.Syscall");
                    if(syscall != null)
                    {
                        MethodInfo method = syscall.GetMethod("uname", BindingFlags.Static | BindingFlags.Public);
                        if(method != null)
                        {
                            object[] p = new object[1];
                            method.Invoke(null, p);
                            if(p[0] != null)
                            {
                                Type utsname = a.GetType("Mono.Unix.Native.Utsname");
                                osx_ = ((string)utsname.GetField("sysname").GetValue(p[0])).Equals("Darwin");
                            }
                        }
                    }
                }
                catch(System.Exception)
                {
                }
            }
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: zoetrope/ReactiveRTM
    public static void Main(string[] args)
    {
        var runtime = new Runtime();
        runtime.Initialize(RuntimeOptions.UseSkeletalTracking);

        var observer = runtime.SkeletonFrameReadyAsObservable();
    }
コード例 #14
0
        public static IEnumerable<FrameworkName> SelectFrameworks(Runtime.Project project,
                                                                  IEnumerable<string> userSelection,
                                                                  FrameworkName fallbackFramework,
                                                                  out string errorMessage)
        {
            var specifiedFrameworks = userSelection.ToDictionary(f => f, FrameworkNameHelper.ParseFrameworkName);

            var projectFrameworks = new HashSet<FrameworkName>(
                project.GetTargetFrameworks()
                       .Select(c => c.FrameworkName));

            IEnumerable<FrameworkName> frameworks = null;

            if (projectFrameworks.Count > 0)
            {
                // Specified target frameworks have to be a subset of the project frameworks
                if (!ValidateFrameworks(projectFrameworks, specifiedFrameworks, out errorMessage))
                {
                    return null;
                }

                frameworks = specifiedFrameworks.Count > 0 ? specifiedFrameworks.Values : (IEnumerable<FrameworkName>)projectFrameworks;
            }
            else
            {
                frameworks = new[] { fallbackFramework };
            }

            errorMessage = string.Empty;
            return frameworks;
        }
コード例 #15
0
ファイル: InstallBuilder.cs プロジェクト: elanwu123/dnx
 public InstallBuilder(Runtime.Project project, IPackageBuilder packageBuilder, Reports buildReport)
 {
     _project = project;
     _packageBuilder = packageBuilder;
     _buildReport = buildReport;
     IsApplicationPackage = project.Commands.Any();
 }
コード例 #16
0
ファイル: Parser.cs プロジェクト: gavin-zyi/Rin
        public Parser(Runtime runtime, Scanner scanner)
        {
            this.runtime = runtime;
            this.scanner = scanner;

            scopeManager = new ScopeManager(runtime);
        }
コード例 #17
0
        private void SetupKinect()
        {
            // Check to see if there are any Kinect devices connected.
            if (Runtime.Kinects.Count == 0)
            {
                MessageBox.Show("No Kinect connected");
            }
            else
            {
                // Use first Kinect.
                kinectRuntime = Runtime.Kinects[0];

                // Initialize to return skeletal data.
                kinectRuntime.Initialize(RuntimeOptions.UseSkeletalTracking);

                // Attach to the event to receive skeleton frame data.
                kinectRuntime.SkeletonFrameReady += KinectRuntime_SkeletonFrameReady;

                kinectRuntime.SkeletonEngine.TransformSmooth = true;

                TransformSmoothParameters parameters = new TransformSmoothParameters();
                parameters.Smoothing = 0.5f;
                parameters.Correction = 0.3f;
                parameters.Prediction = 0.2f;
                parameters.JitterRadius = .2f;
                parameters.MaxDeviationRadius = 0.5f;

                kinectRuntime.SkeletonEngine.SmoothParameters = parameters;

                kinectRuntime.NuiCamera.ElevationAngle = 0;
            }
        }
コード例 #18
0
 public void Serialize(Runtime.Serialization.IO.CompactWriter writer)
 {
     writer.Write(start);
     writer.Write(stop);
     writer.Write(frequency);
     writer.Write(multiplier);
 } 
コード例 #19
0
ファイル: RuntimeThread.cs プロジェクト: KevinKelley/katahdin
 public RuntimeThread(Runtime runtime)
 {
     this.runtime = runtime;
     
     thread = new Thread(new ThreadStart(Entry));
     thread.Start();
 }
コード例 #20
0
ファイル: Platform.cs プロジェクト: AnthonyNystrom/Pikling
      static Platform()
      {
         int p = (int)Environment.OSVersion.Platform;
         _os = ((p == 4) || (p == 128)) ? OS.Linux : OS.Windows;

         _runtime = (Type.GetType("System.MonoType", false) != null) ? Runtime.Mono : Runtime.DotNet;
      }
コード例 #21
0
 public void Deserialize(Runtime.Serialization.IO.CompactReader reader)
 {
     start = reader.ReadInt64();
     stop = reader.ReadInt64();
     frequency = reader.ReadInt64();
     multiplier = reader.ReadDecimal();
 }
コード例 #22
0
		public override object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
		{
			base.SetObjectData(obj,info,context,selector);

			Model model = (Model) obj;
			
			model.SuspendEvents = true;
			model.Suspend();

			model.AlignGrid = info.GetBoolean("AlignGrid");
			model.DragScroll = info.GetBoolean("DragScroll");
			model.DrawGrid = info.GetBoolean("DrawGrid");
			model.DrawPageLines = info.GetBoolean("DrawPageLines");
			model.DrawSelections = info.GetBoolean("DrawSelections");
			model.GridColor = Color.FromArgb(Convert.ToInt32(info.GetString("GridColor")));
			model.GridSize = Serialize.GetSize(info.GetString("GridSize"));
			model.GridStyle = (GridStyle) Enum.Parse(typeof(GridStyle), info.GetString("GridStyle"));
			model.PageLineSize = Serialize.GetSizeF(info.GetString("PageLineSize"));

			if (Serialize.Contains(info,"DragSelect")) model.DragSelect = info.GetBoolean("DragSelect");

			mRuntime = (Runtime) info.GetValue("Runtime",typeof(Runtime));

			model.SuspendEvents = false;
			model.Resume();
			
			return model;
		}
コード例 #23
0
 private void AddKinectViewer(Runtime runtime)
 {
     var kinectViewer = new KinectDiagnosticViewer();
     kinectViewer.kinectDepthViewer.MouseLeftButtonDown += new MouseButtonEventHandler(kinectDepthViewer_MouseLeftButtonDown);
     kinectViewer.Kinect= runtime;
     viewerHolder.Items.Add(kinectViewer);
 }
コード例 #24
0
ファイル: Project.cs プロジェクト: robbert229/dnx-watch
        public Project(Runtime.Project runtimeProject)
        {
            ProjectFile = runtimeProject.ProjectFilePath;
            ProjectDirectory = runtimeProject.ProjectDirectory;

            Files = runtimeProject.Files.SourceFiles.Concat(
                    runtimeProject.Files.ResourceFiles.Values.Concat(
                    runtimeProject.Files.PreprocessSourceFiles.Concat(
                    runtimeProject.Files.SharedFiles))).Concat(
                    new string[] { runtimeProject.ProjectFilePath })
                .ToList();

            var projectLockJsonPath = Path.Combine(runtimeProject.ProjectDirectory, LockFileReader.LockFileName);
            var lockFileReader = new LockFileReader();

            if (File.Exists(projectLockJsonPath))
            {
                var lockFile = lockFileReader.Read(projectLockJsonPath);
                ProjectDependencies = lockFile.ProjectLibraries.Select(dep => GetProjectRelativeFullPath(dep.Path)).ToList();
            }
            else
            {
                ProjectDependencies = new string[0];
            }
        }
コード例 #25
0
ファイル: MoSyncAudioModule.cs プロジェクト: N00bKefka/MoSync
        public void Init(Ioctls ioctls, Core core, Runtime runtime)
        {
            ioctls.maAudioDataCreateFromResource = delegate(int _mime, int _data, int _offset, int _length, int _flags)
            {

                return MoSync.Constants.MA_AUDIO_ERR_INVALID_SOUND_FORMAT;
            };

            ioctls.maAudioDataDestroy = delegate(int _audioData)
            {

                return MoSync.Constants.MA_AUDIO_ERR_OK;
            };

            ioctls.maAudioInstanceCreate = delegate(int _audioData)
            {

                return MoSync.Constants.MA_AUDIO_ERR_INVALID_DATA;
            };

            ioctls.maAudioInstanceDestroy = delegate(int _audioInstance)
            {

                return MoSync.Constants.MA_AUDIO_ERR_OK;
            };

            ioctls.maAudioPlay = delegate(int _audioInstance)
            {

                return MoSync.Constants.MA_AUDIO_ERR_OK;
            };
        }
コード例 #26
0
ファイル: MoSyncAudioModule.cs プロジェクト: JennYung/MoSync
        public void Init(Ioctls ioctls, Core core, Runtime runtime)
        {
            //			ioctls.maAudioDataCreateFromFile = delegate(int _mime, int _filename, int _flags)
            //			{
            //				return MoSync.Constants.MA_AUDIO_ERR_INVALID_SOUND_FORMAT;
            //			};

            ioctls.maAudioDataCreateFromResource = delegate(int _mime, int _data, int _offset, int _length, int _flags)
            {
                return MoSync.Constants.IOCTL_UNAVAILABLE;
            };

            ioctls.maAudioDataDestroy = delegate(int _audioData)
            {
                return MoSync.Constants.IOCTL_UNAVAILABLE;
            };

            ioctls.maAudioInstanceCreate = delegate(int _audioData)
            {
                return MoSync.Constants.IOCTL_UNAVAILABLE;
            };

            ioctls.maAudioInstanceDestroy = delegate(int _audioInstance)
            {
                return MoSync.Constants.IOCTL_UNAVAILABLE;
            };

            ioctls.maAudioPlay = delegate(int _audioInstance)
            {
                return MoSync.Constants.IOCTL_UNAVAILABLE;
            };
        }
コード例 #27
0
ファイル: EventStatus.cs プロジェクト: javithalion/NCache
 public void Deserialize(Runtime.Serialization.IO.CompactReader reader)
 {
     _cacheCleared = reader.ReadBoolean();
     _itemAdded = reader.ReadBoolean();
     _itemRemoved = reader.ReadBoolean();
     _itemUpdated = reader.ReadBoolean();
 }
コード例 #28
0
ファイル: Tracer.cs プロジェクト: carriercomm/prolog
 private void PrintGoal (Runtime.Goal goal, string type)
 {
     sb.Append (type);
     sb.Append (new string (' ', 4 * goal.Level));
     Runtime.SolutionTreePrinter.Print (goal, sb);
     sb.AppendLine();
 }
コード例 #29
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            _nui = Runtime.Kinects.FirstOrDefault();
              if (_nui != null)
              {
            if (buttonStart.Text == Resources.Form1_buttonStart_Click_Start)
            {
              buttonStart.Text = Resources.Form1_buttonStart_Click_Stop;

              _nui.Initialize(RuntimeOptions.UseColor);
              _nui.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);

              _nui.VideoFrameReady += FrameReady;
            }
            else if (buttonStart.Text == Resources.Form1_buttonStart_Click_Stop)
            {
              buttonStart.Text = Resources.Form1_buttonStart_Click_Start;
              _nui.Uninitialize();
            }
              }
              else
              {
            var dr = MessageBox.Show(Resources.Form1_buttonStart_Click_Please_connect_a_Microsoft_Kinect_to_the_computer,
                                 Resources.Form1_buttonStart_Click_Error, MessageBoxButtons.RetryCancel);
            if (dr == DialogResult.Retry)
            {
              buttonStart_Click(sender, e);
            }
              }
        }
コード例 #30
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Runtime kinectRuntime = new Runtime();

            kinectRuntime.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking);
            kinectRuntime.DepthStream.Open(ImageStreamType.Depth, 2, ImageResolution.Resolution320x240, ImageType.DepthAndPlayerIndex);

            kinectRuntime.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
            kinectRuntime.DepthFrameReady += kinectRuntime_DepthFrameReady;

            kinectRuntime.SkeletonEngine.TransformSmooth = true;

            var parameters = new TransformSmoothParameters
            {
                Smoothing = 0.75f,
                Correction = 0.0f,
                Prediction = 0.0f,
                JitterRadius = 0.05f,
                MaxDeviationRadius = 0.04f
            };
            kinectRuntime.SkeletonEngine.SmoothParameters = parameters;

            using (game = new Game1())
            {
                game.Exiting += game_Exiting;
                game.Run();
            }

            kinectRuntime.Uninitialize();
        }
コード例 #31
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return material attribute.
		/// </summary>
		private ResourceRef GetMaterialAttr ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetMaterialAttr (handle);
		}
コード例 #32
0
        public TKey FirstObject()
        {
            var ret = _FirstObject();

            return(Runtime.GetINativeObject <TKey> (ret, false));
        }
コード例 #33
0
 public new TKey this [nint idx] {
     get {
         var ret = _GetObject(idx);
         return(Runtime.GetINativeObject <TKey> (ret, false));
     }
 }
コード例 #34
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Register object factory. Drawable must be registered first.
		/// </summary>
		public new static void RegisterObject (Context context)
		{
			Runtime.Validate (typeof(Text3D));
			Text3D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
		}
コード例 #35
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Get color attribute. Uses just the top-left color.
		/// </summary>
		private Urho.Color GetColorAttr ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetColorAttr (handle);
		}
コード例 #36
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return text attribute.
		/// </summary>
		private string GetTextAttr ()
		{
			Runtime.ValidateRefCounted (this);
			return Marshal.PtrToStringAnsi (Text3D_GetTextAttr (handle));
		}
コード例 #37
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Set text attribute.
		/// </summary>
		public void SetTextAttr (string value)
		{
			Runtime.ValidateRefCounted (this);
			Text3D_SetTextAttr (handle, value);
		}
コード例 #38
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return whether text has fixed screen size.
		/// </summary>
		private bool IsFixedScreenSize ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_IsFixedScreenSize (handle);
		}
コード例 #39
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		private static string GetTypeNameStatic ()
		{
			Runtime.Validate (typeof(Text3D));
			return Marshal.PtrToStringAnsi (Text3D_GetTypeNameStatic ());
		}
コード例 #40
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return how the text rotates in relation to the camera.
		/// </summary>
		private FaceCameraMode GetFaceCameraMode ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetFaceCameraMode (handle);
		}
コード例 #41
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return size of character by index.
		/// </summary>
		public Vector2 GetCharSize (uint index)
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetCharSize (handle, index);
		}
コード例 #42
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return opacity.
		/// </summary>
		private float GetOpacity ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetOpacity (handle);
		}
コード例 #43
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return number of characters.
		/// </summary>
		private uint GetNumChars ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetNumChars (handle);
		}
コード例 #44
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return corner color.
		/// </summary>
		public Urho.Color GetColor (Corner corner)
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetColor (handle, corner);
		}
コード例 #45
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		private static StringHash GetTypeStatic ()
		{
			Runtime.Validate (typeof(Text3D));
			return new StringHash (Text3D_GetTypeStatic ());
		}
コード例 #46
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return width of row by index.
		/// </summary>
		public int GetRowWidth (uint index)
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetRowWidth (handle, index);
		}
コード例 #47
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return effect depth bias.
		/// </summary>
		private float GetEffectDepthBias ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetEffectDepthBias (handle);
		}
コード例 #48
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return row height.
		/// </summary>
		private int GetRowHeight ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetRowHeight (handle);
		}
コード例 #49
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return effect stroke thickness.
		/// </summary>
		private int GetEffectStrokeThickness ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetEffectStrokeThickness (handle);
		}
コード例 #50
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return text width.
		/// </summary>
		private int GetWidth ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetWidth (handle);
		}
コード例 #51
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return text effect.
		/// </summary>
		private TextEffect GetTextEffect ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetTextEffect (handle);
		}
コード例 #52
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return effect round stroke.
		/// </summary>
		private bool GetEffectRoundStroke ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetEffectRoundStroke (handle);
		}
コード例 #53
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return row spacing.
		/// </summary>
		private float GetRowSpacing ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetRowSpacing (handle);
		}
コード例 #54
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return effect shadow offset.
		/// </summary>
		private Urho.IntVector2 GetEffectShadowOffset ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetEffectShadowOffset (handle);
		}
コード例 #55
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return horizontal alignment.
		/// </summary>
		private HorizontalAlignment GetHorizontalAlignment ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetHorizontalAlignment (handle);
		}
コード例 #56
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return wordwrap mode.
		/// </summary>
		private bool GetWordwrap ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetWordwrap (handle);
		}
コード例 #57
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return font size.
		/// </summary>
		private float GetFontSize ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetFontSize (handle);
		}
コード例 #58
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return vertical alignment.
		/// </summary>
		private VerticalAlignment GetVerticalAlignment ()
		{
			Runtime.ValidateRefCounted (this);
			return Text3D_GetVerticalAlignment (handle);
		}
コード例 #59
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		private StringHash UrhoGetType ()
		{
			Runtime.ValidateRefCounted (this);
			return new StringHash (Text3D_GetType (handle));
		}
コード例 #60
0
ファイル: Text3D.cs プロジェクト: yrest/urho
		/// <summary>
		/// Return material.
		/// </summary>
		private Material GetMaterial ()
		{
			Runtime.ValidateRefCounted (this);
			return Runtime.LookupObject<Material> (Text3D_GetMaterial (handle));
		}