Changeset 104 for cpp/gdk/modelparts.h
- Timestamp:
- 07/23/13 18:15:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/modelparts.h
r81 r104 35 35 PartBase(const SString& s):vis_style(s),mapped(0) {} 36 36 ~PartBase(); 37 static const SString& getDefaultStyle(){static SString s("none"); return s;}37 static SString getDefaultStyle(){return SString("none");} 38 38 MultiRange *mapped; 39 39 enum PartBaseFlags { Selected=1 }; … … 68 68 { 69 69 friend class Model; 70 static const SString&getDefaultStyle();70 static SString getDefaultStyle(); 71 71 Part(double _mass,double _size,double _density,double _friction,double _ingest,double _assim) 72 :mass(_mass),size(_size),density(_density),friction(_friction),ingest(_ingest),assim(_assim), 73 PartBase(getDefaultStyle()) 72 :PartBase(getDefaultStyle()),mass(_mass),size(_size),density(_density),friction(_friction),ingest(_ingest),assim(_assim) 74 73 {} 75 74 public: … … 78 77 Orient o; ///< orientation in 3d space (rotation matrix) 79 78 /// ParamInterface object is preferred way to get/set other properties. 80 Param Interface &extraProperties();81 Param Interface &properties();79 Param extraProperties(); 80 Param properties(); 82 81 long refno; 83 82 Pt3D rot; … … 104 103 { 105 104 friend class Model; 106 static const SString&getDefaultStyle();105 SString getDefaultStyle(); 107 106 Joint(double _stamina,double _stif,double _rotstif,double _d) 108 : stamina(_stamina),stif(_stif),rotstif(_rotstif),PartBase(getDefaultStyle())107 :PartBase(getDefaultStyle()),stamina(_stamina),stif(_stif),rotstif(_rotstif) 109 108 {d=Pt3D(_d,0,0);} 110 109 public: … … 144 143 145 144 /// ParamInterface object is preferred way to get/set other properties. 146 Param Interface &extraProperties();147 Param Interface &properties();145 Param extraProperties(); 146 Param properties(); 148 147 149 148 // do not touch these: … … 182 181 long visualhints; 183 182 184 void *impl; 183 //void *impl; 184 int impl_count; 185 185 bool active; 186 186 int genactive; … … 290 290 { 291 291 friend class Model; 292 static const SString&getDefaultStyle();292 static SString getDefaultStyle(); 293 293 294 294 struct NInput { Neuro *n; double weight; SString *info; … … 307 307 public: 308 308 enum NeuroFlags { HoldState=2 }; 309 Param Interface &properties();310 Param Interface &extraProperties();309 Param properties(); 310 Param extraProperties(); 311 311 312 312 void setInputInfo(int i,const SString& name,const SString &value);
Note: See TracChangeset
for help on using the changeset viewer.