本文整理汇总了C#中CameraType类的典型用法代码示例。如果您正苦于以下问题:C# CameraType类的具体用法?C# CameraType怎么用?C# CameraType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CameraType类属于命名空间,在下文中一共展示了CameraType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
}
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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>));
}
示例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();
}
}
示例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);
}
示例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.");
}
}
示例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;
}
示例12: CameraCheckingTouch
void CameraCheckingTouch()
{
if (Input.touchCount >= 3)
{
if (Input.GetTouch(2).phase == TouchPhase.Ended)
{
camtype = (CameraType)(((int)camtype + 1) % 3);
CameraSwitch();
}
}
}
示例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];
}
}
示例14: SetCameraType
public void SetCameraType(CameraType type, bool animated = false)
{
switch (type)
{
case CameraType.FirstPerson:
SetFirstPersonCamera(animated);
break;
case CameraType.ThirdPerson:
SetThirdPersonCamera(animated);
break;
}
}
示例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();
}
}