mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 16:13:45 +00:00
inspector cleanups
clustering work for datablocks for both consistent scanning for object parameters, as well as an eye towards orgainizing things to make reviewing what variations of components we'll be needing down the line clearer
This commit is contained in:
parent
23895e365a
commit
f07c8745b2
27 changed files with 692 additions and 700 deletions
|
|
@ -174,79 +174,86 @@ HoverVehicleData::~HoverVehicleData()
|
|||
//--------------------------------------------------------------------------
|
||||
void HoverVehicleData::initPersistFields()
|
||||
{
|
||||
addField( "dragForce", TypeF32, Offset(dragForce, HoverVehicleData),
|
||||
addGroup("Physics");
|
||||
addField( "normalForce", TypeF32, Offset(normalForce, HoverVehicleData),
|
||||
"Force generated in the ground normal direction when the vehicle is not "
|
||||
"floating (within stabalizer length from the ground).\n\n"
|
||||
"@see stabLenMin" );
|
||||
addField( "stabLenMin", TypeF32, Offset(stabLenMin, HoverVehicleData),
|
||||
"Length of the base stabalizer when travelling at minimum speed (0).\n"
|
||||
"Each tick, the vehicle performs 2 raycasts (from the center back and "
|
||||
"center front of the vehicle) to check for contact with the ground. The "
|
||||
"base stabalizer length determines the length of that raycast; if "
|
||||
"neither raycast hit the ground, the vehicle is floating, stabalizer "
|
||||
"spring and ground normal forces are not applied.\n\n"
|
||||
"<img src=\"images/hoverVehicle_forces.png\">\n"
|
||||
"@see stabSpringConstant" );
|
||||
addField( "stabLenMax", TypeF32, Offset(stabLenMax, HoverVehicleData),
|
||||
"Length of the base stabalizer when travelling at maximum speed "
|
||||
"(maxThrustSpeed).\n\n@see stabLenMin\n\n@see mainThrustForce" );
|
||||
addField("vertFactor", TypeF32, Offset(vertFactor, HoverVehicleData),
|
||||
"Scalar applied to the vertical portion of the velocity drag acting on "
|
||||
"the vehicle.\nFor the horizontal (X and Y) components of velocity drag, "
|
||||
"a factor of 0.25 is applied when the vehicle is floating, and a factor "
|
||||
"of 1.0 is applied when the vehicle is not floating. This velocity drag "
|
||||
"is multiplied by the vehicle's dragForce, as defined above, and the "
|
||||
"result is subtracted from it's movement force.\n"
|
||||
"@note The vertFactor must be between 0.0 and 1.0 (inclusive).");
|
||||
addField("stabSpringConstant", TypeF32, Offset(stabSpringConstant, HoverVehicleData),
|
||||
"Value used to generate stabalizer spring force. The force generated "
|
||||
"depends on stabilizer compression, that is how close the vehicle is "
|
||||
"to the ground proportional to current stabalizer length.\n\n"
|
||||
"@see stabLenMin");
|
||||
addField("stabDampingConstant", TypeF32, Offset(stabDampingConstant, HoverVehicleData),
|
||||
"Damping spring force acting against changes in the stabalizer length.\n\n"
|
||||
"@see stabLenMin");
|
||||
endGroup("Physics");
|
||||
|
||||
addGroup("Steering");
|
||||
addField( "steeringForce", TypeF32, Offset(steeringForce, HoverVehicleData),
|
||||
"Yaw (rotation about the Z-axis) force applied when steering in the x-axis direction."
|
||||
"about the vehicle's Z-axis)" );
|
||||
addField( "rollForce", TypeF32, Offset(rollForce, HoverVehicleData),
|
||||
"Roll (rotation about the Y-axis) force applied when steering in the x-axis direction." );
|
||||
addField( "pitchForce", TypeF32, Offset(pitchForce, HoverVehicleData),
|
||||
"Pitch (rotation about the X-axis) force applied when steering in the y-axis direction." );
|
||||
addField( "dragForce", TypeF32, Offset(dragForce, HoverVehicleData),
|
||||
"Drag force factor that acts opposite to the vehicle velocity.\nAlso "
|
||||
"used to determnine the vehicle's maxThrustSpeed.\n@see mainThrustForce" );
|
||||
addField( "vertFactor", TypeF32, Offset(vertFactor, HoverVehicleData),
|
||||
"Scalar applied to the vertical portion of the velocity drag acting on "
|
||||
"the vehicle.\nFor the horizontal (X and Y) components of velocity drag, "
|
||||
"a factor of 0.25 is applied when the vehicle is floating, and a factor "
|
||||
"of 1.0 is applied when the vehicle is not floating. This velocity drag "
|
||||
"is multiplied by the vehicle's dragForce, as defined above, and the "
|
||||
"result is subtracted from it's movement force.\n"
|
||||
"@note The vertFactor must be between 0.0 and 1.0 (inclusive)." );
|
||||
addField( "floatingThrustFactor", TypeF32, Offset(floatingThrustFactor, HoverVehicleData),
|
||||
"Scalar applied to the vehicle's thrust force when the vehicle is floating.\n"
|
||||
"@note The floatingThrustFactor must be between 0.0 and 1.0 (inclusive)." );
|
||||
addField( "mainThrustForce", TypeF32, Offset(mainThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle forward.\nAlso used to determine "
|
||||
"the maxThrustSpeed:\n\n"
|
||||
"@tsexample\n"
|
||||
"maxThrustSpeed = (mainThrustForce + strafeThrustForce) / dragForce;\n"
|
||||
"@endtsexample\n" );
|
||||
addField( "reverseThrustForce", TypeF32, Offset(reverseThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle backward." );
|
||||
addField( "strafeThrustForce", TypeF32, Offset(strafeThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle to one side.\nAlso used to "
|
||||
"determine the vehicle's maxThrustSpeed.\n@see mainThrustForce" );
|
||||
addField( "turboFactor", TypeF32, Offset(turboFactor, HoverVehicleData),
|
||||
"Scale factor applied to the vehicle's thrust force when jetting." );
|
||||
|
||||
addField( "stabLenMin", TypeF32, Offset(stabLenMin, HoverVehicleData),
|
||||
"Length of the base stabalizer when travelling at minimum speed (0).\n"
|
||||
"Each tick, the vehicle performs 2 raycasts (from the center back and "
|
||||
"center front of the vehicle) to check for contact with the ground. The "
|
||||
"base stabalizer length determines the length of that raycast; if "
|
||||
"neither raycast hit the ground, the vehicle is floating, stabalizer "
|
||||
"spring and ground normal forces are not applied.\n\n"
|
||||
"<img src=\"images/hoverVehicle_forces.png\">\n"
|
||||
"@see stabSpringConstant" );
|
||||
addField( "stabLenMax", TypeF32, Offset(stabLenMax, HoverVehicleData),
|
||||
"Length of the base stabalizer when travelling at maximum speed "
|
||||
"(maxThrustSpeed).\n\n@see stabLenMin\n\n@see mainThrustForce" );
|
||||
|
||||
addField( "stabSpringConstant", TypeF32, Offset(stabSpringConstant, HoverVehicleData),
|
||||
"Value used to generate stabalizer spring force. The force generated "
|
||||
"depends on stabilizer compression, that is how close the vehicle is "
|
||||
"to the ground proportional to current stabalizer length.\n\n"
|
||||
"@see stabLenMin" );
|
||||
addField( "stabDampingConstant", TypeF32, Offset(stabDampingConstant, HoverVehicleData),
|
||||
"Damping spring force acting against changes in the stabalizer length.\n\n"
|
||||
"@see stabLenMin" );
|
||||
addField( "mainThrustForce", TypeF32, Offset(mainThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle forward.\nAlso used to determine "
|
||||
"the maxThrustSpeed:\n\n"
|
||||
"@tsexample\n"
|
||||
"maxThrustSpeed = (mainThrustForce + strafeThrustForce) / dragForce;\n"
|
||||
"@endtsexample\n" );
|
||||
addField( "reverseThrustForce", TypeF32, Offset(reverseThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle backward." );
|
||||
addField( "strafeThrustForce", TypeF32, Offset(strafeThrustForce, HoverVehicleData),
|
||||
"Force generated by thrusting the vehicle to one side.\nAlso used to "
|
||||
"determine the vehicle's maxThrustSpeed.\n@see mainThrustForce" );
|
||||
addField( "turboFactor", TypeF32, Offset(turboFactor, HoverVehicleData),
|
||||
"Scale factor applied to the vehicle's thrust force when jetting." );
|
||||
addField( "floatingThrustFactor", TypeF32, Offset(floatingThrustFactor, HoverVehicleData),
|
||||
"Scalar applied to the vehicle's thrust force when the vehicle is floating.\n"
|
||||
"@note The floatingThrustFactor must be between 0.0 and 1.0 (inclusive)." );
|
||||
endGroup("Steering");
|
||||
|
||||
addGroup("AutoCorrection");
|
||||
addField( "gyroDrag", TypeF32, Offset(gyroDrag, HoverVehicleData),
|
||||
"Damping torque that acts against the vehicle's current angular momentum." );
|
||||
addField( "normalForce", TypeF32, Offset(normalForce, HoverVehicleData),
|
||||
"Force generated in the ground normal direction when the vehicle is not "
|
||||
"floating (within stabalizer length from the ground).\n\n"
|
||||
"@see stabLenMin" );
|
||||
addField( "restorativeForce", TypeF32, Offset(restorativeForce, HoverVehicleData),
|
||||
"Force generated to stabalize the vehicle (return it to neutral pitch/roll) "
|
||||
"when the vehicle is floating (more than stabalizer length from the "
|
||||
"ground.\n\n@see stabLenMin" );
|
||||
addField( "steeringForce", TypeF32, Offset(steeringForce, HoverVehicleData),
|
||||
"Yaw (rotation about the Z-axis) force applied when steering in the x-axis direction."
|
||||
"about the vehicle's Z-axis)" );
|
||||
addField( "rollForce", TypeF32, Offset(rollForce, HoverVehicleData),
|
||||
"Roll (rotation about the Y-axis) force applied when steering in the x-axis direction." );
|
||||
addField( "pitchForce", TypeF32, Offset(pitchForce, HoverVehicleData),
|
||||
"Pitch (rotation about the X-axis) force applied when steering in the y-axis direction." );
|
||||
endGroup("AutoCorrection");
|
||||
|
||||
INITPERSISTFIELD_SOUNDASSET_ENUMED(HoverSounds, hoverSoundsEnum, Sounds::MaxSounds, HoverVehicleData, "Sounds for hover vehicle.");
|
||||
|
||||
addGroup("Particle Effects");
|
||||
addField( "dustTrailEmitter", TYPEID< ParticleEmitterData >(), Offset(dustTrailEmitter, HoverVehicleData),
|
||||
"Emitter to generate particles for the vehicle's dust trail.\nThe trail "
|
||||
"of dust particles is generated only while the vehicle is moving." );
|
||||
addField( "forwardJetEmitter", TYPEID< ParticleEmitterData >(), Offset(jetEmitter[ForwardJetEmitter], HoverVehicleData),
|
||||
"Emitter to generate particles for forward jet thrust.\nForward jet "
|
||||
"thrust particles are emitted from model nodes JetNozzle0 and JetNozzle1." );
|
||||
addField( "dustTrailOffset", TypePoint3F, Offset(dustTrailOffset, HoverVehicleData),
|
||||
"\"X Y Z\" offset from the vehicle's origin from which to generate dust "
|
||||
"trail particles.\nBy default particles are emitted directly beneath the "
|
||||
|
|
@ -261,21 +268,13 @@ void HoverVehicleData::initPersistFields()
|
|||
"vehicle's speed is divided by this value to determine how many particles "
|
||||
"to generate each frame. Lower values give a more dense trail, higher "
|
||||
"values a more sparse trail." );
|
||||
endGroup("Sounds");
|
||||
|
||||
addGroup("Particle Effects");
|
||||
INITPERSISTFIELD_SOUNDASSET_ENUMED(HoverSounds, hoverSoundsEnum, Sounds::MaxSounds, HoverVehicleData, "Sounds for hover vehicle.");
|
||||
endGroup("Sounds");
|
||||
|
||||
addField( "floatingGravMag", TypeF32, Offset(floatingGravMag, HoverVehicleData),
|
||||
"Scale factor applied to the vehicle gravitational force when the vehicle "
|
||||
"is floating.\n\n@see stabLenMin" );
|
||||
addField( "brakingForce", TypeF32, Offset(brakingForce, HoverVehicleData),
|
||||
"Force generated by braking.\nThe vehicle is considered to be braking if "
|
||||
"it is moving, but the throttle is off, and no left or right thrust is "
|
||||
"being applied. This force is only applied when the vehicle's velocity is "
|
||||
"less than brakingActivationSpeed." );
|
||||
addField( "brakingActivationSpeed", TypeF32, Offset(brakingActivationSpeed, HoverVehicleData),
|
||||
"Maximum speed below which a braking force is applied.\n\n@see brakingForce" );
|
||||
|
||||
addField( "forwardJetEmitter", TYPEID< ParticleEmitterData >(), Offset(jetEmitter[ForwardJetEmitter], HoverVehicleData),
|
||||
"Emitter to generate particles for forward jet thrust.\nForward jet "
|
||||
"thrust particles are emitted from model nodes JetNozzle0 and JetNozzle1." );
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue