1.概述 Unity自带cube模型,但是此文实现,分基础版和完善版。基础版不进行顶点法线计算,完善版会进行法线计算,结果会跟自带cube比较接近。 2.基础版Cube 2.1 基类 using System.Collections; using System.Collections.Generic ...
分类:
其他好文 时间:
2020-02-02 21:37:34
阅读次数:
67
1.定义:priority_queue<Type, Container, Functional>Type 就是数据类型Container 就是容器类型(Container必须是用数组实现的容器,比如vector,deque等等,但不能用 list。STL里面默认用的是vector),Function ...
分类:
其他好文 时间:
2020-02-02 20:06:54
阅读次数:
102
概述 本文在上一篇平面圆形基础上生成平面环形。 代码 基类 using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(MeshFilter),type ...
分类:
其他好文 时间:
2020-02-02 20:05:43
阅读次数:
147
一: deque 创建双向队列 import collectionsd = collections.deque() 1. append 往右添加一个元素 d.append(1) 2. appendleft 往左边添加一个元素d.appendleft(2) 3. clear 清空队列 4. copyn ...
分类:
其他好文 时间:
2020-02-02 20:05:30
阅读次数:
67
概述 由于基础篇已经比较详细,此篇只贴代码。 平面圆形代码 圆形也是由三角形组成的,三角形个数越多则越园。 基类 using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireCompon ...
分类:
其他好文 时间:
2020-02-02 19:48:50
阅读次数:
99
概述 本文用来实现一个平面plane,其与四顶点的四边形mesh相比,网格变多。 Mesh代码 基类 using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(ty ...
分类:
其他好文 时间:
2020-02-02 19:18:33
阅读次数:
84
在Unity Editor中Create C# script后,会自动生成初始化脚本: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 5 public class Scri ...
分类:
编程语言 时间:
2020-02-02 13:55:22
阅读次数:
115
1 class Solution: 2 def kWeakestRows(self, mat: 'List[List[int]]', k: int) -> 'List[int]': 3 m = len(mat) 4 n = len(mat[0]) 5 counter = [0] * m 6 for ...
分类:
其他好文 时间:
2020-02-02 13:41:04
阅读次数:
61
分布式数据集 编辑 Spark围绕的核心概念,是弹性分布式数据集(RDD),一个有容错机制,可以被并行操作的集合。目前有两种类型的RDD: 并行集合(Parrallelized Collections),接收一个已经存在的Scala集合,在它上面运行各种并发计算; Hadoop数据集(Hadoop ...
分类:
其他好文 时间:
2020-02-01 23:17:16
阅读次数:
80
之前学习的客户端当然可以实现基本的功能,只是会出现卡顿的现象,用户的体验并不是很好,我们现在用异步实现这样的功能 具体完整的代码: using System.Collections; using System.Collections.Generic; using UnityEngine; using ...
分类:
其他好文 时间:
2020-02-01 21:03:37
阅读次数:
63