自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(49)
  • 收藏
  • 关注

原创 游戏开发笔记

游戏开发相关笔记

2023-03-04 09:01:00 117

原创 计算机图形学 向量与线性代数

计算机图形学初学笔记,源课程是Games101,

2022-07-16 10:00:08 292

原创 UE4光照基础

UE4光照基础来源:UE4官方入门教学UE4 光照基础概念和效果1. 场景光设置灯光可以在编辑窗口的上方调节,为Lit,Unlit为无光照2. 常见的四种光源Directional Light : 定向光源 (朝一个方向照亮全部)Point Light : 点光源 (类似一个灯泡,从一点发出光源)Spot Light : 聚广源 (类似一个表演时打出的聚光灯)Sky Light : 天空光源 (模拟大气的光源)根据天空盒算出颜色3. 光源相关面板单词介绍通用属性:Intensi

2021-09-09 09:00:21 2459

原创 Lua语言学习记录

Lua编译器SciTE下载和使用直接下载就行。想要在SciTE运行Lua需要三步在菜单栏中,将language设置为Lua保存当前文件,文件名要加后缀.lua直接F5就可以运行了Lua特有的一些语法和规则Lua语言说实话之前没怎么听说过,可以和C++配合着使用,他有些东西和别的语言不一样,在本文记录一下,方便以后查找。在Lua中 有boolean类型,false和nil代表 false, 其他的都代表真(包括0,这里与其他语言不同)type(nil)的类型是string,所以在判断变

2021-06-10 10:16:43 323

原创 游戏框架-行为树与虚拟引擎网络架构

行为树在UE4中,主要采用了行为树作为AI框架。行为树主要分为两种。selector挨个试一试,有一个返回true,就返回true,有点类似于or。Sequence每个都事true,才能返回true,才能算是完成任务。图片来源于《大象无形 虚幻引擎程序设计浅析》Selector终止性只要吃饭返回true,就不继续去吃糠了。优先级selector会有优先级。在本例中,他会优先选择吃饭,没有饭,再选择吃糠。有个返回True,就事True。(OR)类比于or 。Sequence

2021-05-05 09:42:54 255

原创 UE相关英文单词

Particle 颗粒,小东西spawn 引发emitter发射Primitive原始的Component(comp) 组成Collision 碰撞Simulating 模拟Impulse 冲击

2021-05-05 09:27:39 1724

原创 UE4入门

b站UE4教学视频。版本:VS2017 UE4 4.17.2 在VS中安装C++游戏依赖。下载github项目 B站配套UE4项目第一天学习需解决的问题UE4该怎么使用怎么添加一些自己的东西遇到问题记录打开github上他的项目时System.IO.DirectoryNotFoundException:,换引擎版本4.18...

2021-04-28 15:42:40 131

原创 六大原则

单一职责一个类只负责一项职责。如果一个类负责两个职责,应该将其分解为两部分。实例自己做自己的事情。比如 有一个方法run(){在公路上走}如果有飞机。飞机也运行run,就不对了,飞机不在公路上走。所以要分开,彻底分开来。接口隔离B 实现接口的五个方法A 使用接口种的三个方法(123)。C 使用接口种的三个方法(145)。还有另外两个用不到。按照隔离原则。应该把interface拆开成新的interface,就用的那几个就行.看那个AC 把接口拆成 1 23 45 三组。依赖

2021-03-12 20:36:17 93

原创 设计模式总览

当你理解了设计模式,你便理解了面向对象的精髓。恭喜你在变强的路上越走越远。为什么要有设计模式懂了设计模式,可能你就能看懂那些高质量的代码了。代码重用性提高(一个模块是一个模块,不要重复写一个模块)可读性提高(让别人看懂)扩展性提高(添加新的功能比较容易)可靠性!(增加新功能后,对原来的功能没有影响)呈现出高内聚,低耦合。(自己和自己玩,互不打扰)设计模式常有的7大原则有:单一职责原则接口隔离原则依赖倒转原则里氏替换原则开闭原则迪米特法则合成复用原则...

2021-03-12 15:24:47 67

原创 C++ 多态

多态静态多态静态多态:函数重载,运算符重载。动态多态派生类和虚函数实现运行时多态。子类重写父类的虚函数。(virtual)重写:函数返回值类型,函数名,参数列表都相同。与重载不同父类的指针或引用指向子类的对象。virtual 是一个虚函数(表)指针,指向一个虚函数表,表中存函数的地址。纯虚函数当父类中虚函数没什么用的时候。可以把他写成纯虚函数的方法。含纯虚函数的类称为抽象类。virtual void func() =0;抽象类的特点无法实例化对象子类必须重写父类的方法。虚

2021-03-03 16:13:50 127 1

原创 C++三大特征之二:继承

继承是三大特性之一基本语法子类(派生类)可以直接使用父类(基类)的方法。class Java :public BasePage{}继承方式公共继承(不使父类的属性发生改变)保护继承(使父类的属性变成保护的)私有继承(使父类的属性变成私有的)注:父类中的私有属性,哪种继承都不能使用。子类所占空间的大小父类中所有的非静态成员属性都会被子类继承下去。父类的private虽然访问不到,但是继承了下来。class Base{int a;int b;int c;}c

2021-03-02 17:43:26 148

原创 C++ 类和对象(一、封装)

C++面向对象的三大特征为:封装、继承、多态封装类和对象class Circle{public : //属性 int m_r; //行为 double calculateZC(){ return 2*pi*m_r; }}int main(){ Circle c1; c1.m_r =10; cout<< c1.calculateZC();}访问权限public 类内,类外都可以访问protected 类内可以访问,类外不可以访问 儿子可以访问父亲种保护

2021-03-02 16:40:57 186

原创 C++函数相关(函数默认参数,占位参数,函数重载)

函数相关整理函数默认参数注意点一如果某个位置有默认参数,从这个位置往后,从左到右都必须有默认值。int func(int a,int b=20,int c=30){//如果某个位置有默认参数,从这个位置往后,从左到右都必须有默认值。}func(10);func(10,30);注意点二如果声明有默认参数,函数实现就不能有默认参数。错误示例:占位参数作用之后补充函数重载函数名相同,提高复用性(参数不同选不同函数)注:函数重载的时候,慎用默认参数满足条件同一作用域下函

2021-02-26 19:14:44 84

原创 C++基础知识 引用

引用指针常量 int *const ref = &a;(编译器帮做了)int &ref =a ;别名的使用int a =10 ;int &b =a;b=100;别名也可以修改原来的数据。二者操作的是同一块内存。注意事项引用要初始化int &b;是错的。引用初始化后不可更改。初始化后不能改变了。比如 int &b =a; ,后想把b改成c的别名不行。别名的使用swap (int sa&,int sb&){int temp =

2021-02-25 21:50:54 97

原创 卷积神经网络入门

卷积神经网络入门卷积神经网络日常应用图片分类,如猫狗分类等目标识别 (无人驾驶汽车识别)风格迁移旧神经网络缺点图片尺寸过大,所需维度太高。名词解释convolution 卷积edge detection 边缘检测filter 滤波器边缘检测使用垂直滤波器(vertical filter),和水平滤波器(horizontal filter)对原图处理得到边缘图片。填充 padding卷积边缘有可能卷积不到,加边缘可以把周围也卷积到。n+2p-f+1 = n可以使输入输

2021-02-03 21:12:29 153

原创 1088 Rational Arithmetic (20分) 最大公约数 字符串处理 纯C++

1088 Rational Arithmetic (20分)For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contains one test case, which gives in one lin

2020-07-22 21:13:52 97

原创 1090 Highest Price in Supply Chain (25分) 零售商分级

1090 Highest Price in Supply Chain (25分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on the chain buys pro

2020-07-22 21:09:44 163 1

原创 1089 Insert or Merge (25分)归并排序还是插入排序

1089 Insert or Merge (25分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the location it belongs

2020-07-22 21:01:45 109

原创 1032 Sharing (25分)链表查询公共部分

1032 Sharing (25分)To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example, loading and being are stored as show

2020-07-18 17:44:26 106

原创 1031 Hello World for U (20分) 测试点5错误的坑

1031 Hello World for U (20分)Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed in the original order, star

2020-07-17 17:40:19 359

原创 1030 Travel Plan (30分) 找最短路径 DFS

1030 Travel Plan (30分)A traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest path between his/her starting city and

2020-07-17 16:59:07 116

原创 1029 Median (25分) 排序

1029 Median (25分)Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the median of S2 = { 9, 10, 15, 16, 17 } is 15. The median of two sequences is de

2020-07-17 16:31:19 131

原创 1028 List Sorting (25分)

1028 List Sorting (25分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two integers N (≤10​5​​) and C, whe

2020-07-17 16:20:46 78

原创 1027 Colors in Mars (20分) 进制转换

1027 Colors in Mars (20分)People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2

2020-07-17 16:04:52 68

原创 1026 Table Tennis (30分) 桌球排队带VIP的

1026 Table Tennis (30分)A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the available table with the smallest n

2020-07-17 15:42:22 169

原创 1025 PAT Ranking (25分) PAT排名排序

1025 PAT Ranking (25分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists will be merged immediately after t

2020-07-17 08:30:25 189 1

原创 1024 Palindromic Number (25分) 回文数,字符串加法

1024 Palindromic Number (25分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.Non-palindromic numbers

2020-07-17 07:12:53 96

原创 1023 Have Fun with Numbers (20分) 字符串加法

1023 Have Fun with Numbers (20分)Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the num

2020-07-16 23:30:07 79

原创 1022 Digital Library (30分) 字符串处理

1022 Digital Library (30分)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any query fro

2020-07-16 22:27:36 102

原创 1021 Deepest Root (25分)最深树选根节点DFS

1021 Deepest Root (25分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the deepest root.Inpu

2020-07-16 21:25:26 136

原创 1020 Tree Traversals (25分)二叉树的遍历以及层次输出

1020 Tree Traversals (25分)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binary tree.Input

2020-07-15 16:34:07 94

原创 1019 General Palindromic Number (20分) 回文数字符串翻转 测试2和4有点坑

1019 General Palindromic Number (20分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.Although palindr

2020-07-15 10:22:44 113

原创 1017 Queueing at Bank (25分)银行排队

1017 Queueing at Bank (25分)Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn

2020-07-14 10:22:40 186

原创 1016 Phone Bills (25分)电话账单

1016 Phone Bills (25分)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a lo

2020-07-14 08:53:29 195

原创 1015 Reversible Primes (20分) 素数转换

1015 Reversible Primes (20分)A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two posi

2020-07-13 19:17:47 129

原创 1014 Waiting in Line (30分) 队列,银行排队

1014 Waiting in Line (30分)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space inside the yellow line in fro

2020-07-13 17:51:04 256 1

原创 1013 Battle Over Cities (25分)最大连通子图数量

1013 Battle Over Cities (25分)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other high

2020-07-12 15:32:23 199

原创 1012 The Best Rank (25分) 使用sort排序实现排名

1012 The Best Rank (25分)To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we enco

2020-07-12 09:01:30 201

原创 1011 World Cup Betting (20分) 足球猜球

1011 World Cup Betting (20分)With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting f

2020-07-11 21:01:40 119

原创 1009 Product of Polynomials (25分) 多项式乘法

1009 Product of Polynomials (25分)This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:K N

2020-07-11 18:47:30 116

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除