Changeset 114
- Timestamp:
- 01/26/14 05:53:23 (11 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/model.cpp
r109 r114 594 594 { 595 595 addJoint(j); 596 if (j->d.x < (JOINT_DELTA_MARKER-1.0)) 596 if ((j->d.x != JOINT_DELTA_MARKER) || (j->d.y != JOINT_DELTA_MARKER) || (j->d.z != JOINT_DELTA_MARKER)) 597 { 597 598 j->useDelta(1); 599 j->resetDeltaMarkers(); 600 } 598 601 j->attachToParts(j->p1_refno,j->p2_refno); 599 602 if (srcrange) j->setMapping(*srcrange); … … 914 917 j->part2->mass+=1.0; 915 918 } 916 if ((j->usedelta)&&( j->d.x < (JOINT_DELTA_MARKER-1.0)))919 if ((j->usedelta)&&((j->d.x!=JOINT_DELTA_MARKER)||(j->d.y!=JOINT_DELTA_MARKER)||(j->d.z!=JOINT_DELTA_MARKER))) 917 920 { // delta positioning -> calc. orient. 918 921 if (j->part2->flags & LINKFLAG) … … 923 926 i,(const char*)geno.getName()); 924 927 } 928 j->resetDeltaMarkers(); 925 929 j->o=j->rot; 926 930 j->part1->o.transform(j->part2->o,j->o); -
cpp/frams/model/modelparts.cpp
r109 r114 696 696 defassign(); 697 697 d.x=JOINT_DELTA_MARKER; 698 d.y=JOINT_DELTA_MARKER; 699 d.z=JOINT_DELTA_MARKER; 698 700 part1=0; part2=0; 699 701 flags=0; … … 736 738 void Joint::resetDelta() 737 739 { 738 d=Pt3D(JOINT_DELTA_MARKER,0,0); 739 } 740 741 void Joint::useDelta(int false_or_true) 742 { 743 usedelta=false_or_true; 744 } 745 746 int Joint::isDelta() 740 d=Pt3D(JOINT_DELTA_MARKER,JOINT_DELTA_MARKER,JOINT_DELTA_MARKER); 741 } 742 743 void Joint::resetDeltaMarkers() 744 { 745 if (d.x==JOINT_DELTA_MARKER) d.x=0; 746 if (d.y==JOINT_DELTA_MARKER) d.y=0; 747 if (d.z==JOINT_DELTA_MARKER) d.z=0; 748 } 749 750 void Joint::useDelta(bool use) 751 { 752 usedelta=use; 753 } 754 755 bool Joint::isDelta() 747 756 { 748 757 return usedelta; -
cpp/frams/model/modelparts.h
r109 r114 116 116 {d=Pt3D(_d,0,0);} 117 117 void defassign(); 118 void resetDeltaMarkers(); 118 119 public: 119 120 // base properties: … … 146 147 delta value is not changed. 147 148 */ 148 void useDelta( int false_or_true);149 150 /** @return 1if delta option is in effect.149 void useDelta(bool use); 150 151 /** @return true if delta option is in effect. 151 152 @see useDelta(), resetDelta(), useDelta() 152 153 */ 153 intisDelta();154 bool isDelta(); 154 155 155 156 /// ParamInterface object is preferred way to get/set other properties. … … 164 165 /** flag: generated f0 should include delta data. 165 166 set by 'singlestep' if j: attributes use delta option */ 166 intusedelta;167 bool usedelta; 167 168 Pt3D vcolor; 168 169
Note: See TracChangeset
for help on using the changeset viewer.