Changeset 952 for cpp/frams/neuro/neuroimpl.cpp
- Timestamp:
- 06/20/20 01:09:57 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/neuro/neuroimpl.cpp
r932 r952 13 13 #include <frams/simul/simul.h> 14 14 #endif 15 #include <frams/vm/classes/3dobject.h> 15 16 16 17 const int NeuroImpl::ENDDRAWING = -9999; … … 153 154 } 154 155 156 void NeuroNetImpl::getLiveNeuroObject(Neuro *n, ExtValue *ret) 157 { 158 NeuroImpl *ni = getImpl(n); 159 if (ni) 160 ret->setObject(ExtObject(&NeuroImpl::getStaticParam(), ni)); 161 else 162 ret->setEmpty(); 163 } 164 155 165 /////////////////////////////////////////////// 156 166 … … 301 311 ParamEntry neuroimpl_tab[] = 302 312 { 303 { "Neuro", 1, 2 7+ NEUROIMPL_SIGNAL_PROPS, "Neuro", "Live Neuron object." },313 { "Neuro", 1, 29 + NEUROIMPL_SIGNAL_PROPS, "Neuro", "Live Neuron object." }, 304 314 305 315 { "getInputState", 0, 0, "Get input signal", "p f(d input)", PROCEDURE(p_get), }, … … 324 334 { "position_y", 0, PARAM_READONLY, "Position y", "f", GETONLY(position_y), }, 325 335 { "position_z", 0, PARAM_READONLY, "Position z", "f", GETONLY(position_z), }, 336 { "relative_pos", 0, PARAM_READONLY, "Relative position", "oXYZ", GETONLY(relative_pos), }, 337 { "relative_orient", 0, PARAM_READONLY, "Relative orientation", "oOrient", GETONLY(relative_orient), }, 326 338 { "creature", 0, PARAM_READONLY, "Gets owner creature", "oCreature", GETONLY(creature), }, 327 { " part", 0, PARAM_READONLY, "The Part object where this neuron is located", "oMechPart", GETONLY(part),},328 { " joint", 0, PARAM_READONLY, "The Joint object where this neuron is located", "oMechJoint", GETONLY(joint),},339 { "mechpart", 0, PARAM_READONLY, "MechPart object", "oMechPart", GETONLY(part), "The MechPart object where this neuron is located" }, 340 { "mechjoint", 0, PARAM_READONLY, "MechJoint object" , "oMechJoint", GETONLY(joint), "The MechJoint object where this neuron is located" }, 329 341 { "neuroproperties", 0, PARAM_READONLY, "Custom neuron fields", "oNeuroProperties", GETONLY(fields), 330 342 "Neurons can have different fields depending on their class. Script neurons have their fields defined using the \"property:\" syntax. If you develop a custom neuron script you should use the NeuroProperties object for accessing your own neuron fields. The Neuro.neuroproperties property is meant for accessing the neuron fields from the outside script.\n" … … 549 561 } 550 562 563 void NeuroImpl::get_relative_pos(ExtValue *ret) 564 { 565 ret->setObject(Pt3D_Ext::makeDynamicObject(getRelativePosition())); 566 } 567 568 void NeuroImpl::get_relative_orient(ExtValue *ret) 569 { 570 ret->setObject(Orient_Ext::makeDynamicObject(new Orient_Ext(getRelativeOrientation()))); 571 } 551 572 552 573 void NeuroImpl::createFieldsObject()
Note: See TracChangeset
for help on using the changeset viewer.