분류 전체보기 119

12_Normal [1/2]

11_Terrain 만든 지형에다가 법선 벡터라는걸 찍어 볼려고 함 Terrain.cpp, h (수정) 더보기 DebugLine.cpp, h 더보기 #include "Framework.h" #include "DebugLine.h" DebugLine* DebugLine::instance = NULL; void DebugLine::Create() { assert(instance == NULL); //이미 만들어지면 터짐 instance = new DebugLine(); } void DebugLine::Delete() { SafeDelete(instance); } DebugLine * DebugLine::Get() { assert(instance != NULL); return instance; } void D..

World 응용

중요핵심 1. 여러개 상자 만들기 2. Random으로 이용해서 크기, 위치 지정 -> D3DXMatrixScaling, D3DXMatrixTranslation 3. index용 ImGui 만들고 해당 인덱스 조종 및 크기 조종 4. 특정키 누르면 모든 네모들 회전 ->D3DXMatrixRotation CPP 더보기 #include "stdafx.h" #include "WorldDemo.h" void WorldDemo::Initialize() { shader = new Shader(L"04_World.fxo"); { vertices[0].Position = Vector3(-0.5f, -0.5f, +0.0f); vertices[1].Position = Vector3(-0.5f, +0.5f, +0.0f); ..

DirectX/응용 2021.06.29

STRIP 이용한 원 그려보기

중요 핵심 1. Cos, Sin 이용해서 그려줘야함 2. 현재 화면비율은 World 셋팅이 아니므로 창크기 값 가져와서 값을 넣어줘야함 3. 정점이 많으면 많을 수록 원에 가까워짐 cpp 더보기 #include "stdafx.h" #include "VertexLine2Demo.h" void VertexLine2Demo::Initialize() { shader = new Shader(L"02_Pass.fx"); //화면 비율에 맞는 원그리기 float RadioX = 300.0f / D3D::GetDesc().Width; float RadioY = 300.0f / D3D::GetDesc().Height; //0 ~ 19 까지 돌림 for (int i = 0; i < 20; i++) { //cos, sin은..

DirectX/응용 2021.06.29