杨帆博客

你想开发游戏还是改变世界?


  • 首页

  • 标签

  • 归档

  • 搜索

Custom-Sort-String

发表于 2018-03-02 | 更新于: 2018-08-22

题目地址

LeetCode#791 Custom Sort String

题目描述

  S and T are strings composed of lowercase letters. In S, no letter occurs more than once.

  S was sorted in some custom order previously. We want to permute the characters of T so that they match the order that S was sorted. More specifically, if x occurs before y in S, then x should occur before y in the returned string.

  Return any permutation of T (as a string) that satisfies this property.

阅读全文 »

【OpenGL】FPS模拟-1

发表于 2018-03-01 | 更新于: 2018-08-22

  在学习了OpenGL最初步的一些内容,包括三维图形,摄像机,鼠标键盘操作后,不由得有了拿这些东西做个小练习的想法。之后又是自然而然的想到了小时候就开始玩的FPS游戏,FPS(First Person Shooter第一人称射击游戏)是可以对之前学到的东西进行综合利用的练习项目。

阅读全文 »

Rotated-Digits【好久没写代码了】

发表于 2018-03-01 | 更新于: 2018-08-22

题目地址

LeetCode#788 Rotated Digits

题目描述

  X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. A number is valid if each digit remains a digit after rotation. 0, 1, and 8 rotate to themselves; 2 and 5 rotate to each other; 6 and 9 rotate to each other, and the rest of the numbers do not rotate to any other number.

阅读全文 »

【OpenGL】11-光照

发表于 2018-02-21 | 更新于: 2018-08-22

参考教程

【中文版】基础光照

【英文版】Basic Lighting

学习心得

  终于是开始接触一些较为复杂的东西了,这篇主要是讲解光照实现的原理(漫反射光和镜面光)以及他们的计算方式。

阅读全文 »

【OpenGL】10-摄像机

发表于 2018-02-20 | 更新于: 2018-08-22

参考教程

【中文版】摄像机

【英文版】Camera

学习心得

  在开始这一篇之前,我们需要清楚OpenGL中的坐标系规则,OpenGL采用右手坐标系,即伸出右手,让大拇指指向右方,食指向上,剩下手指弯曲90度指向自己,这即是X,Y,Z三轴。

阅读全文 »
1…313233…46
KsGin

KsGin

游戏程序员/计算机图形学/Unity/西山居搬砖

226 日志
16 标签
GitHub E-Mail Google Twitter
© 2018 KsGin @ 2018
0%