23 namespace SOP_CrowdMotionPathAvoidCoreEnums
34 using namespace UT::Literal;
51 using namespace UT::Literal;
70 myEnableAvoidance =
true;
71 myMaxCollisionTime = 3;
72 myEnableNeighbors =
true;
73 myNeighborDistance = 10;
75 myEnableObstacles =
true;
76 myObstacleDistance = 10;
77 myObstaclePadding = 1;
78 myHorizontalFOV = 180;
83 myTurnSpeedThreshold = 0.25;
84 myUseMaxInitialRotation =
false;
85 myMaxInitialRotation = 45;
87 myConstrainTurnAccel =
false;
91 myGoalPosWeight = 0.1;
92 myDistanceVariance = 5;
93 myAddCollisionPointGroup =
false;
94 myCollisionPointGroup =
"collided"_UTsh;
96 myUseStartTime =
false;
113 if (myGroup != src.myGroup)
return false;
114 if (myEnableAvoidance != src.myEnableAvoidance)
return false;
115 if (myMaxCollisionTime != src.myMaxCollisionTime)
return false;
116 if (myEnableNeighbors != src.myEnableNeighbors)
return false;
117 if (myNeighborDistance != src.myNeighborDistance)
return false;
118 if (myMaxNeighbors != src.myMaxNeighbors)
return false;
119 if (myEnableObstacles != src.myEnableObstacles)
return false;
120 if (myObstacleDistance != src.myObstacleDistance)
return false;
121 if (myObstaclePadding != src.myObstaclePadding)
return false;
122 if (myHorizontalFOV != src.myHorizontalFOV)
return false;
123 if (myVerticalFOV != src.myVerticalFOV)
return false;
124 if (myFOVSamples != src.myFOVSamples)
return false;
125 if (myFOVSeed != src.myFOVSeed)
return false;
126 if (mySteeringMode != src.mySteeringMode)
return false;
127 if (myTurnSpeedThreshold != src.myTurnSpeedThreshold)
return false;
128 if (myUseMaxInitialRotation != src.myUseMaxInitialRotation)
return false;
129 if (myMaxInitialRotation != src.myMaxInitialRotation)
return false;
130 if (myMaxTurnRate != src.myMaxTurnRate)
return false;
131 if (myConstrainTurnAccel != src.myConstrainTurnAccel)
return false;
132 if (myTurnStiffness != src.myTurnStiffness)
return false;
133 if (myTurnDamping != src.myTurnDamping)
return false;
134 if (myGoalPos != src.myGoalPos)
return false;
135 if (myGoalPosWeight != src.myGoalPosWeight)
return false;
136 if (myDistanceVariance != src.myDistanceVariance)
return false;
137 if (myAddCollisionPointGroup != src.myAddCollisionPointGroup)
return false;
138 if (myCollisionPointGroup != src.myCollisionPointGroup)
return false;
139 if (myTimestep != src.myTimestep)
return false;
140 if (myUseStartTime != src.myUseStartTime)
return false;
141 if (myStartTime != src.myStartTime)
return false;
142 if (myUseEndTime != src.myUseEndTime)
return false;
143 if (myEndTime != src.myEndTime)
return false;
144 if (myReferenceUp != src.myReferenceUp)
return false;
164 graph->
evalOpParm(myGroup, nodeidx,
"group", time, graph->
isDirect()?
nullptr:depnode);
165 myEnableAvoidance =
true;
167 graph->
evalOpParm(myEnableAvoidance, nodeidx,
"enableavoidance", time, graph->
isDirect()?
nullptr:depnode);
168 myMaxCollisionTime = 3;
169 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
170 graph->
evalOpParm(myMaxCollisionTime, nodeidx,
"maxcollisiontime", time, graph->
isDirect()?
nullptr:depnode);
171 myEnableNeighbors =
true;
172 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
173 graph->
evalOpParm(myEnableNeighbors, nodeidx,
"enableneighbors", time, graph->
isDirect()?
nullptr:depnode);
174 myNeighborDistance = 10;
175 if (
true && ( (
true&&!(((getEnableAvoidance()==0))||((getEnableNeighbors()==0)))) ) )
176 graph->
evalOpParm(myNeighborDistance, nodeidx,
"neighbordistance", time, graph->
isDirect()?
nullptr:depnode);
177 myMaxNeighbors = 100;
178 if (
true && ( (
true&&!(((getEnableAvoidance()==0))||((getEnableNeighbors()==0)))) ) )
179 graph->
evalOpParm(myMaxNeighbors, nodeidx,
"maxneighbors", time, graph->
isDirect()?
nullptr:depnode);
180 myEnableObstacles =
true;
181 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
182 graph->
evalOpParm(myEnableObstacles, nodeidx,
"enableobstacles", time, graph->
isDirect()?
nullptr:depnode);
183 myObstacleDistance = 10;
184 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0)))) ) )
185 graph->
evalOpParm(myObstacleDistance, nodeidx,
"obstacledistance", time, graph->
isDirect()?
nullptr:depnode);
186 myObstaclePadding = 1;
187 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0)))) ) )
188 graph->
evalOpParm(myObstaclePadding, nodeidx,
"obstaclepadding", time, graph->
isDirect()?
nullptr:depnode);
189 myHorizontalFOV = 180;
190 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0)))) ) )
191 graph->
evalOpParm(myHorizontalFOV, nodeidx,
"horizontalfov", time, graph->
isDirect()?
nullptr:depnode);
193 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0)))) ) )
194 graph->
evalOpParm(myVerticalFOV, nodeidx,
"verticalfov", time, graph->
isDirect()?
nullptr:depnode);
196 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0)))) ) )
197 graph->
evalOpParm(myFOVSamples, nodeidx,
"fovsamples", time, graph->
isDirect()?
nullptr:depnode);
199 if (
true && ( (
true&&!(((getEnableObstacles()==0))||((getEnableAvoidance()==0))||((getVerticalFOV()==0)))) ) )
200 graph->
evalOpParm(myFOVSeed, nodeidx,
"fovseed", time, graph->
isDirect()?
nullptr:depnode);
202 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
203 graph->
evalOpParm(mySteeringMode, nodeidx,
"steeringmode", time, graph->
isDirect()?
nullptr:depnode);
204 myTurnSpeedThreshold = 0.25;
205 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
206 graph->
evalOpParm(myTurnSpeedThreshold, nodeidx,
"turnspeedthreshold", time, graph->
isDirect()?
nullptr:depnode);
207 myUseMaxInitialRotation =
false;
208 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
209 graph->
evalOpParm(myUseMaxInitialRotation, nodeidx,
"usemaxinitialrotation", time, graph->
isDirect()?
nullptr:depnode);
210 myMaxInitialRotation = 45;
211 if (
true && ( (
true&&!(((getEnableAvoidance()==0))||((getUseMaxInitialRotation()==0)))) ) )
212 graph->
evalOpParm(myMaxInitialRotation, nodeidx,
"maxinitialrotation", time, graph->
isDirect()?
nullptr:depnode);
214 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
215 graph->
evalOpParm(myMaxTurnRate, nodeidx,
"maxturnrate", time, graph->
isDirect()?
nullptr:depnode);
216 myConstrainTurnAccel =
false;
217 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
218 graph->
evalOpParm(myConstrainTurnAccel, nodeidx,
"constrainturnaccel", time, graph->
isDirect()?
nullptr:depnode);
219 myTurnStiffness = 10;
220 if (
true && ( (
true&&!(((getConstrainTurnAccel()==0))||((getEnableAvoidance()==0)))) ) )
221 graph->
evalOpParm(myTurnStiffness, nodeidx,
"turnstiffness", time, graph->
isDirect()?
nullptr:depnode);
223 if (
true && ( (
true&&!(((getConstrainTurnAccel()==0))||((getEnableAvoidance()==0)))) ) )
224 graph->
evalOpParm(myTurnDamping, nodeidx,
"turndamping", time, graph->
isDirect()?
nullptr:depnode);
226 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
227 graph->
evalOpParm(myGoalPos, nodeidx,
"goalpos", time, graph->
isDirect()?
nullptr:depnode);
228 myGoalPosWeight = 0.1;
229 if (
true && ( (
true&&!(((getEnableAvoidance()==0)))) ) )
230 graph->
evalOpParm(myGoalPosWeight, nodeidx,
"goalposweight", time, graph->
isDirect()?
nullptr:depnode);
231 myDistanceVariance = 5;
232 if (
true && ( (
true&&!(((getEnableAvoidance()==0))||((
int64(getGoalPos())!=1)))) ) )
233 graph->
evalOpParm(myDistanceVariance, nodeidx,
"distancevariance", time, graph->
isDirect()?
nullptr:depnode);
234 myAddCollisionPointGroup =
false;
236 graph->
evalOpParm(myAddCollisionPointGroup, nodeidx,
"addcollisionptgroup", time, graph->
isDirect()?
nullptr:depnode);
237 myCollisionPointGroup =
"collided"_UTsh;
238 if (
true && ( (
true&&!(((getAddCollisionPointGroup()==0)))) ) )
239 graph->
evalOpParm(myCollisionPointGroup, nodeidx,
"collisionptgroup", time, graph->
isDirect()?
nullptr:depnode);
242 graph->
evalOpParm(myTimestep, nodeidx,
"timestep", time, graph->
isDirect()?
nullptr:depnode);
243 myUseStartTime =
false;
245 graph->
evalOpParm(myUseStartTime, nodeidx,
"usestarttime", time, graph->
isDirect()?
nullptr:depnode);
247 if (
true && ( (
true&&!(((getUseStartTime()==0)))) ) )
248 graph->
evalOpParm(myStartTime, nodeidx,
"starttime", time, graph->
isDirect()?
nullptr:depnode);
249 myUseEndTime =
false;
251 graph->
evalOpParm(myUseEndTime, nodeidx,
"useendtime", time, graph->
isDirect()?
nullptr:depnode);
253 if (
true && ( (
true&&!(((getUseEndTime()==0)))) ) )
254 graph->
evalOpParm(myEndTime, nodeidx,
"endtime", time, graph->
isDirect()?
nullptr:depnode);
257 graph->
evalOpParm(myReferenceUp, nodeidx,
"refup", time, graph->
isDirect()?
nullptr:depnode);
273 template <
typename T>
280 if (idx.
size() != instance.
size()+1)
285 coerceValue(value, myGroup);
288 coerceValue(value, myEnableAvoidance);
291 coerceValue(value, myMaxCollisionTime);
294 coerceValue(value, myEnableNeighbors);
297 coerceValue(value, myNeighborDistance);
300 coerceValue(value, myMaxNeighbors);
303 coerceValue(value, myEnableObstacles);
306 coerceValue(value, myObstacleDistance);
309 coerceValue(value, myObstaclePadding);
312 coerceValue(value, myHorizontalFOV);
315 coerceValue(value, myVerticalFOV);
318 coerceValue(value, myFOVSamples);
321 coerceValue(value, myFOVSeed);
324 coerceValue(value, mySteeringMode);
327 coerceValue(value, myTurnSpeedThreshold);
330 coerceValue(value, myUseMaxInitialRotation);
333 coerceValue(value, myMaxInitialRotation);
336 coerceValue(value, myMaxTurnRate);
339 coerceValue(value, myConstrainTurnAccel);
342 coerceValue(value, myTurnStiffness);
345 coerceValue(value, myTurnDamping);
348 coerceValue(value, myGoalPos);
351 coerceValue(value, myGoalPosWeight);
354 coerceValue(value, myDistanceVariance);
357 coerceValue(value, myAddCollisionPointGroup);
360 coerceValue(value, myCollisionPointGroup);
363 coerceValue(value, myTimestep);
366 coerceValue(value, myUseStartTime);
369 coerceValue(value, myStartTime);
372 coerceValue(value, myUseEndTime);
375 coerceValue(value, myEndTime);
378 coerceValue(value, myReferenceUp);
394 { doGetParmValue(idx, instance, value); }
396 { doGetParmValue(idx, instance, value); }
398 { doGetParmValue(idx, instance, value); }
400 { doGetParmValue(idx, instance, value); }
402 { doGetParmValue(idx, instance, value); }
404 { doGetParmValue(idx, instance, value); }
406 { doGetParmValue(idx, instance, value); }
408 { doGetParmValue(idx, instance, value); }
410 { doGetParmValue(idx, instance, value); }
412 { doGetParmValue(idx, instance, value); }
414 { doGetParmValue(idx, instance, value); }
416 template <
typename T>
423 if (idx.
size() != instance.
size()+1)
428 coerceValue(myGroup, ( ( value ) ));
431 coerceValue(myEnableAvoidance, ( ( value ) ));
434 coerceValue(myMaxCollisionTime, ( ( value ) ));
437 coerceValue(myEnableNeighbors, ( ( value ) ));
440 coerceValue(myNeighborDistance, clampMinValue(0, ( value ) ));
443 coerceValue(myMaxNeighbors, clampMinValue(0, ( value ) ));
446 coerceValue(myEnableObstacles, ( ( value ) ));
449 coerceValue(myObstacleDistance, clampMinValue(0, ( value ) ));
452 coerceValue(myObstaclePadding, clampMinValue(0, ( value ) ));
455 coerceValue(myHorizontalFOV, clampMinValue(0, ( value ) ));
458 coerceValue(myVerticalFOV, clampMinValue(0, ( value ) ));
461 coerceValue(myFOVSamples, clampMinValue(0, ( value ) ));
464 coerceValue(myFOVSeed, ( ( value ) ));
467 coerceValue(mySteeringMode, clampMinValue(0, clampMaxValue(1, value ) ));
470 coerceValue(myTurnSpeedThreshold, ( ( value ) ));
473 coerceValue(myUseMaxInitialRotation, ( ( value ) ));
476 coerceValue(myMaxInitialRotation, clampMinValue(0, ( value ) ));
479 coerceValue(myMaxTurnRate, ( ( value ) ));
482 coerceValue(myConstrainTurnAccel, ( ( value ) ));
485 coerceValue(myTurnStiffness, ( ( value ) ));
488 coerceValue(myTurnDamping, ( ( value ) ));
491 coerceValue(myGoalPos, clampMinValue(0, clampMaxValue(1, value ) ));
494 coerceValue(myGoalPosWeight, clampMinValue(0, ( value ) ));
497 coerceValue(myDistanceVariance, ( ( value ) ));
500 coerceValue(myAddCollisionPointGroup, ( ( value ) ));
503 coerceValue(myCollisionPointGroup, ( ( value ) ));
506 coerceValue(myTimestep, clampMinValue(0, ( value ) ));
509 coerceValue(myUseStartTime, ( ( value ) ));
512 coerceValue(myStartTime, ( ( value ) ));
515 coerceValue(myUseEndTime, ( ( value ) ));
518 coerceValue(myEndTime, ( ( value ) ));
521 coerceValue(myReferenceUp, ( ( value ) ));
528 { doSetParmValue(idx, instance, value); }
530 { doSetParmValue(idx, instance, value); }
532 { doSetParmValue(idx, instance, value); }
534 { doSetParmValue(idx, instance, value); }
536 { doSetParmValue(idx, instance, value); }
538 { doSetParmValue(idx, instance, value); }
540 { doSetParmValue(idx, instance, value); }
542 { doSetParmValue(idx, instance, value); }
544 { doSetParmValue(idx, instance, value); }
546 { doSetParmValue(idx, instance, value); }
548 { doSetParmValue(idx, instance, value); }
564 if (fieldnum.
size() < 1)
571 return "enableavoidance";
573 return "maxcollisiontime";
575 return "enableneighbors";
577 return "neighbordistance";
579 return "maxneighbors";
581 return "enableobstacles";
583 return "obstacledistance";
585 return "obstaclepadding";
587 return "horizontalfov";
589 return "verticalfov";
595 return "steeringmode";
597 return "turnspeedthreshold";
599 return "usemaxinitialrotation";
601 return "maxinitialrotation";
603 return "maxturnrate";
605 return "constrainturnaccel";
607 return "turnstiffness";
609 return "turndamping";
613 return "goalposweight";
615 return "distancevariance";
617 return "addcollisionptgroup";
619 return "collisionptgroup";
623 return "usestarttime";
639 if (fieldnum.
size() < 1)
640 return PARM_UNSUPPORTED;
709 return PARM_UNSUPPORTED;
745 loadData(is, rampdata);
763 int typelen = colon - data.
buffer();
777 {
int64 iv =
v; UTwrite(os, &iv); }
779 { UTwrite<fpreal64>(os, &
v); }
781 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
783 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
784 UTwrite<fpreal64>(os, &v.
z()); }
786 { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
787 UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
799 if (s) s->save(ostr);
801 saveData(os, result);
808 ostr << s->getDataTypeToken();
813 saveData(os, result);
817 void save(std::ostream &os)
const
821 saveData(os, myGroup);
822 saveData(os, myEnableAvoidance);
823 saveData(os, myMaxCollisionTime);
824 saveData(os, myEnableNeighbors);
825 saveData(os, myNeighborDistance);
826 saveData(os, myMaxNeighbors);
827 saveData(os, myEnableObstacles);
828 saveData(os, myObstacleDistance);
829 saveData(os, myObstaclePadding);
830 saveData(os, myHorizontalFOV);
831 saveData(os, myVerticalFOV);
832 saveData(os, myFOVSamples);
833 saveData(os, myFOVSeed);
834 saveData(os, mySteeringMode);
835 saveData(os, myTurnSpeedThreshold);
836 saveData(os, myUseMaxInitialRotation);
837 saveData(os, myMaxInitialRotation);
838 saveData(os, myMaxTurnRate);
839 saveData(os, myConstrainTurnAccel);
840 saveData(os, myTurnStiffness);
841 saveData(os, myTurnDamping);
842 saveData(os, myGoalPos);
843 saveData(os, myGoalPosWeight);
844 saveData(os, myDistanceVariance);
845 saveData(os, myAddCollisionPointGroup);
846 saveData(os, myCollisionPointGroup);
847 saveData(os, myTimestep);
848 saveData(os, myUseStartTime);
849 saveData(os, myStartTime);
850 saveData(os, myUseEndTime);
851 saveData(os, myEndTime);
852 saveData(os, myReferenceUp);
865 loadData(is, myGroup);
866 loadData(is, myEnableAvoidance);
867 loadData(is, myMaxCollisionTime);
868 loadData(is, myEnableNeighbors);
869 loadData(is, myNeighborDistance);
870 loadData(is, myMaxNeighbors);
871 loadData(is, myEnableObstacles);
872 loadData(is, myObstacleDistance);
873 loadData(is, myObstaclePadding);
874 loadData(is, myHorizontalFOV);
875 loadData(is, myVerticalFOV);
876 loadData(is, myFOVSamples);
877 loadData(is, myFOVSeed);
878 loadData(is, mySteeringMode);
879 loadData(is, myTurnSpeedThreshold);
880 loadData(is, myUseMaxInitialRotation);
881 loadData(is, myMaxInitialRotation);
882 loadData(is, myMaxTurnRate);
883 loadData(is, myConstrainTurnAccel);
884 loadData(is, myTurnStiffness);
885 loadData(is, myTurnDamping);
886 loadData(is, myGoalPos);
887 loadData(is, myGoalPosWeight);
888 loadData(is, myDistanceVariance);
889 loadData(is, myAddCollisionPointGroup);
890 loadData(is, myCollisionPointGroup);
891 loadData(is, myTimestep);
892 loadData(is, myUseStartTime);
893 loadData(is, myStartTime);
894 loadData(is, myUseEndTime);
895 loadData(is, myEndTime);
896 loadData(is, myReferenceUp);
906 if (!thissop)
return getGroup();
908 OP_Utils::evalOpParm(result, thissop,
"group", cookparms.
getCookTime(), 0);
916 if (!thissop)
return getEnableAvoidance();
918 OP_Utils::evalOpParm(result, thissop,
"enableavoidance", cookparms.
getCookTime(), 0);
926 if (!thissop)
return getMaxCollisionTime();
928 OP_Utils::evalOpParm(result, thissop,
"maxcollisiontime", cookparms.
getCookTime(), 0);
936 if (!thissop)
return getEnableNeighbors();
938 OP_Utils::evalOpParm(result, thissop,
"enableneighbors", cookparms.
getCookTime(), 0);
946 if (!thissop)
return getNeighborDistance();
948 OP_Utils::evalOpParm(result, thissop,
"neighbordistance", cookparms.
getCookTime(), 0);
956 if (!thissop)
return getMaxNeighbors();
958 OP_Utils::evalOpParm(result, thissop,
"maxneighbors", cookparms.
getCookTime(), 0);
966 if (!thissop)
return getEnableObstacles();
968 OP_Utils::evalOpParm(result, thissop,
"enableobstacles", cookparms.
getCookTime(), 0);
976 if (!thissop)
return getObstacleDistance();
978 OP_Utils::evalOpParm(result, thissop,
"obstacledistance", cookparms.
getCookTime(), 0);
986 if (!thissop)
return getObstaclePadding();
988 OP_Utils::evalOpParm(result, thissop,
"obstaclepadding", cookparms.
getCookTime(), 0);
996 if (!thissop)
return getHorizontalFOV();
998 OP_Utils::evalOpParm(result, thissop,
"horizontalfov", cookparms.
getCookTime(), 0);
1006 if (!thissop)
return getVerticalFOV();
1008 OP_Utils::evalOpParm(result, thissop,
"verticalfov", cookparms.
getCookTime(), 0);
1016 if (!thissop)
return getFOVSamples();
1018 OP_Utils::evalOpParm(result, thissop,
"fovsamples", cookparms.
getCookTime(), 0);
1026 if (!thissop)
return getFOVSeed();
1028 OP_Utils::evalOpParm(result, thissop,
"fovseed", cookparms.
getCookTime(), 0);
1036 if (!thissop)
return getSteeringMode();
1038 OP_Utils::evalOpParm(result, thissop,
"steeringmode", cookparms.
getCookTime(), 0);
1046 if (!thissop)
return getTurnSpeedThreshold();
1048 OP_Utils::evalOpParm(result, thissop,
"turnspeedthreshold", cookparms.
getCookTime(), 0);
1056 if (!thissop)
return getUseMaxInitialRotation();
1058 OP_Utils::evalOpParm(result, thissop,
"usemaxinitialrotation", cookparms.
getCookTime(), 0);
1066 if (!thissop)
return getMaxInitialRotation();
1068 OP_Utils::evalOpParm(result, thissop,
"maxinitialrotation", cookparms.
getCookTime(), 0);
1076 if (!thissop)
return getMaxTurnRate();
1078 OP_Utils::evalOpParm(result, thissop,
"maxturnrate", cookparms.
getCookTime(), 0);
1086 if (!thissop)
return getConstrainTurnAccel();
1088 OP_Utils::evalOpParm(result, thissop,
"constrainturnaccel", cookparms.
getCookTime(), 0);
1096 if (!thissop)
return getTurnStiffness();
1098 OP_Utils::evalOpParm(result, thissop,
"turnstiffness", cookparms.
getCookTime(), 0);
1106 if (!thissop)
return getTurnDamping();
1108 OP_Utils::evalOpParm(result, thissop,
"turndamping", cookparms.
getCookTime(), 0);
1116 if (!thissop)
return getGoalPos();
1118 OP_Utils::evalOpParm(result, thissop,
"goalpos", cookparms.
getCookTime(), 0);
1126 if (!thissop)
return getGoalPosWeight();
1128 OP_Utils::evalOpParm(result, thissop,
"goalposweight", cookparms.
getCookTime(), 0);
1136 if (!thissop)
return getDistanceVariance();
1138 OP_Utils::evalOpParm(result, thissop,
"distancevariance", cookparms.
getCookTime(), 0);
1146 if (!thissop)
return getAddCollisionPointGroup();
1148 OP_Utils::evalOpParm(result, thissop,
"addcollisionptgroup", cookparms.
getCookTime(), 0);
1156 if (!thissop)
return getCollisionPointGroup();
1158 OP_Utils::evalOpParm(result, thissop,
"collisionptgroup", cookparms.
getCookTime(), 0);
1166 if (!thissop)
return getTimestep();
1168 OP_Utils::evalOpParm(result, thissop,
"timestep", cookparms.
getCookTime(), 0);
1176 if (!thissop)
return getUseStartTime();
1178 OP_Utils::evalOpParm(result, thissop,
"usestarttime", cookparms.
getCookTime(), 0);
1186 if (!thissop)
return getStartTime();
1188 OP_Utils::evalOpParm(result, thissop,
"starttime", cookparms.
getCookTime(), 0);
1196 if (!thissop)
return getUseEndTime();
1198 OP_Utils::evalOpParm(result, thissop,
"useendtime", cookparms.
getCookTime(), 0);
1206 if (!thissop)
return getEndTime();
1208 OP_Utils::evalOpParm(result, thissop,
"endtime", cookparms.
getCookTime(), 0);
1216 if (!thissop)
return getReferenceUp();
1218 OP_Utils::evalOpParm(result, thissop,
"refup", cookparms.
getCookTime(), 0);
1224 bool myEnableAvoidance;
1226 bool myEnableNeighbors;
1228 int64 myMaxNeighbors;
1229 bool myEnableObstacles;
1236 int64 mySteeringMode;
1238 bool myUseMaxInitialRotation;
1241 bool myConstrainTurnAccel;
1247 bool myAddCollisionPointGroup;
1250 bool myUseStartTime;
void setEnableObstacles(bool val)
bool opConstrainTurnAccel(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
fpreal64 opObstacleDistance(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
int64 opMaxNeighbors(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, bool &v)
void setGoalPosWeight(fpreal64 val)
bool getConstrainTurnAccel() const
void setTurnDamping(fpreal64 val)
SOP_Node * getNode() const
bool opUseStartTime(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opVerticalFOV(const SOP_NodeVerb::CookParms &cookparms) const
void setReferenceUp(UT_Vector3D val)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
fpreal64 opEndTime(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setCollisionPointGroup(const UT_StringHolder &val)
fpreal64 opTurnStiffness(const SOP_NodeVerb::CookParms &cookparms) const
void setHorizontalFOV(fpreal64 val)
fpreal64 opTimestep(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
bool getEnableNeighbors() const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
SteeringMode getSteeringMode() const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
fpreal64 getObstaclePadding() const
GLsizei const GLfloat * value
UT_Vector3D getReferenceUp() const
bool opEnableObstacles(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_StringHolder s)
bool load(UT_IStream &is)
GoalPos getGoalPos() const
UT_Vector3D opReferenceUp(const SOP_NodeVerb::CookParms &cookparms) const
void setEndTime(fpreal64 val)
const OP_Context & context() const
void setVerticalFOV(fpreal64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
void setMaxInitialRotation(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
void setUseMaxInitialRotation(bool val)
UT_StringHolder opCollisionPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getHorizontalFOV() const
void setAddCollisionPointGroup(bool val)
static void saveData(std::ostream &os, UT_Matrix2D v)
An output stream object that owns its own string buffer storage.
static void saveData(std::ostream &os, UT_Matrix3D v)
bool getUseMaxInitialRotation() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setFOVSeed(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
**But if you need a result
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setDistanceVariance(fpreal64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal64 getStartTime() const
void setTurnStiffness(fpreal64 val)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
fpreal64 getMaxInitialRotation() const
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
fpreal64 opMaxInitialRotation(const SOP_NodeVerb::CookParms &cookparms) const
void setMaxCollisionTime(fpreal64 val)
fpreal64 opStartTime(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
bool isParmColorRamp(exint idx) const override
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 getTimestep() const
bool operator==(const SOP_CrowdMotionPathAvoidCoreParms &src) const
bool getEnableAvoidance() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
static void loadData(UT_IStream &is, UT_StringHolder &v)
constexpr SYS_FORCE_INLINE T & x() noexcept
int64 opFOVSamples(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, fpreal64 v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
fpreal64 getEndTime() const
int64 getFOVSamples() const
void setGroup(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
bool opEnableNeighbors(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opGoalPosWeight(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getVerticalFOV() const
fpreal64 opFOVSeed(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
int64 getMaxNeighbors() const
constexpr SYS_FORCE_INLINE T & z() noexcept
void setMaxNeighbors(int64 val)
SYS_FORCE_INLINE UT_StringHolder getToken(SteeringMode enum_value)
void setStartTime(fpreal64 val)
bool getEnableObstacles() const
void setMaxTurnRate(fpreal64 val)
const OP_GraphProxy * graph() const
fpreal64 opHorizontalFOV(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
fpreal64 getNeighborDistance() const
static void saveData(std::ostream &os, bool v)
void setUseStartTime(bool val)
fpreal64 opObstaclePadding(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
bool getUseEndTime() const
UT_Vector3T< fpreal64 > UT_Vector3D
void setTurnSpeedThreshold(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void setEnableAvoidance(bool val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_Vector3D v)
exint getNestNumParms(TempIndex idx) const override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void saveBinary(std::ostream &os) const
Save string to binary stream.
const UT_StringHolder & getCollisionPointGroup() const
GT_API const UT_StringHolder version
void setSteeringMode(SteeringMode val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setUseEndTime(bool val)
void setNeighborDistance(fpreal64 val)
bool getUseStartTime() const
bool opAddCollisionPointGroup(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getFOVSeed() const
static void saveData(std::ostream &os, int64 v)
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
const char * getNestParmName(TempIndex fieldnum) const override
ParmType getNestParmType(TempIndex fieldnum) const override
fpreal64 opDistanceVariance(const SOP_NodeVerb::CookParms &cookparms) const
void setTimestep(fpreal64 val)
DEP_MicroNode * depnode() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
LeafData & operator=(const LeafData &)=delete
fpreal64 opTurnDamping(const SOP_NodeVerb::CookParms &cookparms) const
Utility class for containing a color ramp.
void setEnableNeighbors(bool val)
fpreal64 getTurnStiffness() const
static void loadData(UT_IStream &is, int64 &v)
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool opEnableAvoidance(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opNeighborDistance(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & w() noexcept
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
virtual UT_StringHolder baseGetSignature() const
fpreal64 getObstacleDistance() const
bool opUseMaxInitialRotation(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void setObstaclePadding(fpreal64 val)
fpreal getCookTime() const
fpreal64 opTurnSpeedThreshold(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getTurnSpeedThreshold() const
fpreal64 getTurnDamping() const
const char * findChar(int c) const
GoalPos opGoalPos(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setFOVSamples(int64 val)
void setObstacleDistance(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
fpreal64 getGoalPosWeight() const
bool getAddCollisionPointGroup() const
const UT_StringHolder & getGroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
constexpr SYS_FORCE_INLINE T & y() noexcept
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
fpreal64 opMaxTurnRate(const SOP_NodeVerb::CookParms &cookparms) const
void copyFrom(const OP_NodeParms *src) override
static void saveData(std::ostream &os, UT_Vector4D v)
fpreal64 opMaxCollisionTime(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getDistanceVariance() const
fpreal64 getMaxCollisionTime() const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
SOP_CrowdMotionPathAvoidCoreParms()
fpreal64 getMaxTurnRate() const
static void saveData(std::ostream &os, UT_Matrix4D v)
bool operator!=(const SOP_CrowdMotionPathAvoidCoreParms &src) const
bool opUseEndTime(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
SYS_FORCE_INLINE bool isstring() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setGoalPos(GoalPos val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
void setConstrainTurnAccel(bool val)
constexpr SYS_FORCE_INLINE T & x() noexcept
SteeringMode opSteeringMode(const SOP_NodeVerb::CookParms &cookparms) const