using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestSlerp : MonoBehaviour { public Transform a; public Transform b; void Start() { } bool kaishi = false; float T; void Update() { if (Input.GetKeyDown(KeyCod
这个系列我想用来运用opengl红皮书的前八章节的内容,来打造一个室内小屋. 这一章主要是定义几个基本的结构.并给出球体与立方体的画法,先让我们来定义一些基本的结构.一个是包含点,法向量,纹理贴图向量,二是矩形与圆形的父类,包含一些基本公有的处理. type T2N3V3 = struct val mutable TexCoord : Vector2 val mutable Normal : Vector3 val mutable Position : Vector3 new(v,n,p) =
这几天,在看Unity3D,很有意思,其中看到,第一人称控制器,就想看到里面的一些控制脚本是如何实现,才发现,学到的好多数据知识已经还给老师了,还好,走遍大江南北,跟着的书不多,唯一的二本高数没丢. 然后参考网上各个简洁明了的讲洁. 主要有http://my.csdn.net/cppyin 的从零实现3D图像引擎. 用此文只是用来记录一些向量,矩阵等的操作.没别的实际意义.会与我的学习来更新此文章. 1.求矩阵的逆矩阵. type XMatrix3 = class val m11:float v
读取txt的脚本: public void ReadFileTX(){ var str = File.ReadAllText(Application.streamingAssetsPath + "/position.txt"); Parse(str); foreach(var n in beats_positions){ Debug.Log(n); } } 这个时候对得到的点处理为vector3: public string Parse(string str){ string[] st