
C++
Leung_1010
追寻小星星
展开
-
计算机图形学-动画与仿真课程
CS 348C: Computer Graphics: Animation and SimulationStanford University, Fall 2017Description: Core mathematics and methods for computer animation and motion simulation. Traditional animation techniques. Physics-based simulation methods for modeling shap原创 2021-06-24 16:47:46 · 464 阅读 · 0 评论 -
C++关于函数参数(数组,矩阵)的传递与调用
C++ 从函数返回数组添加链接描述C++ 传递数组给函数添加链接描述原创 2021-06-22 09:34:07 · 1683 阅读 · 0 评论 -
点与三角形的碰撞检测
算法描述,参考链接:[https://blackpawn.com/texts/pointinpoly/default.html]代码实现,C++:// Is the point within the face?// Adapted from http://www.blackpawn.com/texts/pointinpoly/default.htmlbool is_inside(const Vec2& point, const Face* f) { Vec3 bary = get_原创 2021-06-02 10:26:53 · 461 阅读 · 0 评论 -
C++学习--面向对象编程-类
class Role{private: int a;//成员变量 //成员函数 void Init() { hh=3; } public: int b;//成员变量 int c;//成员变量 //成员函数 void Initaa(role& r) { r.b-=c; }}int main(){ ...}----------------------------------------------------//将成员函数写在class外面cla原创 2021-05-05 09:45:45 · 202 阅读 · 0 评论 -
实时碰撞检测-质心坐标、Voronoi域、Minkrski-chapter3
=== Section 3.4: ===============================================================// Compute barycentric coordinates (u, v, w) for // point p with respect to triangle (a, b, c)void Barycentric(Point a, Point b, Point c, Point p, float &u, float &原创 2021-04-28 20:29:31 · 329 阅读 · 0 评论 -
C++学习-函数
函数可将代码模块化,便于阅读维护,方便分工(架构能力),减少重复。返回类型 函数名称(参数,参数...){ 函数的功能区 return 返回值}函数参数:指针参数举例#include <iostream>int add(int* x, int* y){ (*x)*= 100; (*y)*= 10; return *x + *y;}void printresult(int x){ std::cout << x <&原创 2021-04-24 09:51:59 · 140 阅读 · 0 评论 -
C++学习-字符串
C++中的一个类std::string,面向对象编程的思想#include<string>using std::string;int main(){ string str{"..."} //截取字符串 string{"hello",2,3}//开头是0 //声明6个a string str{6,'a'} //字符串相加 ls = "123"; str = ls + "456"; //将任意类型转换为字符串 std::to_string("...")}.原创 2021-04-13 20:52:01 · 71 阅读 · 0 评论