📄 part.cpp
字号:
// part.cpp: implementation of the Cpart class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "OpenGLtest.h"
#include "part.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
/*Cpart::Cpart()
{
}*/
Cpart::~Cpart()
{
}
CVector Cpart::CTranslateLbc(CVector Lbc,double alpha)
{
Lbc=RZb.RotationZ(alpha)*Lbc;
return Lbc;
}
CVector Cpart::CTranslateLcd(CVector Lcd,double alpha)
{
Lcd=RZb.RotationZ(alpha)*Lcd;
return Lcd;
}
CVector Cpart::CTranslateLde(CVector Lde,double alpha)
{
Lde=RZb.RotationZ(alpha)*Lde;
return Lde;
}
CVector Cpart:: CTranslateA(CVector Pa,CVector Tx,CVector Ty)//じンA
{
Pa= Pa +Tx+Ty;
return Pa;
}
CVector Cpart::CTranslateB(CVector Pb,CVector Tx,CVector Ty,double alpha,CVector Lab)//じンB
{
Pb = RZb.RotationZ(alpha) * Pb + Lab +Tx +Ty;
return Pb;
}
CVector Cpart::CTranslateC(CVector Pc,CVector Tx,CVector Ty,double alpha,double beta,CVector Lab,CVector Lbc)//じンC
{
Pc = RZb.RotationZ(alpha) * ( RYc.RotationY(beta)*Pc+Lbc ) + Lab +Tx +Ty;
return Pc;
}
CVector Cpart::CTranslateD(CVector Pd,CVector T,CVector Tx,CVector Ty,double alpha,double beta,CVector Lab,CVector Lbc,CVector Lcd)//じンD
{
Pd = RZb.RotationZ(alpha) * ( RYc.RotationY(beta)*(Pd+T+Lcd)+Lbc ) + Lab +Tx +Ty;
return Pd;
}
CVector Cpart::CTranslateE(CVector Pe,CVector T,CVector Tx,CVector Ty,double alpha,double beta,double gamma,CVector Lab,CVector Lbc,CVector Lcd, CVector Lde)//じンE
{
Pe = RZb.RotationZ(alpha) * ( RYc.RotationY(beta)*(RXe.RotationX(gamma)*Pe+Lde+T+Lcd) + Lbc ) + Lab +Tx +Ty;
return Pe;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -