Changeset 915 for cpp/frams/model
- Timestamp:
- 04/20/20 23:33:31 (5 years ago)
- Location:
- cpp/frams/model
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/defassign-f0-SDK.h
r732 r915 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 18Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 66 66 d.z=0; 67 67 shape=0; 68 hinge_pos.x=0; 69 hinge_pos.y=0; 70 hinge_pos.z=0; 71 hinge_rot.x=0; 72 hinge_rot.y=0; 73 hinge_rot.z=0; 74 hinge_limit_x[0]=-1.5708; 75 hinge_limit_x[1]=1.5708; 76 hinge_limit_y[0]=-1.5708; 77 hinge_limit_y[1]=1.5708; 68 78 stif=1.0; 69 79 rotstif=1.0; -
cpp/frams/model/f0-SDK-classes.h
r754 r915 71 71 ParamEntry f0_joint_paramtab[]= 72 72 { 73 {"Connections",4, 17,"j" },73 {"Connections",4,27,"j" }, 74 74 {"Geometry",}, 75 75 {"Other properties",}, … … 84 84 {"dz",1,1024,"delta.z","f -2 2 0",FIELD(d.z),}, 85 85 {"sh",1,0,"shape","d 0 1 0",FIELD(shape),}, 86 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),}, 87 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),}, 88 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),}, 89 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),}, 90 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),}, 91 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),}, 92 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),}, 93 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),}, 94 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),}, 95 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),}, 86 96 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),}, 87 97 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),}, … … 110 120 ParamEntry f0_nodeltajoint_paramtab[]= 111 121 { 112 {"Connections",4, 11,"j" },122 {"Connections",4,21,"j" }, 113 123 {"Geometry",}, 114 124 {"Other properties",}, … … 117 127 {"p2",0,1024,"part2 ref#","d -1 999999 -1",FIELD(p2_refno),}, 118 128 {"sh",1,0,"shape","d 0 1 0",FIELD(shape),}, 129 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),}, 130 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),}, 131 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),}, 132 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),}, 133 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),}, 134 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),}, 135 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),}, 136 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),}, 137 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),}, 138 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),}, 119 139 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),}, 120 140 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),}, -
cpp/frams/model/model.cpp
r900 r915 50 50 geno = mod.geno; 51 51 f0genoknown = 0; 52 shape = mod.shape; 52 53 startenergy = mod.startenergy; 53 54 modelfromgenotype = mod.modelfromgenotype; -
cpp/frams/model/modelparts.cpp
r899 r915 642 642 d = src.d; 643 643 shape = src.shape; 644 hinge_pos = src.hinge_pos; 645 hinge_rot = src.hinge_rot; 644 646 stamina = src.stamina; 645 647 stif = src.stif; rotstif = src.rotstif; -
cpp/frams/model/modelparts.h
r899 r915 124 124 class Pt3D d; ///< position delta between parts 125 125 class Pt3D rot; ///< orientation delta between parts expressed as 3 angles 126 enum Shape { SHAPE_BALL_AND_STICK = 0, SHAPE_FIXED = 1 }; 127 paInt shape;///< ball-and-stick=old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0, fixed=merge parts into one physical entity 126 enum Shape { SHAPE_BALL_AND_STICK = 0, ///< old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with part.shape>0 127 SHAPE_FIXED = 1, ///< merge parts into one physical entity 128 SHAPE_HINGE_X = 2, ///< hinge connection, revolving around X axis defined by hinge_pos and hinge_rot 129 SHAPE_HINGE_XY = 3 }; ///< double hinge connection, revolving around X and Y axes defined by hinge_pos and hinge_rot 130 paInt shape;///< values of type Shape (paInt for integration with Param) 131 class Pt3D hinge_pos; ///< hinge position (relative to part1) for HINGE_X and HINGE_XY 132 class Pt3D hinge_rot; ///< hinge orientation (relative to part1) for HINGE_X and HINGE_XY 133 double hinge_limit_x[2], hinge_limit_y[2]; ///< hinge movement range - i.e., extreme allowed values of a state. A state can be an angle or other physical property. limit[0] <= 0 <= limit[1]. Relative Part position and orientation as set in the Model define the initial state 0. 128 134 129 135 Joint();
Note: See TracChangeset
for help on using the changeset viewer.