목록공부/3D강의 (101)
응애맘마조
다익스트라 알고리즘에 대해서 강의했습니다. 그래픽적으로 표현하지 않고 먼저 콘솔창으로 시작해서 나중에 그래픽으로 나타낸다고 했습니다. #include #include #include #include #include using namespace std; class DiNode { friend class Di; private: string id; bool find; string prev; unordered_map linkedList; // key cost public: int cost; //현재까지 비용 DiNode(string id) { this->id = id; } void Print() { cout cost > b->cost; } }; class Di { //중복없는 키, 임의..
매달 셋째 주 월요일은 학원이 쉬는 날이라 강의가 없었습니다. 오늘은 맵 위에 다른 맵 이미지가 보이도록 하는 강의를 했었고 동시에 과제였습니다. #pragma once struct Brush { intshape = 0; inttexture = 1; int type = 0; float range = 10.0f; floatYScale = 3.0f; }; class Main : public Scene { private: Camera* Cam; Actor* Grid; Terrain* terrain; Actor*mousePoint; intbrushIdx; Brushbrush[3]; booltextureBrush = false; public: Main(); ~Main(); virtual void Init() ov..
오늘은 브러시에 대해 강의했습니다. 맵 에디터를 할 때 어떤 모양으로 편집을 할 것인지 자유롭게 만들 수 있습니다. 이번 게시글에는 과제가 포함되어 있습니다. #pragma once struct Brush { intshape = 0; inttexture = 0; int type = 0; float range = 10.0f; floatYScale = 3.0f; }; class Main : public Scene { private: Camera* Cam; Actor* Grid; Terrain* terrain; Actor* mousePoint; intbrushIdx; Brushbrush[3]; public: Main(); ~Main(); virtual void Init() override; virtual vo..
어제 터레인을 다 끝내지 못했는데 오늘 끝낼 수 있게 되었습니다. #pragma once class Terrain : public Actor { struct InputDesc { UINT index; Vector3 v0, v1, v2; }; struct OutputDesc { int picked; float u, v, distance; }; struct RayDesc { Vector3 position; float size; Vector3 direction; float padding; }; static ID3D11ComputeShader* computeShader; public: static voidCreateStaticMember(); static voidDeleteStaticMember(); stati..
그동안 맵을 로드하고 노멀을 넣고 캐릭터가 움직이는 것들은 해왔지만 터레인에 대하여 맵을 에디트하고 수정하는 것들은 하나도 하지 않아서 오늘부터 들어가서 강의했습니다. 어제 과제로 조사한 컴퓨트 셰이더와 관련이 있습니다. 컴퓨트 셰이더에 관련된 게시글은 https://keisukeaso.tistory.com/222 여기를 참고해 주시면 됩니다. //읽기용 struct InputDesc { uint index; float3 v0; float3 v1; float3 v2; }; StructuredBuffer input; //srv //읽기 쓰기용 struct OutputDesc { int picked; float u; float v; float distance; }; RWStructuredBuffer outp..