02 2013 档案
3D max中选择和管理对象的方法
摘要:上图是我们在3D max 2012中利用多边形建模工具建立的几个简单的几何模型。 对每个几何模型,选中的方法主要有下面几种:这里我们主要使用下面几个按钮 (1) 利用鼠标在视窗中直接进行选择。 首先,保证菜单中的按钮处于选中的状态。 然后再视图中直接点击要选择的几何图形。选择中可以通过Ctrl和Alt进行增加和减少。 (2)感兴趣区域选择。 可以通过拖动鼠标在屏幕上拉出一个区域... 阅读全文
posted @ 2013-02-27 00:36 GreenLight 阅读(4518) 评论(0) 推荐(0)
数据结构 -- 静态链表
摘要:申请一个数组,其中数组的每个元素由两部分组成。一部分保存数据,另一部分保存链表的下个数据在数组中的角标。 阅读全文
posted @ 2013-02-24 16:42 GreenLight 阅读(141) 评论(0) 推荐(0)
数据结构--单链表
摘要:我们将复习单链表、静态链表、循环链表和双向链表。(1)单链表单链表的数据存放的基本单元是一个Node. 一个Node主要包括数据部分和下一个Node的指针。struct node{ node* next; float data;};初始化整个链表为:void InitList(node* &L, int num){ L = (node*)malloc(sizeof(node)); // allocate the momory for head node L->next = nullptr; node* p,*p0; p0 = L; for(int i... 阅读全文
posted @ 2013-02-24 10:58 GreenLight 阅读(211) 评论(0) 推荐(0)
How to describe the numerical values?
摘要:&Basic mathematics * be equal to = … equal… operator * 1A. … equals A multiplied by B… Momentum equals mass multiplied by velocity. 相乘的表示只能是 A multiplied by B, 不可以 A multiplied B。 1B. multiply ... 阅读全文
posted @ 2013-02-24 01:01 GreenLight 阅读(332) 评论(0) 推荐(0)
程序设计基本概念(4) inline, define,指针和引用
摘要:关于inline的问题 inline相比define可以做参数的类型检查。define只是简单的替换,无验证。 而inline是将代码直接插入到调用处,减少普通函数调用时的资源的消耗,例如: inline int fac(float i) {return i * i}; printf( "bb= %d", fact(8) );关于指针和引用的区别(1)一个引用必须总是指向某些对象。(2... 阅读全文
posted @ 2013-02-23 23:59 GreenLight 阅读(425) 评论(0) 推荐(0)
数据结构---顺序表
摘要:利用一组连续地址的内存单元来存储整张线性表的结构。 具有下列特征: 1. 顺序表的表名唯一。 2. 内存单元连续存储。 3. 数据顺序存放,元素之间有先后关系。 下面的例子中,我们动态的申请一张线性表。 主要定义的方法有 InitSqlist : 初始化list。 DeleteSqlist: 删除list。 InsertElem: 添加元素。当插入元素,表的元素容量大于MAXSI... 阅读全文
posted @ 2013-02-19 23:40 GreenLight 阅读(259) 评论(0) 推荐(0)
Windows编程-基本图元(4)
摘要:绘制圆形 阅读全文
posted @ 2013-02-19 22:51 GreenLight 阅读(144) 评论(0) 推荐(0)
Windows编程-基本图元(3)
摘要:绘制矩形 The Rectangle function draws a rectangle. The rectangle is outlined by using the current pen and filled by using the current brush. BOOL Rectangle( _In_ HDC hdc, _In_ int nLeftRect, _In... 阅读全文
posted @ 2013-02-19 22:49 GreenLight 阅读(234) 评论(0) 推荐(0)
Windows编程-基本图元(2)
摘要:关于线段的绘制 这里我们主要使用两个函数来完成MoveToEx函数和LineTo函数。 MoveToEx The MoveToEx function updates the current position to the specified point and optionally returns the previous position. BOOL MoveToEx( _In_... 阅读全文
posted @ 2013-02-19 21:39 GreenLight 阅读(248) 评论(0) 推荐(0)
程序设计基本概念(3)(sizeof)-2.20 2.23
摘要:(1)关于sizeof()等若干问题。 求出下列sizeof的返回值。 char* float* int* , 都是指针型,所以为4byte。 char s[] = "0123456789", 末尾隐含”\0”,所以为11byte。 char str[100], 为100 byte。 下面的结构体a, 为6byte。 struct a{ short a1; ... 阅读全文
posted @ 2013-02-19 20:54 GreenLight 阅读(337) 评论(0) 推荐(0)
程序设计基本概念(2)-2.19
摘要:1. C和C++区别 C是结构化语言。C++是面向对象的语言。 2. C++中如何调用C编译器编译后的函数。 要在C++中添加extern “C”, 因为C++支持函数重载。编译后的函数的名字中包含参数的类型。C语言不支持函数重载。编译后,直接使用C++无法识别。 3. C++中的#ifndef #define #endif 的作用。 防止头文件被重复引用。 4. 宏定义问题 最小值... 阅读全文
posted @ 2013-02-18 23:59 GreenLight 阅读(182) 评论(0) 推荐(0)
Windows编程-基本图元(1)
摘要:(1)绘制点 利用GDI绘制点的时候不需要画笔和画刷。利用函数SetPixel。 The SetPixel function sets the pixel at the specified coordinates to the specified color. COLORREF SetPixel( _In_ HDC hdc, _In_ int X, _In_ int Y,... 阅读全文
posted @ 2013-02-17 17:37 GreenLight 阅读(229) 评论(0) 推荐(0)
Windows编程-windows GDI基本概念 画笔 画刷
摘要:其中关于windows GDI的描述如下: Purpose The Microsoft Windows graphics device interface (GDI) enables applications to use graphics and formatted text on both the video display and the printer. Windows-based a... 阅读全文
posted @ 2013-02-17 14:23 GreenLight 阅读(2008) 评论(0) 推荐(0)
程序员面试-程序设计基本概念(1)
摘要:赋值操作 1. 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int x = 2, y, z; 7 x*=( y = z = 5); cout << x << endl; // What is the x value ? 8 9 z =3;10 ... 阅读全文
posted @ 2013-02-12 23:59 GreenLight 阅读(223) 评论(0) 推荐(0)
Windows编程-自己发送消息
摘要:这里我们讨论两种消息传递的方法:SendMessage()和PostMessage(); (1)SendMessage Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does ... 阅读全文
posted @ 2013-02-12 23:35 GreenLight 阅读(1546) 评论(0) 推荐(0)
Windows编程-处理鼠标事件
摘要:我们这里仅讨论两个简单的消息: WM_MOUSEMOVE和WM_*BUTTON*。Parameters:wParam Indicates whether various virtual keys are down. This parameter can be one or more of the following values. ValueMeaning MK_CONTROL 0x0008The CTRL key is down.MK_LBUTTON 0x0001 The left mouse button is down.MK_MBUTTON 0x0010 The middle mouse 阅读全文
posted @ 2013-02-12 20:52 GreenLight 阅读(6340) 评论(0) 推荐(0)
Windows编程-处理键盘事件(2)
摘要:关于WM_KEYDOWN的消息中传递的是该键的虚拟扫描码,不是ASCII码。它传递了键被按下时的特征,细节的描述如下:wParamThe virtual-key code of the nonsystem key. See Virtual-Key Codes.lParamThe repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown following.例如,我们实现一个打印输入的virtual code的程序,只 阅读全文
posted @ 2013-02-12 18:36 GreenLight 阅读(478) 评论(0) 推荐(0)
Windows编程-处理键盘事件(1)
摘要:主要有下面三种方式访问键盘的消息:(1) WM_CHAR (2) WM_KEYDOWN 和WM_KEYUP (3) GetAsyncKeyState()。 当键盘上的"A”被按下的时候,会产生两种数据: (1) ASCII (2) Scan Code ,扫描码。其中,ASCII码会区分A和a两种不同的形式。 Scan code不会区别他们。首先,我们介绍WM_CHAR的消息。 可以查看MSDN... 阅读全文
posted @ 2013-02-12 17:01 GreenLight 阅读(3228) 评论(0) 推荐(0)
Windows编程- hdc和hwnd的区别
摘要:hWnd是窗口句柄,其中包含窗口的属性。例如,窗口的大小,显示位置,父窗口。hDC(Handle to Device Context)是图像的设备描述表,窗口显示上下文句柄,其中可以进行图形显示。利用hDC=GetDC(hWnd),可以获得一个窗口的图形设备描述表。可以通过ReleaseDC()函数释放。 下面的例子是获得图形设备表,并在窗口中打印text文本。 执行的结果,如下图。程序不停的执... 阅读全文
posted @ 2013-02-11 23:50 GreenLight 阅读(6488) 评论(0) 推荐(0)