资源简介
3D矩形旋转,GDI+,另类的设计,以便不时之需。

代码片段和文件信息
//Visit http://vckicks.110mb.com/ for more free code
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
namespace EulerRotation
{
public partial class Form1 : Form
{
Cube cube;
public Form1()
{
InitializeComponent();
}
private void btnReset_Click(object sender EventArgs e)
{
tX.Value = 0;
tY.Value = 0;
tZ.Value = 0;
render();
}
private void Form1_Load(object sender EventArgs e)
{
cube = new Cube(100);
render();
}
private void render()
{
//Set the rotation values
cube.RotateX = tX.Value;
cube.RotateY = tY.Value;
cube.RotateZ = tZ.Value;
//Cube is positioned based on center
Point origin = new Point(picCube.Width / 2 picCube.Height / 2);
picCube.Image = cube.drawCube(origin);
}
private void tX_Scroll(object sender EventArgs e)
{
render();
}
private void tY_Scroll(object sender EventArgs e)
{
render();
}
private void tZ_Scroll(object sender EventArgs e)
{
render();
}
}
internal class Math3D
{
public class Point3D
{
//The Point3D class is rather simple just keeps track of X Y and Z values
//and being a class it can be adjusted to be comparable
public double X;
public double Y;
public double Z;
public Point3D(int x int y int z)
{
X = x;
Y = y;
Z = z;
}
public Point3D(float x float y float z)
{
X = (double)x;
Y = (double)y;
Z = (double)z;
}
public Point3D(double x double y double z)
{
X = x;
Y = y;
Z = z;
}
public Point3D()
{
}
public override string ToString()
{
return “(“ + X.ToString() + “ “ + Y.ToString() + “ “ + Z.ToString() + “)“;
}
}
public class Camera
{
//For 3D drawing we need a point of perspective thus the Camera
public Point3D Position = new Point3D();
}
public static Point3D RotateX(Point3D point3D double degrees)
{
//Here we use Euler‘s matrix formula for rotating a 3D point x degrees around the x-axis
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3331 2008-01-01 06:49 EulerRotation\EulerRotation.csproj
文件 28672 2008-01-01 06:52 EulerRotation\EulerRotation.exe
文件 15991 2008-01-01 06:52 EulerRotation\Form1.cs
文件 7114 2008-01-01 06:52 EulerRotation\Form1.Designer.cs
文件 5814 2008-01-01 06:52 EulerRotation\Form1.resx
文件 480 2007-12-28 05:57 EulerRotation\Program.cs
目录 0 2008-01-01 06:54 EulerRotation\Properties\
文件 1300 2007-12-28 05:57 EulerRotation\Properties\AssemblyInfo.cs
文件 2854 2007-12-28 05:57 EulerRotation\Properties\Resources.Designer.cs
文件 5350 2007-12-28 05:57 EulerRotation\Properties\Resources.resx
文件 1097 2007-12-28 05:57 EulerRotation\Properties\Settings.Designer.cs
文件 249 2007-12-28 05:57 EulerRotation\Properties\Settings.settings
目录 0 2008-01-01 06:54 EulerRotation\
相关资源
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
评论
共有 条评论