00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 using System;
00018 using System.Collections.Generic;
00019 using System.Text;
00020 using Microsoft.DirectX;
00021 using Microsoft.DirectX.Direct3D;
00022 using Microsoft.Samples.DirectX.UtilityToolkit;
00023 using System.Drawing;
00024
00025 namespace DXGfxLib
00026 {
00032 public class Cursor : MeshObject
00033 {
00034 public Cursor()
00035 {
00036 if (DXGfxManager.GetGlobalInstance().d3dDevice == null)
00037 {
00038 throw new NullReferenceException("DXGfxManager device not initialized!");
00039 }
00040
00041 Init();
00042 }
00043
00044 public void Init()
00045 {
00046 Init(1.0f);
00047 }
00048
00049 public void Init(float size)
00050 {
00051 Mesh box = Mesh.Box(DXGfxManager.GetGlobalInstance().d3dDevice, size, size, size);
00052 Attach(box);
00053
00054 drawBoundingBox = true;
00055 }
00056
00057 public Cursor(float size)
00058 {
00059 if (DXGfxManager.GetGlobalInstance().d3dDevice == null)
00060 {
00061 throw new NullReferenceException("DXGfxManager device not initialized!");
00062 }
00063
00064 Init(size);
00065 }
00066
00067 public override void GetPrepared()
00068 {
00069 Init();
00070 }
00071
00072 public override void Draw(Device device)
00073 {
00074 base.Draw(device);
00075 }
00076
00077 public override void LoadFromFile(Device d3ddevice, string fileName)
00078 {
00079
00080 }
00081 }
00082 }