• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CameraType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CameraType的典型用法代码示例。如果您正苦于以下问题:C# CameraType类的具体用法?C# CameraType怎么用?C# CameraType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CameraType类属于命名空间,在下文中一共展示了CameraType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CaptureManager

		public CaptureManager(
			Resolution resolution,
  			bool captureImages,
		    bool captureAudio,
		    bool captureVideo,
		    CameraType cameraType,
		    string movieRecordingDirectory,
		    int movieSegmentDurationInMilliSeconds,
		    bool breakMovieIntoSegments )
		{
			this.resolution = resolution;
  			this.captureImages = captureImages;
		    this.captureAudio = captureAudio;
		    this.captureVideo = captureVideo;
			this.cameraType = cameraType;
			this.movieSegmentDurationInMilliSeconds = movieSegmentDurationInMilliSeconds;
			this.breakMovieIntoSegments = breakMovieIntoSegments;
			if ( captureAudio || captureVideo )
			{
			    this.movieRecordingDirectory =  Path.Combine( movieRecordingDirectory, getDateTimeDirectoryName( DateTime.Now ) );
				if ( Directory.Exists( this.movieRecordingDirectory ) == false )
				{
					Directory.CreateDirectory( this.movieRecordingDirectory );
				}
			}
		}
开发者ID:g7steve,项目名称:monotouch-samples,代码行数:26,代码来源:CaptureManager.cs


示例2: OnGUI

	/// <summary>
	/// Draw the custom wizard.
	/// </summary>

	void OnGUI ()
	{
		EditorGUIUtility.LookLikeControls(80f);

		GUILayout.Label("Create a new UI with the following parameters:");
		NGUIEditorTools.DrawSeparator();

		GUILayout.BeginHorizontal();
		NGUISettings.layer = EditorGUILayout.LayerField("Layer", NGUISettings.layer, GUILayout.Width(200f));
		GUILayout.Space(20f);
		GUILayout.Label("This is the layer your UI will reside on");
		GUILayout.EndHorizontal();

		GUILayout.BeginHorizontal();
		camType = (CameraType)EditorGUILayout.EnumPopup("Camera", camType, GUILayout.Width(200f));
		GUILayout.Space(20f);
		GUILayout.Label("Should this UI have a camera?");
		GUILayout.EndHorizontal();

		NGUIEditorTools.DrawSeparator();
		GUILayout.BeginHorizontal();
		EditorGUILayout.PrefixLabel("When ready,");
		bool create = GUILayout.Button("Create Your UI", GUILayout.Width(120f));
		GUILayout.EndHorizontal();

		if (create) CreateNewUI();
	}
开发者ID:Barliesque,项目名称:UnityBreakout,代码行数:31,代码来源:UICreateNewUIWizard.cs


示例3: BasicCamera

        /// <summary>
        /// Initializes a new instance of the <see cref="BasicCamera"/> class.
        /// </summary>
        /// <param name="cameraType">Type of the camera device to use.</param>
        /// <param name="captureUse">The desired usage of the camera capture device.</param>
        protected BasicCamera(CameraType cameraType, CaptureUse captureUse)
        {
            this.CameraController = new CameraController(cameraType, captureUse);
            this.TaskEngine       = new CameraTaskEngine();

            this.CameraController.FocusChanged += this.CameraControllerOnFocusChanged;
        }
开发者ID:trilok567,项目名称:Windows-Phone,代码行数:12,代码来源:BasicCamera.cs


示例4: CameraController

        /// <summary>
        /// Initializes a new instance of the <see cref="CameraController"/> class.
        /// </summary>
        /// <param name="cameraType">Type of the camera device to use.</param>
        /// <param name="captureUse">The desired usage of the camera capture device.</param>
        /// <exception cref="ArgumentException"><paramref name="cameraType"/> is not supported.</exception>
        public CameraController(CameraType cameraType, CaptureUse captureUse)
        {
            this.CameraType = cameraType;
            this.CaptureUse = captureUse;

            this.ResetCaptureDevice(notifyProperties: false);
        }
开发者ID:trilok567,项目名称:Windows-Phone,代码行数:13,代码来源:CameraController.cs


示例5: Camera

        /// <summary>
        /// 摄像机。
        /// </summary>
        /// <param name="cameraType">类型</param>
        /// <param name="width">OpenGL窗口的宽度</param>
        /// <param name="height">OpenGL窗口的高度</param>
        public Camera(CameraType cameraType, double width, double height)
        {
            this.lastWidth = width;
            this.lastHeight = height;

            IPerspectiveCamera perspectiveCamera = this;
            perspectiveCamera.FieldOfView = 60.0f;
            perspectiveCamera.AspectRatio = width / height;
            perspectiveCamera.Near = 0.01;
            perspectiveCamera.Far = 10000;

            const int factor = 100;
            IOrthoCamera orthoCamera = this;
            orthoCamera.Left = -width / 2 / factor;
            orthoCamera.Right = width / 2 / factor;
            orthoCamera.Bottom = -height / 2 / factor;
            orthoCamera.Top = height / 2 / factor;
            orthoCamera.Near = -10000;
            orthoCamera.Far = 10000;

            this.Target = defaultTarget;
            this.Position = defaultPosition;
            this.UpVector = defaultUpVector;

            this.CameraType = cameraType;
        }
开发者ID:Mofangbao,项目名称:CSharpGL,代码行数:32,代码来源:Camera.cs


示例6: OnGUI

	/// <summary>
	/// Draw the custom wizard.
	/// </summary>

	void OnGUI ()
	{
		NGUIEditorTools.SetLabelWidth(80f);

		GUILayout.Label("Create a new UI with the following parameters:");
		NGUIEditorTools.DrawSeparator();

		GUILayout.BeginHorizontal();
		NGUISettings.layer = EditorGUILayout.LayerField("Layer", NGUISettings.layer, GUILayout.Width(200f));
		GUILayout.Space(20f);
		GUILayout.Label("This is the layer your UI will reside on");
		GUILayout.EndHorizontal();

		GUILayout.BeginHorizontal();
		camType = (CameraType)EditorGUILayout.EnumPopup("Camera", camType, GUILayout.Width(200f));
		GUILayout.Space(20f);
		GUILayout.Label("Should this UI have a camera?");
		GUILayout.EndHorizontal();

		NGUIEditorTools.DrawSeparator();
		GUILayout.BeginHorizontal();
		EditorGUILayout.PrefixLabel("When ready,");
		bool create = GUILayout.Button("Create Your UI", GUILayout.Width(120f));
		GUILayout.EndHorizontal();

		if (create) CreateNewUI(camType);

		EditorGUILayout.HelpBox("This tool has become obsolete with NGUI 3.0.6. You can create UIs from the NGUI -> Create menu.", MessageType.Warning);
	}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:33,代码来源:UICreateNewUIWizard.cs


示例7: ThermoCam

 public ThermoCam(SerializationInfo info, StreamingContext ctxt)
 {
     this._name          = (string)          info.GetValue("Nombre"   , typeof(string));
     this._address       = (string)          info.GetValue("Address"  , typeof(string));
     this._camType       = (CameraType)      info.GetValue("CamType"  , typeof(CameraType));
     this._devType       = (DeviceType)      info.GetValue("DevType"  , typeof(DeviceType));
     this._interfaceType = (InterfaceType)   info.GetValue("InterType", typeof(InterfaceType));
     this.SubZonas       = (List<SubZona>)   info.GetValue("SubZonas" , typeof(List<SubZona>));
 }
开发者ID:daiiniel,项目名称:ThermoCamApp,代码行数:9,代码来源:ThermoCam.cs


示例8: CreateCamera

 public static ICamera CreateCamera(Game game, CameraType cameraType)
 {
     switch (cameraType)
     {
         case CameraType.FlightCamera: return new BasicCamera(game);
         case CameraType.FreeLookCamera: return new FreeLookCamera(game);
         default: throw new Exception();
     }
 }
开发者ID:sp-alex-osou,项目名称:Shaders,代码行数:9,代码来源:CameraFactory.cs


示例9: CameraManager

 public CameraManager(GameScreen parent, CameraType cameraType, CameraSettings settings)
     : base(parent)
 {
     Settings = settings;
     Engine.Services.RegisterService(typeof(CameraManager), this);
     Viewport = Engine.GraphicsDevice.Viewport;
     Input = (Input)Engine.Services.GetService(typeof(Input));
     SetCamera(cameraType);
 }
开发者ID:jwoschitz,项目名称:Lava,代码行数:9,代码来源:CameraManager.cs


示例10: Get

 public static ICamera Get(CameraType type)
 {
     switch (type)
     {
         case CameraType.Usb: return new UsbCamera(); //If using webcam
         case CameraType.Ip: return new IpCamera(); //If using D-LINK DCS930 or DCS932
         default: throw new ArgumentNullException("Camera Type not supported. Set Camera Type in Settings.");
     }
 }
开发者ID:jadeiceman,项目名称:securitysystem-1,代码行数:9,代码来源:CameraFactory.cs


示例11: XNAKinectCatalogCamera

        public XNAKinectCatalogCamera(Game1 game, CameraType type)
            : base(game)
        {
            _gameInstance = game;

            // Subscribe this as a game service to be accesible from the entire application
            game.Services.AddService(typeof(XNAKinectCatalogCamera), this);

            _cameraType = type;
        }
开发者ID:ragnarokrose,项目名称:XNASandbox,代码行数:10,代码来源:XNAKinectCatalogCamera.cs


示例12: CameraCheckingTouch

 void CameraCheckingTouch()
 {
     if (Input.touchCount >= 3)
     {
         if (Input.GetTouch(2).phase == TouchPhase.Ended)
         {
             camtype = (CameraType)(((int)camtype + 1) % 3);
             CameraSwitch();
         }
     }
 }
开发者ID:CrossTyreck,项目名称:MJNAir,代码行数:11,代码来源:Main.cs


示例13: GetCameraSettings

        /// <summary>
        /// Gets the settings for the <paramref name="cameraType"/> specified.
        /// </summary>
        /// <param name="cameraType">Type of the camera to get settings for.</param>
        /// <returns>Settings for the <paramref name="cameraType" /> specified.</returns>
        public ICameraSettings GetCameraSettings(CameraType cameraType)
        {
            lock (this.cameraSettingsMap)
            {
                if (!this.cameraSettingsMap.ContainsKey(cameraType))
                {
                    this.cameraSettingsMap[cameraType] = new CameraSettings(cameraType);
                }

                return this.cameraSettingsMap[cameraType];
            }
        }
开发者ID:trilok567,项目名称:Windows-Phone,代码行数:17,代码来源:SettingsProvider.cs


示例14: SetCameraType

 public void SetCameraType(CameraType type, bool animated = false)
 {
     switch (type)
     {
     case CameraType.FirstPerson:
         SetFirstPersonCamera(animated);
         break;
     case CameraType.ThirdPerson:
         SetThirdPersonCamera(animated);
         break;
     }
 }
开发者ID:silantzis,项目名称:blockotron,代码行数:12,代码来源:CameraController.cs


示例15: CameraCheckingPC

 void CameraCheckingPC()
 {
     if (Input.GetKeyDown(KeyCode.RightArrow))
     {
         camtype = (CameraType)(((int)camtype + 1) % 3);
         CameraSwitch();
     }
     if (Input.GetKeyDown(KeyCode.LeftArrow))
     {
         camtype = ((camtype - 1) < 0 ? camtype = CameraType.Copter : camtype--);
         CameraSwitch();
     }
 }
开发者ID:CrossTyreck,项目名称:MJNAir,代码行数:13,代码来源:Main.cs


示例16: SwitchCameraTo

 public void SwitchCameraTo(CameraType cam)
 {
     for(int i = 0; i < (int)CameraType.size; i++)
     {
         if( i == (int)cam)
         {
             cameras[i].GetComponent<Camera>().enabled = true;
         } else
         {
             cameras[i].GetComponent<Camera>().enabled = false;
         }
     }
 }
开发者ID:g-zhang,项目名称:Metal-Gear-VR,代码行数:13,代码来源:CameraController.cs


示例17: LoadShooter

 void LoadShooter(CameraType type)
 {
     primaryShooter = new CameraShooter(type);
     primaryCapture.Children.Add(primaryShooter);
     Canvas.SetLeft(primaryShooter, 5);
     Canvas.SetTop(primaryShooter, 5);
     primaryShooter.InitWidth = 600;
     primaryShooter.InitHeight = 0.75 * primaryShooter.InitWidth;
     primaryShooter.ListenTap();
     primaryShooter.Captured += primaryShooter_Captured;
     primaryShooter.Initialized += primaryShooter_Initialized;
     primaryShooter.Start();
 }
开发者ID:fstn,项目名称:WindowsPhoneApps,代码行数:13,代码来源:MainPage.xaml.cs


示例18: Camera

        public Camera(Point3D offset, Size resolution, Rectangle drawLocation, CameraType cameraStyle)
        {
            this.Offset = offset;

            this.CameraScreen = new Bitmap(resolution.Width, resolution.Height);

            this.DrawLocation = drawLocation;

            this.StartZDraw = 0;
            this.EndZDraw = 20;

            this.CameraStyle = cameraStyle;

            this.ShowBackground = true;
        }
开发者ID:anlugifa,项目名称:GameEngine,代码行数:15,代码来源:Camera.cs


示例19: NxCamera

 public NxCamera(Viewport v,Vector3 pos,Vector3 target,CameraType t)
 {
     mTgt = target;
     mPos = pos;
     mType = t;
     mType = CameraType.Targeted;
     mFov = 45;
     mClipNear = 1;
     mClipFar = 20000;
     mProjection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians( mFov),
         v.AspectRatio, mClipNear, mClipFar);
     if (mType == CameraType.Targeted)
         mView = Matrix.CreateLookAt(mPos, mTgt, Vector3.Up);
     else
         mView = Matrix.CreateTranslation(pos);
 }
开发者ID:NexusEast,项目名称:SonicB34T5,代码行数:16,代码来源:NxCamera.cs


示例20: GetCameraTransformByOrientation

        public static CompositeTransform GetCameraTransformByOrientation(CameraType cameraType, PageOrientation orientation)
        {
            var scaleX = 1;
            var scaleY = 1;
            var rotation = 0;

            if (cameraType == CameraType.FrontFacing)
            {
                scaleX = -1;
                if (orientation == PageOrientation.LandscapeRight)
                {
                    rotation = 180;
                }
                else if (orientation == PageOrientation.LandscapeLeft)
                {
                }
                else if (orientation == PageOrientation.PortraitUp)
                {
                    rotation = 90;
                }
            }
            else
            {
                if (orientation == PageOrientation.LandscapeRight)
                {
                    scaleX = -1;
                    scaleY = -1;
                }
                else if (orientation == PageOrientation.LandscapeLeft)
                {
                    // all good
                }
                else if (orientation == PageOrientation.PortraitUp)
                {
                    rotation = 90;
                }
            }

            return new CompositeTransform
            {
                CenterX = 0.5, 
                CenterY = 0.5, 
                ScaleX = scaleX, 
                ScaleY = scaleY, 
                Rotation = rotation 
            };
        }
开发者ID:radu-ungureanu,项目名称:Grimacizer,代码行数:47,代码来源:Helpers.cs



注:本文中的CameraType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CamlQuery类代码示例发布时间:2022-05-24
下一篇:
C# CameraState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap