现在将重新制定一个camera摄像机。可以自由移动。
比如前进 后退,上游 下潜。 各个方向渲染之类的。
首先设置按键。
这个时候需要在
XWindow.h 里面
bool XWindow::frame()
{
//判断是否按下ESC键
if(x_input->isKeyDown(VK_ESCAPE))
return false;
//如果A,S,D,W,Q,E,Z,X,C键按...
分类:
移动开发 时间:
2014-10-09 02:36:17
阅读次数:
271
用oncontextmenu事件单禁用右键菜单onconTextmenu=window.event.returnValue=false;右键菜单禁用,用这个能够禁止复制。在中增加属性代码:oncontextmenu="return false" onselectstart="return false...
分类:
其他好文 时间:
2014-10-09 01:44:27
阅读次数:
162
JS代码如下:/*** 模仿android里面的Toast效果,主要是用于在不打断程序正常执行的情况下显示提示数据* @param config* @return*/var Toast = function(config){this.context = config.context==null?$(...
分类:
移动开发 时间:
2014-10-09 01:41:17
阅读次数:
409
/** * 判断是否为整数 * * @param str 传入的字符串 * @return 是整数返回true,否则返回false */ public static boolean isInteger(String str) { ...
分类:
编程语言 时间:
2014-10-09 01:12:07
阅读次数:
231
很久没练只能看别人代码了 1 class Solution { 2 public: 3 int maxProduct(int A[], int n) { 4 if (n == 0) return 0; 5 int curMax, curMin, ans; 6 ...
分类:
其他好文 时间:
2014-10-09 00:48:07
阅读次数:
218
题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your al...
分类:
其他好文 时间:
2014-10-09 00:31:07
阅读次数:
234
LeetCode 1 class Solution: 2 # @return a string 3 def countAndSay(self, n): 4 if n==1: 5 return "1" 6 else: 7 ...
分类:
其他好文 时间:
2014-10-09 00:28:07
阅读次数:
176
IOS7 点击空白处隐藏键盘的几种方法IOS开发中经常要用到输入框,默认情况下点击输入框就会弹出键盘,但是必须要实现输入框return的委托方法才能取消键盘的显示,对于用户体验来说很不友好,我们可以实现点击键盘以外的空白区域来将键盘隐藏,以下我总结出了几种隐藏键盘的方法:首先说明两种可以让键盘隐藏的...
分类:
移动开发 时间:
2014-10-08 23:31:57
阅读次数:
341
#include
using namespace std;
//不安全的内存拷贝(当源内存地址与目标内存地址重叠时会产生错误)
void h_memcpy(char*src,char *dst,intsize){
if (src == NULL|| dst == NULL) {
return;
}...
分类:
其他好文 时间:
2014-10-08 18:20:05
阅读次数:
169
【代码】
#include
#include
using namespace std;
typedef struct Node{
char key;
struct Node *lchild, *rchild;
}*Tree, TNode;
void PreOrder(Tree T) //先序遍历
{
if (T == NULL)
return;
TNode *curr = T...
分类:
其他好文 时间:
2014-10-08 17:35:05
阅读次数:
199