@@ -204,33 +204,35 @@ void CBroom::Free()
|
||||
|
||||
void CBroom::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Broom")) {
|
||||
GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f);
|
||||
GUI::DragFloat("Speed", &m_fSpeed, 0.01f);
|
||||
GUI::DragFloat("Accle", &m_fAccel, 0.01f);
|
||||
GUI::DragFloat("Decel", &m_fDecel, 0.01f);
|
||||
|
||||
GUI::DragFloat("MaxSpeed", &m_fFlyMaxSpeed, 0.01f);
|
||||
GUI::DragFloat("Speed", &m_fSpeed, 0.01f);
|
||||
GUI::DragFloat("Accle", &m_fAccel, 0.01f);
|
||||
GUI::DragFloat("Decel", &m_fDecel, 0.01f);
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex());
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
GUI::Text("AnimIndex %d", m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
|
||||
GUI::DragFloat3("Pos", Pos3);
|
||||
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
|
||||
GUI::DragFloat3("Pos", Pos3);
|
||||
|
||||
|
||||
_float RotR, RotU, RotL;
|
||||
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
|
||||
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
float Rot3[3] = { RotR, RotU,RotL };
|
||||
GUI::DragFloat3("Rot", Rot3);
|
||||
_float RotR, RotU, RotL;
|
||||
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
|
||||
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
float Rot3[3] = { RotR, RotU,RotL };
|
||||
GUI::DragFloat3("Rot", Rot3);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -72,6 +72,17 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
vCompressedDir.normalize();
|
||||
pDynamic->addForce(vCompressedDir * fLength* 1000.f, PSX::PxForceMode::eFORCE);
|
||||
} break;
|
||||
case PXOBJECT::DOOR:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
if (fDot > 0) {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
else {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
{
|
||||
} break;
|
||||
|
||||
@@ -51,7 +51,7 @@ void CCallBack_Troll_HitReport::onShapeHit(const PSX::PxControllerShapeHit& hit)
|
||||
class CUnit* pOwner = (CUnit*)m_pController->Get_Owner();
|
||||
_vector vLook = pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK);
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(XMLoadFloat3((_float3*)&vDir), vLook));
|
||||
if (fDot > cosf(XM_PIDIV4)) {
|
||||
if (fDot > cosf(XM_PIDIV4) && vWorldPos.y >= XMVectorGetY(pOwnerActorData->pCharacter->Get_Position()) - FLT_EPSILON3) {
|
||||
CModel* pModel = pOwner->Get_Component<CModel>();
|
||||
_uint iAnimIndex = pModel->Get_AnimIndex();
|
||||
if (pOwner->Get_AnimInfo(STATEANIM::RUSH_LOOP).first == iAnimIndex) {
|
||||
|
||||
@@ -335,7 +335,7 @@ HRESULT CCamPosition_Shoulder::Ready_SubParts()
|
||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.f);
|
||||
CameraDesc.pFollowTarget = m_pTarget_FollowPart;
|
||||
CameraDesc.pLookTarget = m_pTarget_LookPart;
|
||||
CameraDesc.iPriority = 51;
|
||||
CameraDesc.iPriority = 55;
|
||||
CameraDesc.pCameraKey = CAMERA_SHOULDER;
|
||||
CameraDesc.bEnableTransitionLerp = true;
|
||||
CameraDesc.bEnableFollowLerp = false;
|
||||
@@ -392,15 +392,16 @@ void CCamPosition_Shoulder::Free()
|
||||
|
||||
void CCamPosition_Shoulder::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Cam_Shoulder");
|
||||
m_pTransformCom->Describe_Entity();
|
||||
GUI::Begin("CAMERA");
|
||||
if (GUI::CollapsingHeader("Cam_Shoulder")) {
|
||||
m_pTransformCom->Describe_Entity();
|
||||
|
||||
GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
|
||||
GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f");
|
||||
GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f);
|
||||
GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
|
||||
//GUI::
|
||||
GUI::Text("fMouseSensor : %.1f", m_fMouseSensor);
|
||||
GUI::SliderFloat("m_fFollowTargetIncludedAngleDegree", &m_fFollowTargetIncludedAngleDegree, -360.f, 360.f, "%.1f");
|
||||
GUI::SliderFloat("m_fDefaultCameraBackToFrontRatio", &m_fDefaultCameraBackToFrontRatio, -1.f, 1.f);
|
||||
GUI::SliderFloat("m_vFocalRatio", &m_vFocalRatio.x, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fCameraFowardDistance", &m_fCameraFowardDistance, 0.f, 4.f);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,18 +17,15 @@ CCamera_Debug::CCamera_Debug(const CCamera_Debug& rhs)
|
||||
|
||||
void CCamera_Debug::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifndef 기무리
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, false);
|
||||
#endif // _DEBUG
|
||||
#endif // !기무리
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CCamera_Debug::Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == m_bActive) {
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_DEBUG))) {
|
||||
return;
|
||||
}
|
||||
Transition(fTimeDelta);
|
||||
@@ -93,7 +90,7 @@ void CCamera_Debug::Update(_float fTimeDelta)
|
||||
|
||||
void CCamera_Debug::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (false == m_bActive) {
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_DEBUG))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ void CCamera_Gaze::Enable_LookLerp()
|
||||
|
||||
void CCamera_Gaze::Toggle_Priority()
|
||||
{
|
||||
if (m_iPriority == 99) {
|
||||
if (m_iPriority == 55) {
|
||||
m_iPriority = 51;
|
||||
}
|
||||
else {
|
||||
m_iPriority = 99;
|
||||
m_iPriority = 55;
|
||||
m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_SHOULDER, false);
|
||||
}
|
||||
}
|
||||
@@ -182,30 +182,32 @@ void CCamera_Gaze::Free()
|
||||
|
||||
void CCamera_Gaze::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Camera_Gaze_Describe");
|
||||
m_pTransformCom->Describe_Entity();
|
||||
GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
|
||||
GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z);
|
||||
GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z);
|
||||
GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z);
|
||||
GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp);
|
||||
if (true == m_bEnable_TransitionLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y);
|
||||
GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
GUI::Begin("CAMERA");
|
||||
if (GUI::CollapsingHeader("Camera_Gaze_Describe")) {
|
||||
m_pTransformCom->Describe_Entity();
|
||||
GUI::Text("LOOK_SRC %.2f, %.2f, %.2f", m_vLookPos_Src.x, m_vLookPos_Src.y, m_vLookPos_Src.z);
|
||||
GUI::Text("LOOK_DST %.2f, %.2f, %.2f", m_vLookPos_Dest.x, m_vLookPos_Dest.y, m_vLookPos_Dest.z);
|
||||
GUI::Text("FOLLOW_SRC %.2f, %.2f, %.2f", m_vFollowPos_Src.x, m_vFollowPos_Src.y, m_vFollowPos_Src.z);
|
||||
GUI::Text("FOLLOW_DST %.2f, %.2f, %.2f", m_vFollowPos_Dest.x, m_vFollowPos_Dest.y, m_vFollowPos_Dest.z);
|
||||
GUI::Checkbox("TransitionLerp", &m_bEnable_TransitionLerp);
|
||||
if (true == m_bEnable_TransitionLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vTransitionTime.x, m_vTransitionTime.y);
|
||||
GUI::SliderFloat("TranslationTime", &m_vTransitionTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
|
||||
GUI::Checkbox("LookLerp", &m_bEnable_LookLerp);
|
||||
if (true == m_bEnable_LookLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y);
|
||||
GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
GUI::Checkbox("LookLerp", &m_bEnable_LookLerp);
|
||||
if (true == m_bEnable_LookLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vLookLerpTime.x, m_vLookLerpTime.y);
|
||||
GUI::SliderFloat("LookTime", &m_vLookLerpTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
|
||||
GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp);
|
||||
if (true == m_bEnable_FollowLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y);
|
||||
GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
GUI::Checkbox("FollowLerp", &m_bEnable_FollowLerp);
|
||||
if (true == m_bEnable_FollowLerp) {
|
||||
GUI::SameLine(); GUI::Text("Translation : %.1f %.1f", m_vFollowLerpTime.x, m_vFollowLerpTime.y);
|
||||
GUI::SliderFloat("FollowTime", &m_vFollowLerpTime.y, 0.1f, 3.f, "%.1f");
|
||||
}
|
||||
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ HRESULT CDummy_PhysXPlayable::Ready_Components(void* pArg)
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
|
||||
@@ -58,9 +58,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// 디버그 모드일 때
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifdef gimch
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
@@ -81,8 +80,31 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
|
||||
#endif
|
||||
//// 디버그 모드가 아닐 때, 릴리즈모드에
|
||||
#ifndef _DEBUG
|
||||
#ifdef gimch
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif // gimch
|
||||
#ifdef Bin
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#ifdef 진우
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#endif // !_DEBUG
|
||||
|
||||
|
||||
if (m_isActiveEffectCreate)
|
||||
{
|
||||
|
||||
@@ -86,10 +86,6 @@ void CGoblin::Update(_float fTimeDelta)
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Play_Event();
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("%d", m_pCharacter_Controller->IsActive());
|
||||
GUI::Text("%f %f", m_vStunTimer.x, m_vStunTimer.y);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
{ // 세트
|
||||
@@ -329,7 +325,7 @@ HRESULT CGoblin::Ready_Components()
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.6f;
|
||||
Desc.fHeight = 0.7f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
|
||||
@@ -481,7 +477,6 @@ void CGoblin::Free()
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pGoblin_Particle);
|
||||
SAFE_RELEASE(m_pGoblin_Particle2);
|
||||
SAFE_RELEASE(m_pDetection);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
@@ -490,40 +485,40 @@ void CGoblin::Free()
|
||||
|
||||
void CGoblin::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Goblin");
|
||||
GUI::Begin("UNIT");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Goblin")) {
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||
{
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||
}
|
||||
|
||||
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||
{
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||
XMFLOAT3 f3;
|
||||
XMStoreFloat3(&f3, m_vOriginPos);
|
||||
|
||||
GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z);
|
||||
|
||||
m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos));
|
||||
|
||||
GUI::Text("Length %.2f", m_fLength);
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||
}
|
||||
|
||||
XMFLOAT3 f3;
|
||||
XMStoreFloat3(&f3, m_vOriginPos);
|
||||
|
||||
GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z);
|
||||
|
||||
m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos));
|
||||
|
||||
GUI::Text("Length %.2f", m_fLength);
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,6 @@ void CGoblin_Mage::Update(_float fTimeDelta)
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Play_Event();
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("%d", m_pCharacter_Controller->IsActive());
|
||||
GUI::Text("%f %f", m_vStunTimer.x, m_vStunTimer.y);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (true == m_pCharacter_Controller->IsActive()) {
|
||||
{ // 세트
|
||||
@@ -338,7 +334,7 @@ HRESULT CGoblin_Mage::Ready_Components()
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.6f;
|
||||
Desc.fHeight = 0.7f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Monster_HitReport::Create();
|
||||
@@ -447,40 +443,42 @@ void CGoblin_Mage::Free()
|
||||
|
||||
void CGoblin_Mage::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Goblin");
|
||||
GUI::Begin("UNIT");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Goblin_Mage")) {
|
||||
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||
{
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||
}
|
||||
|
||||
XMFLOAT3 f3;
|
||||
XMStoreFloat3(&f3, m_vOriginPos);
|
||||
|
||||
GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z);
|
||||
|
||||
m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos));
|
||||
|
||||
GUI::Text("Length %.2f", m_fLength);
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||
|
||||
if (GUI::DragFloat3("Pos", (_float*)&Pos))
|
||||
{
|
||||
m_pCharacter_Controller->Set_Position(XMLoadFloat3(&Pos));
|
||||
}
|
||||
|
||||
XMFLOAT3 f3;
|
||||
XMStoreFloat3(&f3, m_vOriginPos);
|
||||
|
||||
GUI::Text("Origin: %.2f, %.2f, %.2f", f3.x, f3.y, f3.z);
|
||||
|
||||
m_fLength = XMVectorGetX(XMVector2Length(m_pTransformCom->Get_State(STATE::POSITION) - m_vOriginPos));
|
||||
|
||||
GUI::Text("Length %.2f", m_fLength);
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Distance %.2f", m_fTargetDistance);
|
||||
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -348,11 +348,12 @@ void CGoblin_Spector::Free()
|
||||
|
||||
void CGoblin_Spector::Describe_Entity()
|
||||
{
|
||||
|
||||
GUI::Begin("GoblinSpector");
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
|
||||
GUI::Begin("UNIT");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("GoblinSpector")) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
Camera_Desc.pCameraKey = CAMERA_DEBUG;
|
||||
Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||
Camera_Desc.fMouseSensor = 0.1f;
|
||||
Camera_Desc.iPriority = 70;
|
||||
Camera_Desc.iPriority = 53;
|
||||
Camera_Desc.pFollowTarget = { nullptr };
|
||||
Camera_Desc.pLookTarget = { nullptr };
|
||||
|
||||
@@ -463,9 +463,6 @@ HRESULT CLevel_GamePlay::Ready_Layer_Camera()
|
||||
}
|
||||
|
||||
m_pGameInstance->Add_Camera(g_iStaticLevel, pCamera, CAMERA_DEBUG);
|
||||
if (FAILED(m_pGameInstance->Bind_Camera(g_iStaticLevel, CAMERA_DEBUG, true))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@ void CLight_Main::Priority_Update(_float fTimeDelta)
|
||||
void CLight_Main::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Main_Light");
|
||||
m_pLightCom->Describe_Entity();
|
||||
GUI::Begin("LIGHT");
|
||||
if (GUI::CollapsingHeader("Main_Light")) {
|
||||
m_pLightCom->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
@@ -1393,37 +1393,69 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
}
|
||||
|
||||
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
}
|
||||
{ // LIGHT PHYSX DYNAMIC
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 0.5f, 0.5f, 0.5f };
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
//Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX_KIN"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // DOOR PHYSX
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
|
||||
Desc.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 0.35f, 0.75f, 0.15f };
|
||||
Desc.fDensity = 10.f;
|
||||
PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(0.f, 0.f, 0.f));
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.5f, 0.f, 0.f };
|
||||
|
||||
Desc.pxMassCenter = pxPivotTransform;
|
||||
Desc.eLockFlag = {
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Y |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z
|
||||
};
|
||||
Desc.vAutoDamping = { 10.f, 10.f };
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Box"),
|
||||
|
||||
@@ -44,17 +44,22 @@ HRESULT CLoding_Panel::Initialize(void* pArg)
|
||||
Visible(true);
|
||||
m_bActive = true;
|
||||
//m_vImageposSi = _float4(0.f, 0.f, 1792.f, 1024.f);
|
||||
#ifdef _DEBUG
|
||||
INHYUK = true;
|
||||
human = 0;
|
||||
#endif // DEBUG
|
||||
|
||||
m_iToolTip_Count = 0;
|
||||
ToolTipSetting();
|
||||
return S_OK;
|
||||
}
|
||||
void CLoding_Panel::Set_Image(_int Index)
|
||||
{
|
||||
m_iImageNum = Index;
|
||||
}
|
||||
void CLoding_Panel::ToolTipSetting()
|
||||
{
|
||||
ToolTip[0] = TEXT("알고 계셨나요?\nF9를 눌러 브레이크포인트를 설정할 수 있습니다.");
|
||||
ToolTip[1] = TEXT("알고 계셨나요?\nF12를 눌러 정의로 바로 이동할 수 있습니다!.");
|
||||
ToolTip[2] = TEXT("알고 계셨나요?\n디버깅 중에도 핫 리로드로 코드를 수정할 수 있습니다.");
|
||||
ToolTip[3] = TEXT("알고 계셨나요?\nCtrl + R, R로 변수 또는 함수 이름을 프로젝트 전체에서 일괄 변경할 수 있습니다.");
|
||||
ToolTip[4] = TEXT("알고 계셨나요?\n디버깅 중 변수에 마우스를 올리면 현재 값을 확인할 수 있습니다.");
|
||||
}
|
||||
void CLoding_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
@@ -63,54 +68,17 @@ void CLoding_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_M))
|
||||
{
|
||||
human++;
|
||||
if (human > 4) // 4보다 크면 0으로
|
||||
human = 0;
|
||||
m_iToolTip_Count++;
|
||||
if (m_iToolTip_Count > 4) // 4보다 크면 0으로
|
||||
m_iToolTip_Count = 0;
|
||||
}
|
||||
if (m_pGameInstance->Key_Down(DIK_N))
|
||||
{
|
||||
human--;
|
||||
if (human < 0) // 0보다 작으면 4로
|
||||
human = 4;
|
||||
}
|
||||
switch (human)
|
||||
{
|
||||
case 0:
|
||||
INHYUK = true;
|
||||
JINHO = false;
|
||||
HYUNBIN = false;
|
||||
NURI = false;
|
||||
JINWOO = false;
|
||||
break;
|
||||
case 1:
|
||||
INHYUK = false;
|
||||
JINHO = true;
|
||||
HYUNBIN = false;
|
||||
NURI = false;
|
||||
JINWOO = false;
|
||||
break;
|
||||
case 2:
|
||||
INHYUK = false;
|
||||
JINHO = false;
|
||||
HYUNBIN = true;
|
||||
NURI = false;
|
||||
JINWOO = false;
|
||||
break;
|
||||
case 3:
|
||||
INHYUK = false;
|
||||
JINHO = false;
|
||||
HYUNBIN = false;
|
||||
NURI = true;
|
||||
JINWOO = false;
|
||||
break;
|
||||
case 4:
|
||||
INHYUK = false;
|
||||
JINHO = false;
|
||||
HYUNBIN = false;
|
||||
NURI = false;
|
||||
JINWOO = true;
|
||||
break;
|
||||
m_iToolTip_Count--;
|
||||
if (m_iToolTip_Count < 0) // 0보다 작으면 4로
|
||||
m_iToolTip_Count = 4;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -133,20 +101,10 @@ HRESULT CLoding_Panel::Render()
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("<- N M ->."), _float2(100.f, 750.f));
|
||||
|
||||
if (INHYUK == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF9를 눌러 브레이크포인트를 설정할 수 있습니다."), _float2(100.f, 800.f));
|
||||
if (JINHO == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nF12를 눌러 정의로 바로 이동할 수 있습니다!."), _float2(100.f, 800.f));
|
||||
if (HYUNBIN == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중에도 핫 리로드로 코드를 수정할 수 있습니다."), _float2(100.f, 800.f));
|
||||
if (NURI == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\nCtrl + R, R로 변수 또는 함수 이름을 프로젝트 전체에서 일괄 변경할 수 있습니다."), _float2(100.f, 800.f));
|
||||
if (JINWOO == true)
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("알고 계셨나요?\n디버깅 중 변수에 마우스를 올리면 현재 값을 확인할 수 있습니다."), _float2(100.f, 800.f));
|
||||
#endif // DEBUG
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), ToolTip[m_iToolTip_Count].c_str(), _float2(100.f, 800.f));
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,9 @@ void CMainApp::Update(_float fTimeDelta)
|
||||
GUI::NewFrame();
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Present_TimeCost();
|
||||
GUI::Begin("SYSTEM");
|
||||
GUI::SliderFloat("fTimeMult", &g_fTimeMult, 0.01f, 4.f);
|
||||
GUI::End();
|
||||
m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "MapElement_Door.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "RigidBody_Dynamic.h"
|
||||
#include "Terrain.h"
|
||||
#include "Layer.h"
|
||||
#include "VIBuffer_Terrain.h"
|
||||
@@ -43,17 +44,39 @@ HRESULT CMapElement_Door::Initialize(void* pArg)
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
//m_vBoxSize = _float3(1.f, 1.f, 1.f);
|
||||
//m_pActor = static_cast<PSX::PxRigidDynamic*>(m_pRigidBody->Get_Actor());
|
||||
XMStoreFloat4((_float4*)&m_pxStartQuat, m_pTransformCom->Get_QuarternionVector());
|
||||
XMStoreFloat4x4(&m_InitialMatrix, m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Set_HalfGeometryInfo(pDesc->vBoxSize);
|
||||
//static_cast<CRigidBody_Dynamic*>(m_pRigidBody)->Move_LocalPos(_float4(0.f, 0.f, 0.f, 0.f), pDesc->vBoxLocalPosition);
|
||||
m_vRadianYAngle.y = pDesc->vRotation.z;
|
||||
m_vRadianYAngle.x = m_vRadianYAngle.y + XMConvertToRadians(-70.f);
|
||||
m_vRadianYAngle.z = m_vRadianYAngle.y + XMConvertToRadians(70.f);
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC) {
|
||||
m_vKinematicTimer.x += fTimeDelta;
|
||||
if (m_vKinematicTimer.x < m_vKinematicTimer.z) {
|
||||
// 행렬없이 럴프 버전
|
||||
_float fTime = max(0.f, ((m_vKinematicTimer.x - m_vKinematicTimer.y) / (m_vKinematicTimer.z - m_vKinematicTimer.y)));
|
||||
Lerp_Matrix(fTime);
|
||||
//Lerp_NonMatrix(fTime);
|
||||
}
|
||||
else {
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::Update(_float fTimeDelta)
|
||||
@@ -63,6 +86,45 @@ void CMapElement_Door::Update(_float fTimeDelta)
|
||||
void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
_vector vRPY = m_pTransformCom->Get_RollPitchYawVector();
|
||||
if (!(m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC)) {
|
||||
_float fPitch = XMVectorGetX(vRPY);
|
||||
_float fYaw = XMVectorGetY(vRPY);
|
||||
_float fRoll = XMVectorGetZ(vRPY);
|
||||
|
||||
_float fClampedYaw = ClampRadian(fYaw);
|
||||
if (fClampedYaw != fYaw) {
|
||||
_vector vNewQuat = XMQuaternionRotationRollPitchYaw(fPitch, fClampedYaw, fRoll);
|
||||
|
||||
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
|
||||
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
|
||||
|
||||
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
|
||||
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
|
||||
|
||||
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
|
||||
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
|
||||
_matrix RotationMatrix = XMMatrixRotationQuaternion(vNewQuat);
|
||||
|
||||
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
|
||||
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
|
||||
|
||||
// 최종 월드 행렬
|
||||
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
|
||||
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(world);
|
||||
m_pActor->setGlobalPose(XMWorldToPx_NoScale(world));
|
||||
|
||||
m_pActor->setAngularVelocity(PSX::PxVec3(0));
|
||||
m_pActor->setLinearVelocity(PSX::PxVec3(0));
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
|
||||
m_vKinematicTimer.x = 0.f;
|
||||
}
|
||||
}
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
@@ -125,14 +187,6 @@ HRESULT CMapElement_Door::Ready_Components(void* pArg)
|
||||
|
||||
ELEMENT_DOOR_DESC* pPhysXDummyDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
//// RIGID_BODY
|
||||
//CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
//Desc.iSubKind = ENUM_CLASS(PXOBJECT::BOX);//pPhysXDummyDesc->iSubKind;
|
||||
//if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -155,6 +209,67 @@ HRESULT CMapElement_Door::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Lerp_Matrix(_float fTime)
|
||||
{
|
||||
{
|
||||
_float4x4 OutMatrix = {};
|
||||
_float4x4 CurrentMatrix = {};
|
||||
XMStoreFloat4x4(&CurrentMatrix, m_pTransformCom->Get_XMWorldMatrix());
|
||||
CMyTools::MatrixLerp(&CurrentMatrix, &m_InitialMatrix, OutMatrix, fTime);
|
||||
m_pTransformCom->Set_WorldMatrix(OutMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::Lerp_NonMatrix(_float fTime)
|
||||
{
|
||||
{
|
||||
_vector vCurrQ = m_pTransformCom->Get_QuarternionVector();
|
||||
_vector vInitialQ = XMLoadFloat4((_float4*)&m_pxStartQuat);
|
||||
_vector vLerpQuat = XMVector4Normalize(XMVectorLerp(vCurrQ, vInitialQ, fTime));
|
||||
|
||||
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
|
||||
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
|
||||
|
||||
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
|
||||
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
|
||||
|
||||
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
|
||||
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
|
||||
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
|
||||
_matrix RotationMatrix = XMMatrixRotationQuaternion(vLerpQuat);
|
||||
|
||||
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
|
||||
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
|
||||
|
||||
// 최종 월드 행렬
|
||||
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
|
||||
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(world);
|
||||
}
|
||||
}
|
||||
|
||||
_float CMapElement_Door::ClampRadian(_float fNewRadian)
|
||||
{
|
||||
// [x, z] 사이로 잘라주는 단순한 클램프
|
||||
_float minYaw = m_vRadianYAngle.x;
|
||||
_float maxYaw = m_vRadianYAngle.z;
|
||||
|
||||
// 라디안 노멀라이즈 ([-pi, pi] 같은 범위로)
|
||||
fNewRadian = CMyTools::NormalizeRadian(fNewRadian);
|
||||
|
||||
if (fNewRadian < minYaw) {
|
||||
fNewRadian = minYaw;
|
||||
}
|
||||
else if (fNewRadian > maxYaw) {
|
||||
fNewRadian = maxYaw;
|
||||
}
|
||||
return fNewRadian;
|
||||
}
|
||||
|
||||
CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext);
|
||||
@@ -188,7 +303,7 @@ void CMapElement_Door::Free()
|
||||
}
|
||||
__super::Free();
|
||||
|
||||
//SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
for (auto& pModel : m_pModelComs)
|
||||
|
||||
@@ -680,44 +680,45 @@ void CMapInfo::Free()
|
||||
|
||||
void CMapInfo::Describe_Entity()
|
||||
{
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND);
|
||||
if (nullptr == pLayer) {
|
||||
return;
|
||||
}
|
||||
static _bool s_bConverted = { false };
|
||||
static _bool s_bReadyToCreate = { false };
|
||||
GUI::Begin("CLIENT_SYSTEM");
|
||||
if (GUI::CollapsingHeader("MapInfoDesc")) {
|
||||
CLayer* pLayer = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_BACKGROUND);
|
||||
if (nullptr == pLayer) {
|
||||
return;
|
||||
}
|
||||
static _bool s_bConverted = { false };
|
||||
static _bool s_bReadyToCreate = { false };
|
||||
|
||||
const list<CGameObject*>* pObjects = pLayer->Get_Objects();
|
||||
const list<CGameObject*>* pObjects = pLayer->Get_Objects();
|
||||
|
||||
GUI::Begin("MapInfoDesc");
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
GUI::BeginChild("CollisonPartObjects");
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
if (false == s_bReadyToCreate) {
|
||||
if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) {
|
||||
s_bReadyToCreate = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ReadyForPhysX();
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
GUI::BeginChild("CollisonPartObjects");
|
||||
if (false == s_bReadyToCreate) {
|
||||
if (GUI::Button("Ready_StaticMeshesForPhyX_ALL")) {
|
||||
s_bReadyToCreate = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ReadyForPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (false == s_bConverted) {
|
||||
if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) {
|
||||
s_bConverted = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ConvertToPhysX();
|
||||
else if (false == s_bConverted) {
|
||||
if (GUI::Button("Convert_StaticMeshesForPhyX_ALL")) {
|
||||
s_bConverted = true;
|
||||
list<CGameObject*>::const_iterator iter = pObjects->begin();
|
||||
for (; iter != pObjects->end(); ++iter) {
|
||||
CMapContainer* pContainer = dynamic_cast<CMapContainer*>(*iter);
|
||||
if (nullptr != pContainer) {
|
||||
pContainer->ConvertToPhysX();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::EndChild();
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -196,21 +196,25 @@ void CNPC_Ollivander::Free()
|
||||
|
||||
void CNPC_Ollivander::Describe_Entity()
|
||||
{
|
||||
m_pModelCom->Describe_Entity();
|
||||
if (ImGui::TreeNode("ANIM STATE")) {
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
m_pModelCom->Describe_Entity();
|
||||
if (ImGui::TreeNode("ANIM STATE")) {
|
||||
|
||||
for (auto& pState : m_States)
|
||||
{
|
||||
if (ImGui::Button(to_string(pState.first).c_str()))
|
||||
for (auto& pState : m_States)
|
||||
{
|
||||
m_pFSM->Change_State(pState.first);
|
||||
if (ImGui::Button(to_string(pState.first).c_str()))
|
||||
{
|
||||
m_pFSM->Change_State(pState.first);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -106,7 +106,7 @@ HRESULT CPhysXEffectHitBox::Ready_Components(void* pArg)
|
||||
Desc.fContactOffset = 0.3f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.05f };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 1.0f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_EffectHitBox_HitReport::Create();
|
||||
|
||||
@@ -337,42 +337,47 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
const _float fArrowLength = 2.0f;
|
||||
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
|
||||
GUI::Begin("Player_CAM_COOORD");
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
_float fButtonSize = 45.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
|
||||
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##8", { fButtonSize, fButtonSize });
|
||||
|
||||
GUI::Begin("CAMERA");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
|
||||
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
_float fButtonSize = 45.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
|
||||
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##8", { fButtonSize, fButtonSize });
|
||||
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
|
||||
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
|
||||
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
|
||||
//D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z })
|
||||
}
|
||||
GUI::End();
|
||||
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
|
||||
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
|
||||
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
|
||||
//D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z })
|
||||
m_Batch->DrawLine( // W
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
|
||||
VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
|
||||
);
|
||||
m_Batch->DrawLine( // D
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
|
||||
VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
|
||||
);
|
||||
m_Batch->DrawLine( // PlayerLook
|
||||
VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * xmvLook, DirectX::Colors::HotPink)
|
||||
VertexPositionColor(fArrowLength* xmvLook, DirectX::Colors::HotPink)
|
||||
);
|
||||
|
||||
m_Batch->End();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -427,7 +432,7 @@ HRESULT CPlayer::Ready_Components()
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 0.6f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Playable_HitReport::Create();
|
||||
@@ -612,85 +617,87 @@ void CPlayer::Free()
|
||||
|
||||
void CPlayer::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("PLAYER_DESC");
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
_char label[256];
|
||||
for (auto& iter : m_KeyFrames)
|
||||
{
|
||||
sprintf_s(label, "%s %.2f", iter.first.c_str(), iter.second);
|
||||
GUI::Begin("UNIT");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("PLAYER_DESC")) {
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
GUI::Text("%.2f %.2f %.2f %.2f ", vMomentum.x, vMomentum.y, vMomentum.z, vMomentum.w);
|
||||
_char label[256];
|
||||
for (auto& iter : m_KeyFrames)
|
||||
{
|
||||
sprintf_s(label, "%s %.2f", iter.first.c_str(), iter.second);
|
||||
|
||||
GUI::Text(label);
|
||||
}
|
||||
GUI::Text(label);
|
||||
}
|
||||
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
_float3 Pos;
|
||||
XMStoreFloat3(&Pos, Get_WorldPostion());
|
||||
|
||||
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
|
||||
GUI::DragFloat3("Pos", Pos3);
|
||||
float Pos3[3] = { Pos.x, Pos.y, Pos.z };
|
||||
GUI::DragFloat3("Pos", Pos3);
|
||||
|
||||
|
||||
_float RotR, RotU, RotL;
|
||||
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
|
||||
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
_float RotR, RotU, RotL;
|
||||
RotR = XMVectorGetX(m_pTransformCom->Get_State(STATE::RIGHT));
|
||||
RotU = XMVectorGetY(m_pTransformCom->Get_State(STATE::UP));
|
||||
RotL = XMVectorGetZ(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
float Rot3[3] = { RotR, RotU,RotL };
|
||||
GUI::DragFloat3("Rot", Rot3);
|
||||
float Rot3[3] = { RotR, RotU,RotL };
|
||||
GUI::DragFloat3("Rot", Rot3);
|
||||
|
||||
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
string AnimList = m_pModelCom->Get_AnimList(m_pModelCom->Get_AnimIndex());
|
||||
GUI::Text(AnimList.c_str());
|
||||
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed());
|
||||
GUI::Text("AnimTrack %.2f", m_pModelCom->Get_CurrentTrackPosition());
|
||||
GUI::Text("AnimRatio %.2f", m_pModelCom->Get_CurrentTrackProgressRatio());
|
||||
GUI::Text("AnimSpeed %.2f", m_pModelCom->Get_AnimSpeed());
|
||||
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
|
||||
GUI::Text("%d", m_iStateMask);
|
||||
GUI::Text("HP : %f, %f", m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp);
|
||||
GUI::SameLine(); if (GUI::Button("FULL")) { m_pStat->Set_Stat(ENUM_CLASS(STAT::CURRENTHP), m_pStat->Get_Stat().fMaxHp); }
|
||||
GUI::Text("%d", m_iStateMask);
|
||||
GUI::Text("HP : %f, %f", m_pStat->Get_Stat().fCurrentHp, m_pStat->Get_Stat().fMaxHp);
|
||||
GUI::SameLine(); if (GUI::Button("FULL")) { m_pStat->Set_Stat(ENUM_CLASS(STAT::CURRENTHP), m_pStat->Get_Stat().fMaxHp); }
|
||||
#pragma region CAMERA_SHAKE
|
||||
if (false == m_bCameraShake && GUI::Button("Shake")) {
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) {
|
||||
m_vCameraShakeTimer.y = m_fCameraShakeTime;
|
||||
}
|
||||
GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f");
|
||||
if (false == m_bCameraShake && GUI::Button("Shake")) {
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
if (GUI::SliderFloat("m_fCameraShakeTime", &m_fCameraShakeTime, 0.125f, 0.f, "%.3f")) {
|
||||
m_vCameraShakeTimer.y = m_fCameraShakeTime;
|
||||
}
|
||||
GUI::SliderFloat("m_fCameraShakeIntense", &m_fCameraShakeIntense, 5.f, 20.f, "%.1f");
|
||||
#pragma endregion
|
||||
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
_vector xmvInputDir = XMVectorZero();
|
||||
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
_vector xmvCamLook = XMVector4Normalize(XMVectorSet(m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z, 0.f));
|
||||
_vector xmvCamRight = XMVector4Normalize(XMVectorSet(m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z, 0.f));
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_W))
|
||||
xmvInputDir += xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_S))
|
||||
xmvInputDir -= xmvCamLook;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_A))
|
||||
xmvInputDir -= xmvCamRight;
|
||||
if (m_pGameInstance->Key_Pressing(DIK_D))
|
||||
xmvInputDir += xmvCamRight;
|
||||
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
xmvInputDir = XMVector3Normalize(xmvInputDir);
|
||||
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
_float2 vInputDir = { XMVectorGetX(xmvInputDir),XMVectorGetZ(xmvInputDir) };
|
||||
_vector xmvCurLook = XMVector4Normalize(
|
||||
XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vCurLook = { XMVectorGetX(xmvCurLook),XMVectorGetZ(xmvCurLook) };
|
||||
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float degree = XMConvertToDegrees(vDir);
|
||||
_float vDir = CMyTools::Get_Direction2D(vCurLook, vInputDir);
|
||||
_float degree = XMConvertToDegrees(vDir);
|
||||
|
||||
GUI::Text("Angle %.2f", degree);
|
||||
|
||||
m_pLightCom->Describe_Entity();
|
||||
GUI::Text("Angle %.2f", degree);
|
||||
|
||||
m_pLightCom->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ HRESULT CTroll::Ready_Components()
|
||||
Desc.fContactOffset = 0.001f;
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.001f };
|
||||
Desc.fStepOffset = { 0.12f };
|
||||
Desc.fRadius = 1.2f;
|
||||
Desc.fHeight = 1.5f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_Troll_HitReport::Create();
|
||||
@@ -641,16 +641,20 @@ void CTroll::Free()
|
||||
|
||||
void CTroll::Describe_Entity()
|
||||
{
|
||||
__super::Describe_Entity();
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Troll")) {
|
||||
__super::Describe_Entity();
|
||||
|
||||
_float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd");
|
||||
_float4x4 socketMat = *m_pModelCom->Get_BoneMatrixPtr("HeadEnd");
|
||||
|
||||
_string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43);
|
||||
_string strSocket = "Socket " + to_string(socketMat._41) + to_string(socketMat._42) + to_string(socketMat._43);
|
||||
|
||||
GUI::Text(strSocket.c_str());
|
||||
GUI::Text(strSocket.c_str());
|
||||
|
||||
|
||||
m_pTransformCom->Describe_Entity();
|
||||
m_pTransformCom->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -269,8 +269,11 @@ void CTroll_Rock::Free()
|
||||
|
||||
void CTroll_Rock::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("TrollRock");
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
GUI::Begin("UNIT");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("TrollRock")) {
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
@@ -210,27 +210,31 @@ void CTroll_Weapon::Free()
|
||||
|
||||
void CTroll_Weapon::Describe_Entity()
|
||||
{
|
||||
_float4 vPos;
|
||||
_float4 vHammerWorldPos;
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Troll_Hammer")) {
|
||||
_float4 vPos;
|
||||
_float4 vHammerWorldPos;
|
||||
|
||||
_float4 vHammerRight;
|
||||
_float4 vHammerUp;
|
||||
_float4 vHammerLook;
|
||||
_float4 vHammerPos;
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat4(&vHammerWorldPos, Get_WorldPostion());
|
||||
_float4 vHammerRight;
|
||||
_float4 vHammerUp;
|
||||
_float4 vHammerLook;
|
||||
_float4 vHammerPos;
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat4(&vHammerWorldPos, Get_WorldPostion());
|
||||
|
||||
XMStoreFloat4(&vHammerRight, XMLoadFloat4((_float4*)&m_HammerMatrix.m[0][0]));
|
||||
XMStoreFloat4(&vHammerUp, XMLoadFloat4((_float4*)&m_HammerMatrix.m[1][0]));
|
||||
XMStoreFloat4(&vHammerLook, XMLoadFloat4((_float4*)&m_HammerMatrix.m[2][0]));
|
||||
XMStoreFloat4(&vHammerPos, XMLoadFloat4((_float4*)&m_HammerMatrix.m[3][0]));
|
||||
XMStoreFloat4(&vHammerRight, XMLoadFloat4((_float4*)&m_HammerMatrix.m[0][0]));
|
||||
XMStoreFloat4(&vHammerUp, XMLoadFloat4((_float4*)&m_HammerMatrix.m[1][0]));
|
||||
XMStoreFloat4(&vHammerLook, XMLoadFloat4((_float4*)&m_HammerMatrix.m[2][0]));
|
||||
XMStoreFloat4(&vHammerPos, XMLoadFloat4((_float4*)&m_HammerMatrix.m[3][0]));
|
||||
|
||||
GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w);
|
||||
GUI::Text("vHammerWorldPos, %.2f, %.2f, %.2f, %.2f", vHammerWorldPos.x, vHammerWorldPos.y, vHammerWorldPos.z, vHammerWorldPos.w);
|
||||
GUI::Text("vHammerRight, %.2f, %.2f, %.2f, %.2f", vHammerRight.x, vHammerRight.y, vHammerRight.z, vHammerRight.w);
|
||||
GUI::Text("vHammerUp, %.2f, %.2f, %.2f, %.2f", vHammerUp.x, vHammerUp.y, vHammerUp.z, vHammerUp.w);
|
||||
GUI::Text("vHammerLook, %.2f, %.2f, %.2f, %.2f", vHammerLook.x, vHammerLook.y, vHammerLook.z, vHammerLook.w);
|
||||
GUI::Text("vHammerPos, %.2f, %.2f, %.2f, %.2f", vHammerPos.x, vHammerPos.y, vHammerPos.z, vHammerPos.w);
|
||||
GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w);
|
||||
GUI::Text("vHammerWorldPos, %.2f, %.2f, %.2f, %.2f", vHammerWorldPos.x, vHammerWorldPos.y, vHammerWorldPos.z, vHammerWorldPos.w);
|
||||
GUI::Text("vHammerRight, %.2f, %.2f, %.2f, %.2f", vHammerRight.x, vHammerRight.y, vHammerRight.z, vHammerRight.w);
|
||||
GUI::Text("vHammerUp, %.2f, %.2f, %.2f, %.2f", vHammerUp.x, vHammerUp.y, vHammerUp.z, vHammerUp.w);
|
||||
GUI::Text("vHammerLook, %.2f, %.2f, %.2f, %.2f", vHammerLook.x, vHammerLook.y, vHammerLook.z, vHammerLook.w);
|
||||
GUI::Text("vHammerPos, %.2f, %.2f, %.2f, %.2f", vHammerPos.x, vHammerPos.y, vHammerPos.z, vHammerPos.w);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -192,27 +192,31 @@ void CWand::Free()
|
||||
|
||||
void CWand::Describe_Entity()
|
||||
{
|
||||
_float4 vPos;
|
||||
_float4 vTipWorldPos;
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("WAND")) {
|
||||
_float4 vPos;
|
||||
_float4 vTipWorldPos;
|
||||
|
||||
_float4 vTipRight;
|
||||
_float4 vTipUp;
|
||||
_float4 vTipLook;
|
||||
_float4 vTipPos;
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat4(&vTipWorldPos, Get_WorldPostion());
|
||||
_float4 vTipRight;
|
||||
_float4 vTipUp;
|
||||
_float4 vTipLook;
|
||||
_float4 vTipPos;
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
XMStoreFloat4(&vTipWorldPos, Get_WorldPostion());
|
||||
|
||||
XMStoreFloat4(&vTipRight, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[0][0]));
|
||||
XMStoreFloat4(&vTipUp, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[1][0]));
|
||||
XMStoreFloat4(&vTipLook, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[2][0]));
|
||||
XMStoreFloat4(&vTipPos, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0]));
|
||||
XMStoreFloat4(&vTipRight, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[0][0]));
|
||||
XMStoreFloat4(&vTipUp, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[1][0]));
|
||||
XMStoreFloat4(&vTipLook, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[2][0]));
|
||||
XMStoreFloat4(&vTipPos, XMLoadFloat4((_float4*)&m_pWandTipMatrix.m[3][0]));
|
||||
|
||||
GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w);
|
||||
GUI::Text("vTipWorldPos, %.2f, %.2f, %.2f, %.2f", vTipWorldPos.x, vTipWorldPos.y, vTipWorldPos.z, vTipWorldPos.w);
|
||||
GUI::Text("vTipRight, %.2f, %.2f, %.2f, %.2f", vTipRight.x, vTipRight.y, vTipRight.z, vTipRight.w);
|
||||
GUI::Text("vTipUp, %.2f, %.2f, %.2f, %.2f", vTipUp.x, vTipUp.y, vTipUp.z, vTipUp.w);
|
||||
GUI::Text("vTipLook, %.2f, %.2f, %.2f, %.2f", vTipLook.x, vTipLook.y, vTipLook.z, vTipLook.w);
|
||||
GUI::Text("vTipPos, %.2f, %.2f, %.2f, %.2f", vTipPos.x, vTipPos.y, vTipPos.z, vTipPos.w);
|
||||
GUI::Text("vPos, %.2f, %.2f, %.2f, %.2f", vPos.x, vPos.y, vPos.z, vPos.w);
|
||||
GUI::Text("vTipWorldPos, %.2f, %.2f, %.2f, %.2f", vTipWorldPos.x, vTipWorldPos.y, vTipWorldPos.z, vTipWorldPos.w);
|
||||
GUI::Text("vTipRight, %.2f, %.2f, %.2f, %.2f", vTipRight.x, vTipRight.y, vTipRight.z, vTipRight.w);
|
||||
GUI::Text("vTipUp, %.2f, %.2f, %.2f, %.2f", vTipUp.x, vTipUp.y, vTipUp.z, vTipUp.w);
|
||||
GUI::Text("vTipLook, %.2f, %.2f, %.2f, %.2f", vTipLook.x, vTipLook.y, vTipLook.z, vTipLook.w);
|
||||
GUI::Text("vTipPos, %.2f, %.2f, %.2f, %.2f", vTipPos.x, vTipPos.y, vTipPos.z, vTipPos.w);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -15,55 +15,59 @@ class CLoding_Panel final : public CUIObject
|
||||
{
|
||||
|
||||
private:
|
||||
CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLoding_Panel(const CLoding_Panel& rhs);
|
||||
virtual ~CLoding_Panel() = default;
|
||||
CLoding_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLoding_Panel(const CLoding_Panel& rhs);
|
||||
virtual ~CLoding_Panel() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Image(_int Index);
|
||||
void Set_Image(_int Index);
|
||||
void ToolTipSetting();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pCurrent_Spell_Slot = { nullptr };
|
||||
CGameObject* m_pLoadingWidget = { nullptr };
|
||||
CGameObject* m_pCurrent_Spell_Slot = { nullptr };
|
||||
CGameObject* m_pLoadingWidget = { nullptr };
|
||||
|
||||
|
||||
_int m_iImageNum{};
|
||||
_float4 m_vImageposSi{};
|
||||
_int m_iImageNum{};
|
||||
_float4 m_vImageposSi{};
|
||||
|
||||
_wstring ToolTip[5];
|
||||
_int m_iToolTip_Count{};
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool INHYUK = { false };
|
||||
_bool JINHO = { false };
|
||||
_bool HYUNBIN = { false };
|
||||
_bool NURI = { false };
|
||||
_bool JINWOO = { false };
|
||||
_int human{};
|
||||
_bool INHYUK = { false };
|
||||
_bool JINHO = { false };
|
||||
_bool HYUNBIN = { false };
|
||||
_bool NURI = { false };
|
||||
_bool JINWOO = { false };
|
||||
_int human{};
|
||||
#endif
|
||||
|
||||
public:
|
||||
static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
static CLoding_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
void Describe_Entity() override;
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ class CMapElement_Door final : public CMapElement
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
_float3 m_vRadianYAngle = {};
|
||||
_float3 m_vKinematicTimer = { 0.f, 2.f, 2.3f };
|
||||
PSX::PxQuat m_pxStartQuat = {};
|
||||
_float4x4 m_InitialMatrix = {};
|
||||
|
||||
#ifdef _DEBUG
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
@@ -45,6 +50,9 @@ class CMapElement_Door final : public CMapElement
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
void Lerp_Matrix(_float fTime);
|
||||
void Lerp_NonMatrix(_float fTime);
|
||||
_float ClampRadian(_float fNewRadian);
|
||||
|
||||
public:
|
||||
static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -940,9 +940,9 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In)
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.Sample(PointSampler, uv);
|
||||
float fCenterViewSpaceZ = vDepthDesc.y * g_fFar; // n ~ f
|
||||
float fRatio = lerp(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar);
|
||||
if (fRatio <= 0.f)
|
||||
{
|
||||
float fRatio = saturate(smoothstep(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar)); // 멀어지면 너무 반짝거려서 스무딩
|
||||
|
||||
if (fRatio <= 0.f) {
|
||||
Out.fOcclusion = 1.f;
|
||||
return Out;
|
||||
}
|
||||
@@ -1007,7 +1007,7 @@ PS_OUT_SSAO_BLUR PS_SSAO_BLUR(PS_IN In)
|
||||
for (int y = -2; y < 2; ++y)
|
||||
{
|
||||
float2 vOffset = float2((float) x, (float) y) * vTexelSize;
|
||||
fResult += g_SSAOInputTexture.Sample(DefaultSampler, In.vTexcoord + vOffset).r;
|
||||
fResult += g_SSAOInputTexture.Sample(BorderZeroSampler, In.vTexcoord + vOffset).r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -940,9 +940,9 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In)
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.Sample(PointSampler, uv);
|
||||
float fCenterViewSpaceZ = vDepthDesc.y * g_fFar; // n ~ f
|
||||
float fRatio = lerp(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar);
|
||||
if (fRatio <= 0.f)
|
||||
{
|
||||
float fRatio = saturate(smoothstep(0.f, 1.f, (g_fFar - fCenterViewSpaceZ) / g_fFar)); // 멀어지면 너무 반짝거려서 스무딩
|
||||
|
||||
if (fRatio <= 0.f) {
|
||||
Out.fOcclusion = 1.f;
|
||||
return Out;
|
||||
}
|
||||
@@ -1007,7 +1007,7 @@ PS_OUT_SSAO_BLUR PS_SSAO_BLUR(PS_IN In)
|
||||
for (int y = -2; y < 2; ++y)
|
||||
{
|
||||
float2 vOffset = float2((float) x, (float) y) * vTexelSize;
|
||||
fResult += g_SSAOInputTexture.Sample(DefaultSampler, In.vTexcoord + vOffset).r;
|
||||
fResult += g_SSAOInputTexture.Sample(BorderZeroSampler, In.vTexcoord + vOffset).r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ HRESULT CCamera::Ready_Shadow()
|
||||
XMStoreFloat4(&ShadowDesc.vEye, XMLoadFloat4(&ShadowDesc.vAt) - matRotation.r[2] * (ShadowDesc.fFar * 0.25f));
|
||||
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Renderer");
|
||||
GUI::Begin("SYSTEM");
|
||||
if (GUI::CollapsingHeader("Near_Camera_ShadowDesc")) {
|
||||
//GUI::SliderFloat3("RPY", (_float*)&m_vRollPichYaw, -360.f, 360.f);
|
||||
GUI::DragFloat("Far", &ShadowDesc.fFar, 1.f, 20, 300.f);
|
||||
|
||||
@@ -437,65 +437,66 @@ void CCharacter_Controller::Free()
|
||||
#ifdef _DEBUG
|
||||
void CCharacter_Controller::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Character_Controller");
|
||||
GUI::Text("Gravity : %d ", m_bGravity);
|
||||
m_pTransform->Describe_Entity();
|
||||
GUI::TextLinkOpenURL("More details here", "https://dev-treadmill.tistory.com/158");
|
||||
_float fContact = m_pController->getContactOffset();
|
||||
PSX::PxVec3 vUpDirection = m_pController->getUpDirection();
|
||||
PSX::PxExtendedVec3 vCenterPosition = m_pController->getPosition();
|
||||
PSX::PxExtendedVec3 vFootPosition = m_pController->getFootPosition();
|
||||
_float3 vVolume = Get_Volume();
|
||||
_float fStepOffset = m_pController->getStepOffset();
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Character_Controller") ){
|
||||
GUI::Text("Gravity : %d ", m_bGravity);
|
||||
m_pTransform->Describe_Entity();
|
||||
GUI::TextLinkOpenURL("More details here", "https://dev-treadmill.tistory.com/158");
|
||||
_float fContact = m_pController->getContactOffset();
|
||||
PSX::PxVec3 vUpDirection = m_pController->getUpDirection();
|
||||
PSX::PxExtendedVec3 vCenterPosition = m_pController->getPosition();
|
||||
PSX::PxExtendedVec3 vFootPosition = m_pController->getFootPosition();
|
||||
_float3 vVolume = Get_Volume();
|
||||
_float fStepOffset = m_pController->getStepOffset();
|
||||
|
||||
GUI::Text("eBodyType $d", (_uint)m_eBodyType); GUIHelpMarker("Body: only box and capsule available");
|
||||
GUI::Text("eBodyType $d", (_uint)m_eBodyType); GUIHelpMarker("Body: only box and capsule available");
|
||||
|
||||
if (GUI::SliderFloat3("UpDirection", (_float*)&vUpDirection, -1.f, 1.f)) {
|
||||
m_pController->setUpDirection(vUpDirection.getNormalized());
|
||||
} GUIHelpMarker("Up vector in PhysX");
|
||||
GUI::Text("vCenterPosition %lf, %lf, %lf", vCenterPosition.x, vCenterPosition.y, vCenterPosition.z); GUIHelpMarker("Exact center of the rigid body owned by the controller");
|
||||
GUI::Text("vFootPosition %lf, %lf, %lf", vFootPosition.x, vFootPosition.y, vFootPosition.z); GUIHelpMarker("Foot position including step offset from the body center to the ground");
|
||||
if (GUI::SliderFloat3("UpDirection", (_float*)&vUpDirection, -1.f, 1.f)) {
|
||||
m_pController->setUpDirection(vUpDirection.getNormalized());
|
||||
} GUIHelpMarker("Up vector in PhysX");
|
||||
GUI::Text("vCenterPosition %lf, %lf, %lf", vCenterPosition.x, vCenterPosition.y, vCenterPosition.z); GUIHelpMarker("Exact center of the rigid body owned by the controller");
|
||||
GUI::Text("vFootPosition %lf, %lf, %lf", vFootPosition.x, vFootPosition.y, vFootPosition.z); GUIHelpMarker("Foot position including step offset from the body center to the ground");
|
||||
|
||||
if (GUI::SliderFloat("ContactOffset", &fContact, 0.01f, 10.f, "%.2f")) {
|
||||
m_pController->setContactOffset(fContact);
|
||||
} GUIHelpMarker("Actual contact offset in PhysX; increasing it may make the controller appear to hover");
|
||||
if (GUI::SliderFloat("StepOffset", &fStepOffset, 0.f, 3.f, "%.2f")) {
|
||||
m_pController->setStepOffset(fStepOffset);
|
||||
} GUIHelpMarker("In stepped regions, the tolerance height the controller can climb.\n Capsule behaves slightly differently.");
|
||||
|
||||
if (ACTOR::CAPSULE == m_eBodyType) {
|
||||
PSX::PxCapsuleController* pController = (PSX::PxCapsuleController*)m_pController;
|
||||
if (GUI::SliderFloat("ContactOffset", &fContact, 0.01f, 10.f, "%.2f")) {
|
||||
m_pController->setContactOffset(fContact);
|
||||
} GUIHelpMarker("Actual contact offset in PhysX; increasing it may make the controller appear to hover");
|
||||
if (GUI::SliderFloat("StepOffset", &fStepOffset, 0.f, 3.f, "%.2f")) {
|
||||
m_pController->setStepOffset(fStepOffset);
|
||||
} GUIHelpMarker("In stepped regions, the tolerance height the controller can climb.\n Capsule behaves slightly differently.");
|
||||
|
||||
if (0.f != fStepOffset) {
|
||||
switch (pController->getClimbingMode())
|
||||
{
|
||||
case PSX::PxCapsuleClimbingMode::eEASY:
|
||||
if (GUI::Button("ClimbingMode : eEasy")) {
|
||||
pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eCONSTRAINED);
|
||||
if (ACTOR::CAPSULE == m_eBodyType) {
|
||||
PSX::PxCapsuleController* pController = (PSX::PxCapsuleController*)m_pController;
|
||||
|
||||
if (0.f != fStepOffset) {
|
||||
switch (pController->getClimbingMode())
|
||||
{
|
||||
case PSX::PxCapsuleClimbingMode::eEASY:
|
||||
if (GUI::Button("ClimbingMode : eEasy")) {
|
||||
pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eCONSTRAINED);
|
||||
}
|
||||
break;
|
||||
case PSX::PxCapsuleClimbingMode::eCONSTRAINED:
|
||||
if (GUI::Button("ClimbingMode : eConstrained")) {
|
||||
pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eEASY);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PSX::PxCapsuleClimbingMode::eCONSTRAINED:
|
||||
if (GUI::Button("ClimbingMode : eConstrained")) {
|
||||
pController->setClimbingMode(PSX::PxCapsuleClimbingMode::eEASY);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used.");
|
||||
}
|
||||
GUIHelpMarker("A capsule is affected by its lower sphere and tends to generate an up vector on steps.\nIn eEASY, the up vector is combined with the step offset, allowing easier climbing; in eCONSTRAINED, the up vector is removed during step detection and only the step offset is used.");
|
||||
}
|
||||
}
|
||||
GUI::Text("%.1f", m_fCurrentSlopeDegree);
|
||||
GUI::Text("%.1f", m_fWalkableSlopeDegree); GUI::SameLine(); if (GUI::SliderFloat("m_fWalkableSlopeDegree", &m_fWalkableSlopeDegree, 0.0f, 90.f)) {
|
||||
m_pController->setSlopeLimit(cosf(XMConvertToRadians(m_fWalkableSlopeDegree)));
|
||||
}
|
||||
GUI::DragFloat("m_vAccHeight.w", &m_vAccHeight.w, 0.01f, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fGravity_Multiplier", &m_fGravity, 0.0f, 3.f);
|
||||
if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) {
|
||||
Modify_Volume(vVolume);
|
||||
}GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center.");
|
||||
GUI::Text("%.1f", m_fCurrentSlopeDegree);
|
||||
GUI::Text("%.1f", m_fWalkableSlopeDegree); GUI::SameLine(); if (GUI::SliderFloat("m_fWalkableSlopeDegree", &m_fWalkableSlopeDegree, 0.0f, 90.f)) {
|
||||
m_pController->setSlopeLimit(cosf(XMConvertToRadians(m_fWalkableSlopeDegree)));
|
||||
}
|
||||
GUI::DragFloat("m_vAccHeight.w", &m_vAccHeight.w, 0.01f, 0.f, 1.f);
|
||||
GUI::SliderFloat("m_fGravity_Multiplier", &m_fGravity, 0.0f, 3.f);
|
||||
if (GUI::SliderFloat3("Volume", (_float*)&vVolume, 0.1f, 10.f, "%.2f")) {
|
||||
Modify_Volume(vVolume);
|
||||
}GUIHelpMarker("Box uses vSize; Capsule uses x->fRadius, y->fHeight.\nThe capsule's fHeight is likely the distance from the lower sphere center to the upper sphere center.");
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -35,6 +35,7 @@ HRESULT CFog::Bind_FogValue(CShader* pShader)
|
||||
}
|
||||
#else
|
||||
pShader->Bind_RawValue("g_fFogDensity", &m_fFogDensity, sizeof(_float));
|
||||
pShader->Bind_RawValue("g_fFogPow", &m_fFogPow, sizeof(_float));
|
||||
pShader->Bind_RawValue("g_vFogColor", &m_vFogColor, sizeof(_float4));
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -44,11 +45,13 @@ HRESULT CFog::Bind_FogValue(CShader* pShader)
|
||||
#ifdef _DEBUG
|
||||
void CFog::Update_Fog()
|
||||
{
|
||||
GUI::Begin("Fog Edit");
|
||||
GUI::Checkbox("Fog ON / OFF", &m_bVisible);
|
||||
GUI::InputFloat("g_fFogDensity", &m_fFogDensity, 0.001f);
|
||||
GUI::InputFloat("g_fFogPow", &m_fFogPow, 0.1f);
|
||||
GUI::ColorEdit4("Fog Color", (_float*)(&m_vFogColor), ImGuiColorEditFlags_NoInputs);
|
||||
GUI::Begin("SYSTEM");
|
||||
if (GUI::CollapsingHeader("FOG")) {
|
||||
GUI::Checkbox("Fog ON / OFF", &m_bVisible);
|
||||
GUI::InputFloat("g_fFogDensity", &m_fFogDensity, 0.001f);
|
||||
GUI::InputFloat("g_fFogPow", &m_fFogPow, 0.1f);
|
||||
GUI::ColorEdit4("Fog Color", (_float*)(&m_vFogColor), ImGuiColorEditFlags_NoInputs);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -168,37 +168,39 @@ void CGameObject_Manager::Free()
|
||||
|
||||
void CGameObject_Manager::Describe_Entity()
|
||||
{
|
||||
ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar;
|
||||
GUI::Begin("Object_Manager");
|
||||
GUI::Text("Levels : "); GUI::SameLine();
|
||||
if (GUI::BeginTabBar("Levels")) {
|
||||
for (_uint i = 0; i < m_iNumLevels; ++i) {
|
||||
GUI::Begin("SYSTEM");
|
||||
if (GUI::CollapsingHeader("Object_Manager")) {
|
||||
ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar;
|
||||
GUI::Text("Levels : "); GUI::SameLine();
|
||||
if (GUI::BeginTabBar("Levels")) {
|
||||
for (_uint i = 0; i < m_iNumLevels; ++i) {
|
||||
|
||||
if (GUI::BeginTabItem(to_string(i).c_str(), nullptr)) { // Insert Here Level Names
|
||||
GUI::BeginChild("Object_Lists");
|
||||
if (GUI::BeginTabBar("Layers")) {
|
||||
string strlayerName;
|
||||
for (pair< const _wstring, CLayer*>& pairLayer : m_pLayers[i]) {
|
||||
size_t pos = pairLayer.first.find(TEXT("Layer_"));
|
||||
strlayerName = "NOT_STARTED_WITH_Layer_";
|
||||
if (pos != wstring::npos) {
|
||||
strlayerName = CMyTools::ToString(pairLayer.first.c_str() + pos + wcslen(TEXT("Layer_"))).c_str();
|
||||
}
|
||||
if (GUI::BeginTabItem(strlayerName.c_str(), nullptr)) {
|
||||
if (GUI::BeginChild("Items", ImVec2(0, 0), 0, window_flags)) {
|
||||
pairLayer.second->Describe_Entity();
|
||||
GUI::EndChild();
|
||||
if (GUI::BeginTabItem(to_string(i).c_str(), nullptr)) { // Insert Here Level Names
|
||||
GUI::BeginChild("Object_Lists");
|
||||
if (GUI::BeginTabBar("Layers")) {
|
||||
string strlayerName;
|
||||
for (pair< const _wstring, CLayer*>& pairLayer : m_pLayers[i]) {
|
||||
size_t pos = pairLayer.first.find(TEXT("Layer_"));
|
||||
strlayerName = "NOT_STARTED_WITH_Layer_";
|
||||
if (pos != wstring::npos) {
|
||||
strlayerName = CMyTools::ToString(pairLayer.first.c_str() + pos + wcslen(TEXT("Layer_"))).c_str();
|
||||
}
|
||||
if (GUI::BeginTabItem(strlayerName.c_str(), nullptr)) {
|
||||
if (GUI::BeginChild("Items", ImVec2(0, 0), 0, window_flags)) {
|
||||
pairLayer.second->Describe_Entity();
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
GUI::EndChild();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
GUI::EndChild();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -2015,7 +2015,6 @@ void CModel::Free()
|
||||
#ifdef _DEBUG
|
||||
void CModel::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Model_Desc");
|
||||
if (GUI::CollapsingHeader("ModelAnimations")) {
|
||||
for (_uint i = 0; i < m_iNumAnimations; ++i) {
|
||||
if (GUI::Button(m_Animations[i]->Get_Name().c_str())) {
|
||||
@@ -2056,7 +2055,6 @@ void CModel::Describe_Entity()
|
||||
CloseHandle(hFile);
|
||||
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -59,27 +59,6 @@ void CMouse_Manager::Update()
|
||||
}
|
||||
m_ptOldMouseCur = m_ptCurrentMouseCur;
|
||||
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Mouse_Manager");
|
||||
GUI::Text("AccumulateMomentum %f, %f", m_vMove.x, m_vMove.y);
|
||||
GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y);
|
||||
GUI::Text("Lock %d", m_bLockMouseToCenter);
|
||||
POINT pt = Get_MouseViewPortPos();
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
GUI::Text("IMGUI MousePos: %.1f, %.1f", io.MousePos.x, io.MousePos.y);
|
||||
//io.MousePos = ImVec2((float)pt.x, (float)pt.y);
|
||||
GUI::Text("VPPOS: %d, %d", pt.x, pt.y);
|
||||
pt = Get_MouseScreenPos();
|
||||
GUI::Text("SCPOS: %d, %d", pt.x, pt.y);
|
||||
|
||||
pt = Get_MouseViewPortPos();
|
||||
D3D11_VIEWPORT viewPort;
|
||||
_uint TargetViewPort = 1;
|
||||
m_pContext->RSGetViewports(&TargetViewPort, &viewPort);
|
||||
GUI::Text("INV_VPPOS: %f, %f", pt.x - (viewPort.Width * 0.5f), pt.y - (viewPort.Height * 0.5f));
|
||||
|
||||
GUI::End();
|
||||
#endif
|
||||
Picking();
|
||||
}
|
||||
else {
|
||||
@@ -87,6 +66,9 @@ void CMouse_Manager::Update()
|
||||
ZeroMemory(&m_ptCurrentMouseCur, sizeof(POINT));
|
||||
ZeroMemory(&m_ptOldMouseCur, sizeof(POINT));
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif
|
||||
}
|
||||
|
||||
POINT CMouse_Manager::Get_MouseViewPortPos()
|
||||
@@ -180,45 +162,6 @@ _bool CMouse_Manager::MousePicking_InWorldSpace(const _float3& vPointA, const _f
|
||||
return isCollision;
|
||||
}
|
||||
|
||||
//void CMouse_Manager::Mouse_Render()
|
||||
//{
|
||||
// RECT rc{}; GetClientRect(m_ghWnd, &rc);
|
||||
// const float cw = float(rc.right - rc.left);
|
||||
// const float ch = float(rc.bottom - rc.top);
|
||||
//
|
||||
// // 2) 뷰/프로젝션: 화면 좌상단(0,0) ~ (cw,ch), Y-다운
|
||||
// XMFLOAT4X4 view{}, proj{};
|
||||
// XMStoreFloat4x4(&view, XMMatrixIdentity());
|
||||
// XMStoreFloat4x4(&proj, XMMatrixOrthographicOffCenterLH(0.f, cw, ch, 0.f, 0.f, 1.f));
|
||||
//
|
||||
// // 3) 마우스 좌표 (클라이언트 좌표로 변환)
|
||||
// POINT pt{}; GetCursorPos(&pt); ScreenToClient(m_ghWnd, &pt);
|
||||
//
|
||||
// // 4) 월드 행렬: 30x30 스케일 + 위치(픽셀 센터 정렬: +0.5f)
|
||||
// XMFLOAT4X4 world{};
|
||||
// world._11 = 30.f; // width
|
||||
// world._22 = 30.f; // height
|
||||
// world._33 = 1.f; // keep
|
||||
// world._44 = 1.f; // keep
|
||||
// world._41 = floorf((float)pt.x) + 0.5f; // translation X (row-vector 규약)
|
||||
// world._42 = floorf((float)pt.y) + 0.5f; // translation Y
|
||||
//
|
||||
// // 5) 바인딩
|
||||
// m_pShader->Bind_Matrix("g_WorldMatrix", &world);
|
||||
// m_pShader->Bind_Matrix("g_ViewMatrix", &view);
|
||||
// m_pShader->Bind_Matrix("g_ProjMatrix", &proj);
|
||||
//
|
||||
// m_pShader->Bind_SRV("g_Texture", m_pMouseSRV);
|
||||
// m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(float));
|
||||
//
|
||||
// // 6) 상태 셋업(권장)
|
||||
// // - DepthTest OFF / DepthWrite OFF (UI)
|
||||
// // - AlphaBlend ON (필요시)
|
||||
// m_pShader->Begin(2);
|
||||
// m_pRect->Bind_Resources();
|
||||
// m_pRect->Render();
|
||||
//}
|
||||
|
||||
POINT CMouse_Manager::Get_ScreenCenterPos()
|
||||
{
|
||||
D3D11_VIEWPORT viewPort;
|
||||
@@ -257,3 +200,31 @@ void CMouse_Manager::Free()
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CMouse_Manager::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("SYSTEM");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Mouse_Manager")) {
|
||||
GUI::Text("AccumulateMomentum %.2f, %.2f", m_vMove.x, m_vMove.y);
|
||||
GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y);
|
||||
GUI::Text("Lock %d", m_bLockMouseToCenter);
|
||||
POINT pt = Get_MouseViewPortPos();
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
GUI::Text("IMGUI MousePos: %.1f, %.1f", io.MousePos.x, io.MousePos.y);
|
||||
//io.MousePos = ImVec2((float)pt.x, (float)pt.y);
|
||||
GUI::Text("VPPOS: %d, %d", pt.x, pt.y);
|
||||
pt = Get_MouseScreenPos();
|
||||
GUI::Text("SCPOS: %d, %d", pt.x, pt.y);
|
||||
|
||||
pt = Get_MouseViewPortPos();
|
||||
D3D11_VIEWPORT viewPort;
|
||||
_uint TargetViewPort = 1;
|
||||
m_pContext->RSGetViewports(&TargetViewPort, &viewPort);
|
||||
GUI::Text("INV_VPPOS: %.2f, %.2f", pt.x - (viewPort.Width * 0.5f), pt.y - (viewPort.Height * 0.5f));
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -37,9 +37,9 @@ void CRenderer::Render()
|
||||
Render_UI_Overley();
|
||||
|
||||
#ifdef _DEBUG
|
||||
static _bool m_bToggleDebug = false;
|
||||
Describe_Entitiy();
|
||||
m_pGameInstance->RenderTarget_Debuger();
|
||||
static _bool m_bToggleDebug = false;
|
||||
|
||||
if (m_pGameInstance->Key_Pressing(DIK_F10)) {
|
||||
Render_Debug();
|
||||
|
||||
@@ -508,57 +508,51 @@ void CRenderer::Free()
|
||||
#ifdef _DEBUG
|
||||
void CRenderer::Describe_Entitiy()
|
||||
{
|
||||
GUI::Begin("Renderer");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("PostProcessing_Bloom"))
|
||||
{
|
||||
GUI::BeginChild("PostProcessing_Bloom");
|
||||
GUI::Begin("SYSTEM");
|
||||
if (GUI::CollapsingHeader("RENDERER")) {
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f");
|
||||
GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d");
|
||||
GUI::PopItemWidth();
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("Environment DOF"))
|
||||
{
|
||||
GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true);
|
||||
GUI::PushItemWidth(80.0f);
|
||||
|
||||
GUI::Text("Far DOF (Environment)");
|
||||
GUI::Separator();
|
||||
|
||||
GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f");
|
||||
|
||||
GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f");
|
||||
|
||||
GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f");
|
||||
|
||||
GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f");
|
||||
|
||||
GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f");
|
||||
|
||||
if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) {
|
||||
m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance;
|
||||
if (GUI::CollapsingHeader("PostProcessing_Bloom"))
|
||||
{
|
||||
GUI::BeginChild("PostProcessing_Bloom");
|
||||
GUI::DragFloat("m_fBloomThreshold", &m_fBloomThreshold, 0.01f, 0.02f, 100.f, "%.3f");
|
||||
GUI::SliderInt("g_iEmbossingPass", &m_iBloomEmbossingPass, 0, 2, "%d");
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("Environment DOF"))
|
||||
{
|
||||
GUI::BeginChild("DOF_ENV", ImVec2(0, 0), true);
|
||||
|
||||
if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) {
|
||||
m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f;
|
||||
GUI::Text("Far DOF (Environment)");
|
||||
GUI::Separator();
|
||||
|
||||
GUI::DragFloat("Depth Cut", &m_fDOF_ENV_CutThreshold, 0.001f, 0.0f, 20.0f, "%.4f");
|
||||
GUI::DragFloat("Focus Dist", &m_fDOF_ENV_FocusDistance, 1.0f, 0.1f, 125.f, "%.1f");
|
||||
GUI::DragFloat("Blur Start", &m_fDOF_ENV_StartDistance, 1.0f, 0.1f, 250.f, "%.1f");
|
||||
GUI::DragFloat("Blur End", &m_fDOF_ENV_MaxEnd, 1.0f, 1.0f, 500.f, "%.1f");
|
||||
GUI::DragFloat("Max Radius", &m_fDOF_ENV_AmountRadius, 0.1f, 0.0f, 10.0f, "%.2f");
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (m_fDOF_ENV_StartDistance < m_fDOF_ENV_FocusDistance) {
|
||||
m_fDOF_ENV_StartDistance = m_fDOF_ENV_FocusDistance;
|
||||
}
|
||||
if (m_fDOF_ENV_MaxEnd < m_fDOF_ENV_StartDistance + 1.0f) {
|
||||
m_fDOF_ENV_MaxEnd = m_fDOF_ENV_StartDistance + 1.0f;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("SSAO")) {
|
||||
GUI::BeginChild("SSAO_Setting", ImVec2(0, 0), true);
|
||||
GUI::DragFloat("fSSAORadius ", &m_fSSAO_Radius, 0.001f, -3.f, 3.f, "%.5f");
|
||||
GUI::DragFloat("fSSAO_BIAS", &m_fSSAO_BIAS, 0.001f, -2.f, 2.f, "%.5f");
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("ToneMapping")) {
|
||||
GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true);
|
||||
GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d");
|
||||
GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f");
|
||||
GUI::EndChild();
|
||||
}
|
||||
|
||||
GUI::PopItemWidth();
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("ToneMapping")) {
|
||||
GUI::BeginChild("TONE_MAP", ImVec2(0, 0), true);
|
||||
GUI::SliderInt("m_iToneMappingType", &m_iToneMappingType, 0, 2, "%d");
|
||||
GUI::SliderFloat("m_fExposure", &m_fExposure, 0.5f, 2.f, "%.3f");
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("SSAO")) {
|
||||
GUI::BeginChild("SSAO_Setting", ImVec2(0, 0), true);
|
||||
GUI::DragFloat("fSSAORadius ", &m_fSSAO_Radius, 0.001f, -3.f, 3.f, "%.5f");
|
||||
GUI::DragFloat("fSSAO_BIAS", &m_fSSAO_BIAS, 0.001f, -2.f, 2.f, "%.5f");
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -141,72 +141,75 @@ void CResource_Manager::Free()
|
||||
|
||||
void CResource_Manager::Describe_Entity()
|
||||
{
|
||||
static vector<pair<_wstring, _uint>> vecHit = {};
|
||||
static vector<pair<_wstring, _uint>> vecMiss = {};
|
||||
GUI::Begin("ResourceManager");
|
||||
if (GUI::Button("Refresh")) {
|
||||
vecHit.clear();
|
||||
vecMiss.clear();
|
||||
for (auto& element : m_mapCacheHit){
|
||||
vecHit.emplace_back(element);
|
||||
}
|
||||
for (auto& element : m_mapCacheMiss){
|
||||
vecMiss.emplace_back(element);
|
||||
}
|
||||
sort(vecHit.begin(), vecHit.end(),
|
||||
[](const pair<_wstring, _uint>& leftPair,
|
||||
const pair<_wstring, _uint>& rightPair)
|
||||
{
|
||||
return leftPair.second > rightPair.second;
|
||||
});
|
||||
GUI::Begin("SYSTEM");
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("ResourceManager")) {
|
||||
static vector<pair<_wstring, _uint>> vecHit = {};
|
||||
static vector<pair<_wstring, _uint>> vecMiss = {};
|
||||
if (GUI::Button("Refresh")) {
|
||||
vecHit.clear();
|
||||
vecMiss.clear();
|
||||
for (auto& element : m_mapCacheHit) {
|
||||
vecHit.emplace_back(element);
|
||||
}
|
||||
for (auto& element : m_mapCacheMiss) {
|
||||
vecMiss.emplace_back(element);
|
||||
}
|
||||
sort(vecHit.begin(), vecHit.end(),
|
||||
[](const pair<_wstring, _uint>& leftPair,
|
||||
const pair<_wstring, _uint>& rightPair)
|
||||
{
|
||||
return leftPair.second > rightPair.second;
|
||||
});
|
||||
|
||||
sort(vecMiss.begin(), vecMiss.end(),
|
||||
[](const pair<_wstring, _uint>& leftPair,
|
||||
const pair<_wstring, _uint>& rightPair)
|
||||
{
|
||||
return leftPair.second > rightPair.second;
|
||||
});
|
||||
}
|
||||
if (GUI::CollapsingHeader("Statistics")) {
|
||||
_uint iTotalHitCount = 0;
|
||||
_uint iTotalMissCount = 0;
|
||||
sort(vecMiss.begin(), vecMiss.end(),
|
||||
[](const pair<_wstring, _uint>& leftPair,
|
||||
const pair<_wstring, _uint>& rightPair)
|
||||
{
|
||||
return leftPair.second > rightPair.second;
|
||||
});
|
||||
}
|
||||
if (GUI::CollapsingHeader("Statistics")) {
|
||||
_uint iTotalHitCount = 0;
|
||||
_uint iTotalMissCount = 0;
|
||||
|
||||
for (const auto& element : m_mapCacheHit) {
|
||||
iTotalHitCount += element.second;
|
||||
}
|
||||
for (const auto& element : m_mapCacheMiss) {
|
||||
iTotalMissCount += element.second;
|
||||
}
|
||||
_uint iTotalRequestCount = iTotalHitCount + iTotalMissCount;
|
||||
for (const auto& element : m_mapCacheHit) {
|
||||
iTotalHitCount += element.second;
|
||||
}
|
||||
for (const auto& element : m_mapCacheMiss) {
|
||||
iTotalMissCount += element.second;
|
||||
}
|
||||
_uint iTotalRequestCount = iTotalHitCount + iTotalMissCount;
|
||||
|
||||
_float fHitRatePercent = 0.0f;
|
||||
if (iTotalRequestCount > 0) {
|
||||
fHitRatePercent = (_float)iTotalHitCount * 100.0f / (_float)iTotalRequestCount;
|
||||
}
|
||||
_float fHitRatePercent = 0.0f;
|
||||
if (iTotalRequestCount > 0) {
|
||||
fHitRatePercent = (_float)iTotalHitCount * 100.0f / (_float)iTotalRequestCount;
|
||||
}
|
||||
|
||||
GUI::Text("Total Requests: %u", iTotalRequestCount);
|
||||
GUI::Text("Hit: %u Miss: %u HitRate: %.2f%%", iTotalHitCount, iTotalMissCount, fHitRatePercent);
|
||||
GUI::Text("Total Requests: %u", iTotalRequestCount);
|
||||
GUI::Text("Hit: %u Miss: %u HitRate: %.2f%%", iTotalHitCount, iTotalMissCount, fHitRatePercent);
|
||||
|
||||
}
|
||||
if (GUI::CollapsingHeader("CacheHit")) {
|
||||
GUI::Text("%d", vecHit.size());
|
||||
GUI::BeginChild("CacheHit", { 300, 300 });
|
||||
GUI::GetScrollY();
|
||||
for (auto& element : vecHit) {
|
||||
GUI::Text("%d", element.second); GUI::SameLine();
|
||||
GUI::Text(CMyTools::ToString(element.first).c_str());
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("CacheMiss")) {
|
||||
GUI::Text("%d", vecMiss.size());
|
||||
GUI::BeginChild("CacheMiss", { 300, 300 });
|
||||
GUI::GetScrollY();
|
||||
for (auto& element : vecMiss) {
|
||||
GUI::Text("%d", element.second); GUI::SameLine();
|
||||
GUI::Text(CMyTools::ToString(element.first).c_str());
|
||||
if (GUI::CollapsingHeader("CacheHit")) {
|
||||
GUI::Text("%d", vecHit.size());
|
||||
GUI::BeginChild("CacheHit", { 300, 300 });
|
||||
GUI::GetScrollY();
|
||||
for (auto& element : vecHit) {
|
||||
GUI::Text("%d", element.second); GUI::SameLine();
|
||||
GUI::Text(CMyTools::ToString(element.first).c_str());
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
if (GUI::CollapsingHeader("CacheMiss")) {
|
||||
GUI::Text("%d", vecMiss.size());
|
||||
GUI::BeginChild("CacheMiss", { 300, 300 });
|
||||
GUI::GetScrollY();
|
||||
for (auto& element : vecMiss) {
|
||||
GUI::Text("%d", element.second); GUI::SameLine();
|
||||
GUI::Text(CMyTools::ToString(element.first).c_str());
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -350,12 +350,12 @@ void CTrail::Free()
|
||||
|
||||
void CTrail::Describe_Entity()
|
||||
{
|
||||
|
||||
|
||||
GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow);
|
||||
GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh);
|
||||
|
||||
|
||||
GUI::Begin("EFFECT");
|
||||
if (GUI::CollapsingHeader("CTrail")) {
|
||||
GUI::InputFloat3("Low", (_float*)&m_TrailDesc.vLow);
|
||||
GUI::InputFloat3("High", (_float*)&m_TrailDesc.vHigh);
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -55,6 +55,11 @@ class ENGINE_DLL CMouse_Manager final : public CBase
|
||||
public:
|
||||
static CMouse_Manager* Create(HWND _g_hWnd, ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity();
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
NS_END
|
||||
|
||||
|
||||
@@ -53,17 +53,20 @@ class CRenderer final : public CBase
|
||||
_int m_iToneMappingType = { 2 };
|
||||
_float m_fExposure = { 0.7f };
|
||||
|
||||
// Bloom
|
||||
_int m_iBloomEmbossingPass = { 0 };
|
||||
_float m_fBloomThreshold = { 1.26f };
|
||||
|
||||
|
||||
// DOF Environment
|
||||
_float m_fDOF_ENV_CutThreshold = { 0.1350f };
|
||||
_float m_fDOF_ENV_FocusDistance = { 31.1f };
|
||||
_float m_fDOF_ENV_StartDistance = { 53.1f };
|
||||
_float m_fDOF_ENV_MaxEnd = { 360.f };
|
||||
_float m_fDOF_ENV_AmountRadius = { 1.f };
|
||||
|
||||
_float m_fSSAO_Radius = { 0.812f };
|
||||
_float m_fSSAO_BIAS = { 0.042f };
|
||||
// SSAO
|
||||
_float m_fSSAO_Radius = { 1.6300f };
|
||||
_float m_fSSAO_BIAS = { 0.234f };
|
||||
|
||||
SSAO_GEOMETRY_HEMISPHERE m_tagSSAOGeometry = {};
|
||||
SSAO_GEOMETRYDIRECTIONS_RANDOM_REAL m_tagSSAOGeometryDirections = {};
|
||||
|
||||
Reference in New Issue
Block a user