fill in the validated variables

This commit is contained in:
AzaezelX 2025-03-09 11:53:23 -05:00
parent fa760fa746
commit f633ef3a3d
184 changed files with 1359 additions and 1216 deletions

View file

@ -106,21 +106,21 @@ void PhysicsShapeData::initPersistFields()
addGroup( "Physics" );
addField( "mass", TypeF32, Offset( mass, PhysicsShapeData ),
addFieldV( "mass", TypeRangedF32, Offset( mass, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Value representing the mass of the shape.\n\n"
"A shape's mass influences the magnitude of any force exerted on it. "
"For example, a PhysicsShape with a large mass requires a much larger force to move than "
"the same shape with a smaller mass.\n"
"@note A mass of zero will create a kinematic shape while anything greater will create a dynamic shape.");
addField( "friction", TypeF32, Offset( dynamicFriction, PhysicsShapeData ),
addFieldV( "friction", TypeRangedF32, Offset( dynamicFriction, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Coefficient of kinetic %friction to be applied to the shape.\n\n"
"Kinetic %friction reduces the velocity of a moving object while it is in contact with a surface. "
"A higher coefficient will result in a larger velocity reduction. "
"A shape's friction should be lower than it's staticFriction, but larger than 0.\n\n"
"@note This value is only applied while an object is in motion. For an object starting at rest, see PhysicsShape::staticFriction");
addField( "staticFriction", TypeF32, Offset( staticFriction, PhysicsShapeData ),
addFieldV( "staticFriction", TypeRangedF32, Offset( staticFriction, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Coefficient of static %friction to be applied to the shape.\n\n"
"Static %friction determines the force needed to start moving an at-rest object in contact with a surface. "
"If the force applied onto shape cannot overcome the force of static %friction, the shape will remain at rest. "
@ -128,7 +128,7 @@ void PhysicsShapeData::initPersistFields()
"This value should be larger than zero and the physicsShape's friction.\n\n"
"@note This value is only applied while an object is at rest. For an object in motion, see PhysicsShape::friction");
addField( "restitution", TypeF32, Offset( restitution, PhysicsShapeData ),
addFieldV( "restitution", TypeRangedF32, Offset( restitution, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Coeffecient of a bounce applied to the shape in response to a collision.\n\n"
"Restitution is a ratio of a shape's velocity before and after a collision. "
"A value of 0 will zero out a shape's post-collision velocity, making it stop on contact. "
@ -137,30 +137,30 @@ void PhysicsShapeData::initPersistFields()
"@note Values near or equaling 1.0 are likely to cause undesirable results in the physics simulation."
" Because of this it is reccomended to avoid values close to 1.0");
addField( "linearDamping", TypeF32, Offset( linearDamping, PhysicsShapeData ),
addFieldV( "linearDamping", TypeRangedF32, Offset( linearDamping, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Value that reduces an object's linear velocity over time.\n\n"
"Larger values will cause velocity to decay quicker.\n\n" );
addField( "angularDamping", TypeF32, Offset( angularDamping, PhysicsShapeData ),
addFieldV( "angularDamping", TypeRangedF32, Offset( angularDamping, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Value that reduces an object's rotational velocity over time.\n\n"
"Larger values will cause velocity to decay quicker.\n\n" );
addField( "linearSleepThreshold", TypeF32, Offset( linearSleepThreshold, PhysicsShapeData ),
addFieldV( "linearSleepThreshold", TypeRangedF32, Offset( linearSleepThreshold, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Minimum linear velocity before the shape can be put to sleep.\n\n"
"This should be a positive value. Shapes put to sleep will not be simulated in order to save system resources.\n\n"
"@note The shape must be dynamic.");
addField( "angularSleepThreshold", TypeF32, Offset( angularSleepThreshold, PhysicsShapeData ),
addFieldV( "angularSleepThreshold", TypeRangedF32, Offset( angularSleepThreshold, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Minimum rotational velocity before the shape can be put to sleep.\n\n"
"This should be a positive value. Shapes put to sleep will not be simulated in order to save system resources.\n\n"
"@note The shape must be dynamic.");
addField( "waterDampingScale", TypeF32, Offset( waterDampingScale, PhysicsShapeData ),
addFieldV( "waterDampingScale", TypeRangedF32, Offset( waterDampingScale, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief Scale to apply to linear and angular dampening while underwater.\n\n "
"Used with the waterViscosity of the "
"@see angularDamping linearDamping" );
addField( "buoyancyDensity", TypeF32, Offset( buoyancyDensity, PhysicsShapeData ),
addFieldV( "buoyancyDensity", TypeRangedF32, Offset( buoyancyDensity, PhysicsShapeData ), &CommonValidators::PositiveFloat,
"@brief The density of the shape for calculating buoyant forces.\n\n"
"The result of the calculated buoyancy is relative to the density of the WaterObject the PhysicsShape is within.\n\n"
"@see WaterObject::density");