Problem Statement Hero has just constructed a very specific graph. He started with n isolated vertices, labeled 0 through n-1. For each vertex i Hero ...
分类:
其他好文 时间:
2016-06-01 22:50:56
阅读次数:
251
1,基础知识讲解 一个物体在自然界会收到三种光的影响,周围的环境光、漫反射和镜面反射。那么对于计算机要想模拟现实中的光照,就应该也会实现这三种基本光照->环境光、漫反射、镜面高光。对于这三种光照,都存在着一定的影响因素,这就需要去追究其光照模型的公式了。 (1),环境光强影响因素 ,由此可看出环境光 ...
分类:
其他好文 时间:
2016-05-31 23:50:26
阅读次数:
213
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique i ...
分类:
其他好文 时间:
2016-05-26 13:08:23
阅读次数:
191
Halum You are given a directed graph G(V, E) with a set of vertices and edges. Each edge (i, j) that connects some vertex i to vertex j has an integer ...
分类:
其他好文 时间:
2016-05-24 20:43:20
阅读次数:
207
上一篇我们谈到了,当应用程序恢复时,由于FragmentPagerAdapter对Fragment进行了缓存的读取,导致其并未使用在Activity中新创建的Fragment实例。今天我们来看如何解决这种情况。 根据上篇Blog的描述,我们不难发现,目前需要解决的问题有以下两个: 1. 缓存Frag ...
分类:
移动开发 时间:
2016-05-24 18:48:36
阅读次数:
204
为了简化这些问题,OpenGL提供了一种机制来减少处理坐标信息的函数调用数量。使用顶点数组(vertex array ),可以利用很少的函数调用来安排场景的描述信息。步骤如下:
1.引用函数glEnableClientState (GL_VERTEX_ARRAY)激活OpenGL的顶点数组特性。
2.使用函数glVertexPointer指定顶点坐标的位置和数据格式。
3.使用子程序如glDrawElements显示场景,该子程序可处理多个图元而仅需少量的函数调用。...
分类:
编程语言 时间:
2016-05-22 12:20:54
阅读次数:
210
polygon_vertex=[5,-7,4,2]polygon_side=['+','+','*','*'] multi_list = [[[0 for col in range(5)] for row in range(5)] for i in range(5)] def get_min_of_ ...
分类:
其他好文 时间:
2016-05-17 19:12:18
阅读次数:
146
一次只有一个vertex shader是活跃的。你可以有多个vertex shader,如果一个物体特殊的变换或者灯光,你可以选择合适的vertex shader来完成这个任务。 你可能想使用vertex shaders在每个物体或每个网格上,例如,十个网格,你可以使用十个不同的vertex sha ...
分类:
其他好文 时间:
2016-05-13 09:59:01
阅读次数:
192
Vertex shader Architecture: 所有在vertex shader中的数据都用128-bit的quad-floats表示(4x32-bit)。 vertex shader线性地执行程序——一个指令(introduction)一个指令地执行。它不允许循环、跳跃、条件分支。在Dir ...
分类:
其他好文 时间:
2016-05-13 08:51:30
阅读次数:
147
一、Fragment对象
(1)Fragment 是什么
1)Activity中的模块化对象。
2)Android3.0中的一个新特性。
(2)Fragment
应用场合(when,why)
1)适配各种屏幕尺寸.
2)对界面中的UI内容进行模块化.
例如:
1)radiogroup+fragment+viewpager 实现底部菜单
2)actionBar(tab)+frag...
分类:
其他好文 时间:
2016-05-13 04:29:06
阅读次数:
157