本文整理汇总了C++中Skeleton::getRightSeatFrontForce方法的典型用法代码示例。如果您正苦于以下问题:C++ Skeleton::getRightSeatFrontForce方法的具体用法?C++ Skeleton::getRightSeatFrontForce怎么用?C++ Skeleton::getRightSeatFrontForce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skeleton
的用法示例。
在下文中一共展示了Skeleton::getRightSeatFrontForce方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnUpdate
void ReportJointForces::OnUpdate(CView* aSenderPtr,LPARAM aHint,CObject* aHintPtr)
{
C_Hom_Doc* lDocPtr = (C_Hom_Doc*)GetDocument();
//Analysis& lResults = lDocPtr->getResultsRef();
// Determine which data members are relevant to the current posture
BOOL enableHips = TRUE;
BOOL enableFront = TRUE;
BOOL enableBack = TRUE;
if(lDocPtr->getPosition() == P_Standing)
enableHips = FALSE;
if((lDocPtr->getPosition() == P_Standing) || !lDocPtr->hasFrontSeatPanSupport()) // Not seated or front not supported
enableFront = FALSE;
if((lDocPtr->getPosition() == P_Standing) || !lDocPtr->hasSeatBackRest()) // Not seated or no seat back
enableBack = FALSE;
mForceUnits = CString("Force (") + lDocPtr->ForceUnits() + ") -- Due to Body Weight and External Applied Loads";
// Retrieve joint force analysis results
Vector3 forces[NUM_JOINTS];
lDocPtr->GetSkeleton()->getNetForces(forces);
for(int i = 0; i < NUM_JOINTS; ++i) { // *****34 must be replaced by NUM_JOINTS once the locations of hand joints are being handled properly*****
if(jointToMember[i]) {
for(int j = 0; j < 3; ++j) {
jointToMember[i][j].Format("%.1f", forces[i] [j]);
if(jointToMember[i][j] == "-0.0")
jointToMember[i][j].Format("0.0");
}
}
}
Skeleton* skel = lDocPtr->GetSkeleton();
// L4L5 forces
const SpinalForces_s& spinalForces = skel->getSpinalForces();
mL4L5Force[0].Format("%.1f", spinalForces.globalL4L5NoAbdom[0]);
mL4L5Force[1].Format("%.1f", spinalForces.globalL4L5NoAbdom[1]);
mL4L5Force[2].Format("%.1f", spinalForces.globalL4L5NoAbdom[2]);
// Set any irrelevant data to dashes
if(!enableBack) {
mSeatBack[1] = mSeatBack[2] = "---";
} else {
Vector3 seatBackForce = skel->getSeatBackForce();
for(int i = 0; i < 3; i++) {
// force applied to the seat back is negative of the value we calculated,
// which was the force applied to the back by the seat back
mSeatBack[i].Format("%.1f", -seatBackForce[i]);
if(mSeatBack[i] == "-0.0")
mSeatBack[i].Format("0.0");
}
}
if(!enableHips) {
mLeftIT[0] = mLeftIT[1] = mLeftIT[2] = "---";
mRightIT[0] = mRightIT[1] = mRightIT[2] = "---";
}
if(!enableFront) {
mSeatFrontRight[0] = mSeatFrontRight[1] = mSeatFrontRight[2] = "---";
mSeatFrontLeft[0] = mSeatFrontLeft[1] = mSeatFrontLeft[2] = "---";
} else {
Vector3 frontRightForce = skel->getRightSeatFrontForce();
Vector3 frontLeftForce = skel->getLeftSeatFrontForce();
for(int i = 0; i < 3; i++) {
mSeatFrontRight[i].Format("%.1f",frontRightForce[i]);
if(mSeatFrontRight[i] == "-0.0")
mSeatFrontRight[i].Format("0.0");
mSeatFrontLeft[i].Format("%.1f",frontLeftForce[i]);
if(mSeatFrontLeft[i] == "-0.0")
mSeatFrontLeft[i] = "0.0";
}
}
// Gray-out any irrelevent data
this->GetDlgItem(IDC_LeftITX)->EnableWindow(enableHips);
this->GetDlgItem(IDC_LeftITY)->EnableWindow(enableHips);
this->GetDlgItem(IDC_LeftITZ)->EnableWindow(enableHips);
this->GetDlgItem(IDC_RightITX)->EnableWindow(enableHips);
this->GetDlgItem(IDC_RightITY)->EnableWindow(enableHips);
this->GetDlgItem(IDC_RightITZ)->EnableWindow(enableHips);
this->GetDlgItem(IDC_SeatFrontRightX)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatFrontRightY)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatFrontRightZ)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatFrontLeftX)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatFrontLeftY)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatFrontLeftZ)->EnableWindow(enableFront);
this->GetDlgItem(IDC_SeatBackY)->EnableWindow(enableBack);
this->GetDlgItem(IDC_SeatBackZ)->EnableWindow(enableBack);
mHeader = lDocPtr->ReportHeader();
mFooter = lDocPtr->ReportFooter();
UpdateData(FALSE);
UpdateUnits();
Skeleton &lSkeleton = *lDocPtr->GetSkeleton();
mHandForceTxtLVal.Format("%.1f", lSkeleton.getExtForce(JT_LHAND).length());
mHandForceTxtRVal.Format("%.1f", lSkeleton.getExtForce(JT_RHAND).length());
//.........这里部分代码省略.........