[add] Joint RealTimeDebugger
[add] RendererTimer Begin
This commit is contained in:
@@ -396,7 +396,7 @@ void CGameInstance::Compute_FrameCount()
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameInstance::Present_TimeCost() const
|
||||
void CGameInstance::Present_TimeCost()
|
||||
{
|
||||
#pragma region TimeCost
|
||||
#ifdef _DEBUG
|
||||
@@ -444,138 +444,148 @@ void CGameInstance::Present_TimeCost() const
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Level %d", int(m_fTimer_Level / fTotal * 100.f));
|
||||
}
|
||||
if (GUI::IsPopupOpen("Renderer_Timer"))
|
||||
if (GUI::Button("Renderer_Timer"))
|
||||
{
|
||||
if (GUI::BeginPopup("Renderer_Timer")) {
|
||||
_float fRenderer_Total = m_fTimer_Render_Priority
|
||||
+ m_fTimer_Render_Shadow
|
||||
+ m_fTimer_Render_NonBlend
|
||||
+ m_fTimer_Render_SSAO
|
||||
+ m_fTimer_Render_SSAO_BLUR
|
||||
+ m_fTimer_Render_LightAcc
|
||||
+ m_fTimer_Render_Blur
|
||||
+ m_fTimer_Render_Combined
|
||||
+ m_fTimer_Render_Occlusion
|
||||
+ m_fTimer_Render_EnvironmentPostProcess
|
||||
+ m_fTimer_Render_Fog
|
||||
+ m_fTimer_Render_Effect
|
||||
+ m_fTimer_Render_NonLight
|
||||
+ m_fTimer_Render_Blend
|
||||
+ m_fTimer_Render_WeightBlend
|
||||
+ m_fTimer_Render_PostProcessing
|
||||
+ m_fTimer_Render_LastColor
|
||||
+ m_fTimer_Render_Tone_Mapping
|
||||
+ m_fTimer_Render_UI
|
||||
+ m_fTimer_Render_UI_Overley;
|
||||
m_bRendererTimerOpen = !m_bRendererTimerOpen;
|
||||
}
|
||||
if (m_bRendererTimerOpen)
|
||||
{
|
||||
GUI::SetNextWindowSize(ImVec2(320.f, 0.f), ImGuiCond_FirstUseEver);
|
||||
|
||||
if (GUI::Begin("Renderer_Timer", &m_bRendererTimerOpen, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Priority / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Priority %d", int(m_fTimer_Render_Priority / fRenderer_Total * 100.f));
|
||||
_float fRenderer_Total = m_fTimer_Render_Priority
|
||||
+ m_fTimer_Render_Shadow
|
||||
+ m_fTimer_Render_NonBlend
|
||||
+ m_fTimer_Render_SSAO
|
||||
+ m_fTimer_Render_SSAO_BLUR
|
||||
+ m_fTimer_Render_LightAcc
|
||||
+ m_fTimer_Render_Blur
|
||||
+ m_fTimer_Render_Combined
|
||||
+ m_fTimer_Render_Occlusion
|
||||
+ m_fTimer_Render_EnvironmentPostProcess
|
||||
+ m_fTimer_Render_Fog
|
||||
+ m_fTimer_Render_Effect
|
||||
+ m_fTimer_Render_NonLight
|
||||
+ m_fTimer_Render_Blend
|
||||
+ m_fTimer_Render_WeightBlend
|
||||
+ m_fTimer_Render_PostProcessing
|
||||
+ m_fTimer_Render_LastColor
|
||||
+ m_fTimer_Render_Tone_Mapping
|
||||
+ m_fTimer_Render_UI
|
||||
+ m_fTimer_Render_UI_Overley;
|
||||
|
||||
// 0으로 나눔 방지
|
||||
if (fRenderer_Total <= FLT_EPSILON)
|
||||
fRenderer_Total = 1.f;
|
||||
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Priority / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Priority %d", int(m_fTimer_Render_Priority / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Shadow / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Shadow %d", int(m_fTimer_Render_Shadow / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonBlend %d", int(m_fTimer_Render_NonBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO %d", int(m_fTimer_Render_SSAO / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO_BLUR / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO_BLUR %d", int(m_fTimer_Render_SSAO_BLUR / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LightAcc / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LightAcc %d", int(m_fTimer_Render_LightAcc / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blur / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blur %d", int(m_fTimer_Render_Blur / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Combined / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Combined %d", int(m_fTimer_Render_Combined / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Occlusion / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Occlusion %d", int(m_fTimer_Render_Occlusion / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_EnvironmentPostProcess %d", int(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Fog / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Fog %d", int(m_fTimer_Render_Fog / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Effect / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Effect %d", int(m_fTimer_Render_Effect / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonLight / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonLight %d", int(m_fTimer_Render_NonLight / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blend %d", int(m_fTimer_Render_Blend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_WeightBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_WeightBlend %d", int(m_fTimer_Render_WeightBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_PostProcessing / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_PostProcessing %d", int(m_fTimer_Render_PostProcessing / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LastColor / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LastColor %d", int(m_fTimer_Render_LastColor / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Tone_Mapping / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Tone_Mapping %d", int(m_fTimer_Render_Tone_Mapping / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI %d", int(m_fTimer_Render_UI / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI_Overley / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI_Overley %d", int(m_fTimer_Render_UI_Overley / fRenderer_Total * 100.f));
|
||||
}
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Shadow / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Shadow %d", int(m_fTimer_Render_Shadow / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonBlend %d", int(m_fTimer_Render_NonBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO %d", int(m_fTimer_Render_SSAO / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO_BLUR / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO_BLUR %d", int(m_fTimer_Render_SSAO_BLUR / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LightAcc / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LightAcc %d", int(m_fTimer_Render_LightAcc / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blur / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blur %d", int(m_fTimer_Render_Blur / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Combined / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Combined %d", int(m_fTimer_Render_Combined / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Occlusion / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Occlusion %d", int(m_fTimer_Render_Occlusion / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_EnvironmentPostProcess %d", int(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Fog / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Fog %d", int(m_fTimer_Render_Fog / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Effect / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Effect %d", int(m_fTimer_Render_Effect / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonLight / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonLight %d", int(m_fTimer_Render_NonLight / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blend %d", int(m_fTimer_Render_Blend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_WeightBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_WeightBlend %d", int(m_fTimer_Render_WeightBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_PostProcessing / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_PostProcessing %d", int(m_fTimer_Render_PostProcessing / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LastColor / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LastColor %d", int(m_fTimer_Render_LastColor / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Tone_Mapping / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Tone_Mapping %d", int(m_fTimer_Render_Tone_Mapping / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI %d", int(m_fTimer_Render_UI / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI_Overley / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI_Overley %d", int(m_fTimer_Render_UI_Overley / fRenderer_Total * 100.f));
|
||||
}
|
||||
GUI::EndPopup();
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine();
|
||||
if (GUI::SmallButton("Renderer_Timer")) {
|
||||
GUI::OpenPopup("Renderer_Timer");
|
||||
}
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("DrawCall %d", int(m_fTimer_DrawCall / fTotal * 100.f));
|
||||
}
|
||||
|
||||
@@ -390,9 +390,185 @@ typedef struct tagPHYSX_USERDATA {
|
||||
|
||||
}PHYSX_USERDATA;
|
||||
|
||||
typedef struct tagD6JointDesc {
|
||||
typedef struct tagD6JointDesc
|
||||
{ // 0: Locked
|
||||
// 1: Limited
|
||||
// 2: Free
|
||||
int iMotionX = 0;
|
||||
int iMotionY = 0;
|
||||
int iMotionZ = 0;
|
||||
int iMotionTwist = 0;
|
||||
int iMotionSwing1 = 0;
|
||||
int iMotionSwing2 = 0;
|
||||
|
||||
float fLinearLimit = 0.f;
|
||||
float fSwingDeg = 0.f;
|
||||
float fTwistAbsDeg = 0.f;
|
||||
|
||||
bool bEnableSlerpDrive = false;
|
||||
float fSlerpStiffness = 0.f;
|
||||
float fSlerpDamping = 0.f;
|
||||
float fSlerpForceLimit = 0.f;
|
||||
bool bSlerpAccel = false;
|
||||
|
||||
bool bEnableLinearDrive = false;
|
||||
float fLinearStiffness = 0.f;
|
||||
float fLinearDamping = 0.f;
|
||||
float fLinearForceLimit = 0.f;
|
||||
bool bLinearAccel = false;
|
||||
|
||||
tagD6JointDesc() {
|
||||
iMotionX = 0;
|
||||
iMotionY = 0;
|
||||
iMotionZ = 0;
|
||||
iMotionTwist = 0;
|
||||
iMotionSwing1 = 0;
|
||||
iMotionSwing2 = 0;
|
||||
fLinearLimit = 0.f;
|
||||
fSwingDeg = 0.f;
|
||||
fTwistAbsDeg = 0.f;
|
||||
bEnableSlerpDrive = false;
|
||||
fSlerpStiffness = 0.f;
|
||||
fSlerpForceLimit = 0.f;
|
||||
fSlerpDamping = 0.f;
|
||||
bSlerpAccel = false;
|
||||
bEnableLinearDrive = false;
|
||||
fLinearStiffness = 0.f;
|
||||
fLinearDamping = 0.f;
|
||||
bLinearAccel = false;
|
||||
}
|
||||
|
||||
static int MotionToIndex(PSX::PxD6Motion::Enum motion)
|
||||
{
|
||||
if (motion == PSX::PxD6Motion::eLOCKED) return 0;
|
||||
if (motion == PSX::PxD6Motion::eLIMITED) return 1;
|
||||
return 2; // eFREE
|
||||
}
|
||||
|
||||
static PSX::PxD6Motion::Enum IndexToMotion(int index)
|
||||
{
|
||||
return (index == 0) ? PSX::PxD6Motion::eLOCKED :
|
||||
(index == 1) ? PSX::PxD6Motion::eLIMITED :
|
||||
PSX::PxD6Motion::eFREE;
|
||||
}
|
||||
|
||||
static bool HasAccelFlag(const PSX::PxD6JointDrive& drive)
|
||||
{
|
||||
return (drive.flags & PSX::PxD6JointDriveFlag::eACCELERATION) != 0;
|
||||
}
|
||||
|
||||
static PSX::PxD6JointDrive MakeDrive(float stiffness, float damping, float forceLimit, bool accel)
|
||||
{
|
||||
PSX::PxD6JointDrive drive(stiffness, damping, forceLimit, accel);
|
||||
return drive;
|
||||
}
|
||||
|
||||
void InitFromJoint(const PSX::PxD6Joint& joint)
|
||||
{
|
||||
iMotionX = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eX));
|
||||
iMotionY = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eY));
|
||||
iMotionZ = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eZ));
|
||||
iMotionTwist = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eTWIST));
|
||||
iMotionSwing1 = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eSWING1));
|
||||
iMotionSwing2 = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eSWING2));
|
||||
|
||||
{
|
||||
PSX::PxJointLinearLimit pxLimit = joint.getLinearLimit();
|
||||
fLinearLimit = pxLimit.value;
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxJointLimitCone pxSwing = joint.getSwingLimit();
|
||||
fSwingDeg = XMConvertToDegrees(pxSwing.yAngle); // 대칭 cone 기준
|
||||
|
||||
PSX::PxJointAngularLimitPair pxTwist = joint.getTwistLimit();
|
||||
const float fAbsRad = PSX::PxMax(PSX::PxAbs(pxTwist.lower), PSX::PxAbs(pxTwist.upper));
|
||||
fTwistAbsDeg = XMConvertToDegrees(fAbsRad);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxD6JointDrive pxDrive = joint.getDrive(PSX::PxD6Drive::eSLERP);
|
||||
bEnableSlerpDrive = (pxDrive.stiffness > 0.f) || (pxDrive.damping > 0.f) || (pxDrive.forceLimit > 0.f);
|
||||
fSlerpStiffness = pxDrive.stiffness;
|
||||
fSlerpDamping = pxDrive.damping;
|
||||
fSlerpForceLimit = pxDrive.forceLimit;
|
||||
bSlerpAccel = HasAccelFlag(pxDrive);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxD6JointDrive pxDriveX = joint.getDrive(PSX::PxD6Drive::eX);
|
||||
bEnableLinearDrive = (pxDriveX.stiffness > 0.f) || (pxDriveX.damping > 0.f) || (pxDriveX.forceLimit > 0.f);
|
||||
fLinearStiffness = pxDriveX.stiffness;
|
||||
fLinearDamping = pxDriveX.damping;
|
||||
fLinearForceLimit = pxDriveX.forceLimit;
|
||||
bLinearAccel = HasAccelFlag(pxDriveX);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyToJoint(PSX::PxD6Joint& joint) const
|
||||
{
|
||||
joint.setMotion(PSX::PxD6Axis::eX, IndexToMotion(iMotionX));
|
||||
joint.setMotion(PSX::PxD6Axis::eY, IndexToMotion(iMotionY));
|
||||
joint.setMotion(PSX::PxD6Axis::eZ, IndexToMotion(iMotionZ));
|
||||
joint.setMotion(PSX::PxD6Axis::eTWIST, IndexToMotion(iMotionTwist));
|
||||
joint.setMotion(PSX::PxD6Axis::eSWING1, IndexToMotion(iMotionSwing1));
|
||||
joint.setMotion(PSX::PxD6Axis::eSWING2, IndexToMotion(iMotionSwing2));
|
||||
|
||||
{
|
||||
PSX::PxJointLinearLimit pxLimit = joint.getLinearLimit();
|
||||
pxLimit.value = PSX::PxMax(0.f, fLinearLimit);
|
||||
joint.setLinearLimit(pxLimit);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxJointLimitCone pxSwing = joint.getSwingLimit();
|
||||
const float swingRad = XMConvertToRadians(PSX::PxClamp(fSwingDeg, 0.f, 180.f));
|
||||
pxSwing.yAngle = swingRad;
|
||||
pxSwing.zAngle = swingRad;
|
||||
joint.setSwingLimit(pxSwing);
|
||||
}
|
||||
{
|
||||
PSX::PxJointAngularLimitPair pxTwist = joint.getTwistLimit();
|
||||
const float twistRad = XMConvertToRadians(PSX::PxClamp(fTwistAbsDeg, FLT_EPSILON, 180.f));
|
||||
pxTwist.lower = -twistRad;
|
||||
pxTwist.upper = +twistRad;
|
||||
|
||||
joint.setTwistLimit(pxTwist);
|
||||
}
|
||||
|
||||
if (!bEnableSlerpDrive)
|
||||
{
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, MakeDrive(0.f, 0.f, 0.f, bSlerpAccel));
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, MakeDrive(fSlerpStiffness, fSlerpDamping, fSlerpForceLimit, bSlerpAccel));
|
||||
}
|
||||
|
||||
if (!bEnableLinearDrive)
|
||||
{
|
||||
const PSX::PxD6JointDrive off = MakeDrive(0.f, 0.f, 0.f, bLinearAccel);
|
||||
joint.setDrive(PSX::PxD6Drive::eX, off);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, off);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, off);
|
||||
}
|
||||
else
|
||||
{
|
||||
const PSX::PxD6JointDrive on = MakeDrive(fLinearStiffness, fLinearDamping, fLinearForceLimit, bLinearAccel);
|
||||
joint.setDrive(PSX::PxD6Drive::eX, on);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, on);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, on);
|
||||
}
|
||||
}
|
||||
}D6JOINTDESC;
|
||||
|
||||
static D6JOINTDESC MakeD6JointUIState(const PSX::PxD6Joint& joint)
|
||||
{
|
||||
D6JOINTDESC state;
|
||||
state.InitFromJoint(joint);
|
||||
return state;
|
||||
}
|
||||
|
||||
}PHYSX_JOINT_D6Desc;
|
||||
|
||||
typedef struct tagOnCollsionInfo
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Add_Timer(const _wstring& strTimerTag);
|
||||
void Compute_TimeDelta(const _wstring& strTimerTag);
|
||||
void Compute_FrameCount();
|
||||
void Present_TimeCost() const;
|
||||
void Present_TimeCost() ;
|
||||
#pragma endregion
|
||||
|
||||
#pragma region LEVEL_MANAGER
|
||||
@@ -331,6 +331,8 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fSlowIntense = {};
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_bool m_bRendererTimerOpen = false;
|
||||
|
||||
_float m_fTimer_PriorityUpdate = { 0.f };
|
||||
_float m_fTimer_Update = { 0.f };
|
||||
_float m_fTimer_LateUpdate = { 0.f };
|
||||
@@ -362,6 +364,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fTimer_Render_UI = { 0.f };
|
||||
_float m_fTimer_Render_UI_Overley = { 0.f };
|
||||
|
||||
|
||||
vector<const _char*> m_FilePaths = {};
|
||||
map<const _char*, CModel*> m_ModelMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user