• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão71e78f98e1041a3599830f4aa961de070971ee98 (tree)
Hora2011-01-07 10:43:02
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Mensagem de Log

rotate molecule are implemented a little.

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@45 1136aad2-a195-0410-b898-f5ea1d11b9d8

Mudança Sumário

Diff

--- a/src/base/Molecule.h
+++ b/src/base/Molecule.h
@@ -30,6 +30,7 @@ public:
3030 void SetInertiaTensorOrigin(double x, double y, double z);
3131 void CalcPrincipalAxes();
3232 void Rotate();
33+ void Rotate(EularAngle eularAngle);
3334 void SetRotatingOrigin(double x, double y, double z);
3435 void SetRotatingAxis(double x, double y, double z);
3536 void SetRotatingAngle(double angle);
@@ -478,6 +479,7 @@ void Molecule::Rotate(){
478479
479480 cout << this->messageStartRotate;
480481
482+ // Default values are set if some conditions are not specified.
481483 if(this->rotatingOrigin == NULL){
482484 if(!this->wasCalculatedCOMXyz){
483485 this->CalcCOMXyz();
@@ -485,21 +487,30 @@ void Molecule::Rotate(){
485487 this->SetRotatingOrigin(this->COMXyz[0], this->COMXyz[1], this->COMXyz[2]);
486488 }
487489
488- if(this->rotatingAxis == NULL){
490+ if(this->rotatingType == Axis && this->rotatingAxis == NULL){
489491 this->SetRotatingAxis(0.0, 0.0, 1.0);
490492 }
491493
492- if(this->rotatingEularAngles == NULL){
494+ if(this->rotatingType == Eular && this->rotatingEularAngles == NULL){
493495 this->SetRotatingEularAngles(0.0, 0.0, 0.0);
494496 }
495497
496498 this->OutputRotatingConditions();
497499
498- // ToDo: rotate
500+ // rotate
501+ if(this->rotatingType == Axis){
502+ }
503+ else if(this->rotatingType == Eular){
504+ this->Rotate(*this->rotatingEularAngles);
505+ }
499506
500507 cout << this->messageDoneRotate;
501508 }
502509
510+void Molecule::Rotate(EularAngle eularAngle){
511+ // ToDo: rotate
512+}
513+
503514 void Molecule::OutputRotatingConditions(){
504515
505516 double angst2AU = Parameters::GetInstance()->GetAngstrom2AU();