mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
fill in the validated variables
This commit is contained in:
parent
fa760fa746
commit
f633ef3a3d
184 changed files with 1359 additions and 1216 deletions
|
|
@ -384,7 +384,11 @@ ExplosionData* ExplosionData::cloneAndPerformSubstitutions(const SimObject* owne
|
|||
|
||||
return sub_explosion_db;
|
||||
}
|
||||
|
||||
IRangeValidator expPartDensityRange(0, 1<<14);
|
||||
IRangeValidator expDebrisNumRange(0, 1000);
|
||||
FRangeValidator expPlaySpeedRange(0.05f, FLT_MAX);
|
||||
FRangeValidator expLightRadiusRange(0.0f, MaxLightRadius,1<<8);
|
||||
FRangeValidator expTimeRange(0.0f, 1.0f, 1 << 8);
|
||||
void ExplosionData::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
|
|
@ -409,10 +413,10 @@ void ExplosionData::initPersistFields()
|
|||
"The second effect spawns the list of ParticleEmitters given by the emitter[] "
|
||||
"field. These emitters generate particles in the normal way throughout the "
|
||||
"lifetime of the explosion." );
|
||||
addField( "particleDensity", TypeS32, Offset(particleDensity, ExplosionData),
|
||||
addFieldV( "particleDensity", TypeRangedS32, Offset(particleDensity, ExplosionData), &expPartDensityRange,
|
||||
"@brief Density of the particle cloud created at the start of the explosion.\n\n"
|
||||
"@see particleEmitter" );
|
||||
addField( "particleRadius", TypeF32, Offset(particleRadius, ExplosionData),
|
||||
addFieldV( "particleRadius", TypeRangedF32, Offset(particleRadius, ExplosionData),&CommonValidators::PositiveFloat,
|
||||
"@brief Radial distance from the explosion center at which cloud particles "
|
||||
"are emitted.\n\n"
|
||||
"@see particleEmitter" );
|
||||
|
|
@ -425,21 +429,21 @@ void ExplosionData::initPersistFields()
|
|||
addGroup("Debris");
|
||||
addField( "debris", TYPEID< DebrisData >(), Offset(debrisList, ExplosionData), EC_NUM_DEBRIS_TYPES,
|
||||
"List of DebrisData objects to spawn with this explosion." );
|
||||
addField( "debrisThetaMin", TypeF32, Offset(debrisThetaMin, ExplosionData),
|
||||
addFieldV( "debrisThetaMin", TypeRangedF32, Offset(debrisThetaMin, ExplosionData), &CommonValidators::PosDegreeRangeHalf,
|
||||
"Minimum angle, from the horizontal plane, to eject debris from." );
|
||||
addField( "debrisThetaMax", TypeF32, Offset(debrisThetaMax, ExplosionData),
|
||||
addFieldV( "debrisThetaMax", TypeRangedF32, Offset(debrisThetaMax, ExplosionData), &CommonValidators::PosDegreeRangeHalf,
|
||||
"Maximum angle, from the horizontal plane, to eject debris from." );
|
||||
addField( "debrisPhiMin", TypeF32, Offset(debrisPhiMin, ExplosionData),
|
||||
addFieldV( "debrisPhiMin", TypeRangedF32, Offset(debrisPhiMin, ExplosionData), &CommonValidators::PosDegreeRange,
|
||||
"Minimum reference angle, from the vertical plane, to eject debris from." );
|
||||
addField( "debrisPhiMax", TypeF32, Offset(debrisPhiMax, ExplosionData),
|
||||
addFieldV( "debrisPhiMax", TypeRangedF32, Offset(debrisPhiMax, ExplosionData), &CommonValidators::PosDegreeRange,
|
||||
"Maximum reference angle, from the vertical plane, to eject debris from." );
|
||||
addField( "debrisNum", TypeS32, Offset(debrisNum, ExplosionData),
|
||||
addFieldV( "debrisNum", TypeRangedS32, Offset(debrisNum, ExplosionData), &expDebrisNumRange,
|
||||
"Number of debris objects to create." );
|
||||
addField( "debrisNumVariance", TypeS32, Offset(debrisNumVariance, ExplosionData),
|
||||
addFieldV( "debrisNumVariance", TypeRangedS32, Offset(debrisNumVariance, ExplosionData), &expDebrisNumRange,
|
||||
"Variance in the number of debris objects to create (must be from 0 - debrisNum)." );
|
||||
addField( "debrisVelocity", TypeF32, Offset(debrisVelocity, ExplosionData),
|
||||
addFieldV( "debrisVelocity", TypeRangedF32, Offset(debrisVelocity, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Velocity to toss debris at." );
|
||||
addField( "debrisVelocityVariance", TypeF32, Offset(debrisVelocityVariance, ExplosionData),
|
||||
addFieldV( "debrisVelocityVariance", TypeRangedF32, Offset(debrisVelocityVariance, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Variance in the debris initial velocity (must be >= 0)." );
|
||||
addField( "subExplosion", TYPEID< ExplosionData >(), Offset(explosionList, ExplosionData), EC_MAX_SUB_EXPLOSIONS,
|
||||
"List of additional ExplosionData objects to create at the start of the explosion." );
|
||||
|
|
@ -450,27 +454,27 @@ void ExplosionData::initPersistFields()
|
|||
addField("explosionScale", TypePoint3F, Offset(explosionScale, ExplosionData),
|
||||
"\"X Y Z\" scale factor applied to the explosionShape model at the start "
|
||||
"of the explosion.");
|
||||
addField("playSpeed", TypeF32, Offset(playSpeed, ExplosionData),
|
||||
addFieldV("playSpeed", TypeRangedF32, Offset(playSpeed, ExplosionData),&expPlaySpeedRange,
|
||||
"Time scale at which to play the explosionShape <i>ambient</i> sequence.");
|
||||
|
||||
addField( "delayMS", TypeS32, Offset(delayMS, ExplosionData),
|
||||
addFieldV( "delayMS", TypeRangedS32, Offset(delayMS, ExplosionData), &CommonValidators::PositiveInt,
|
||||
"Amount of time, in milliseconds, to delay the start of the explosion effect "
|
||||
"from the creation of the Explosion object." );
|
||||
addField( "delayVariance", TypeS32, Offset(delayVariance, ExplosionData),
|
||||
addFieldV( "delayVariance", TypeRangedS32, Offset(delayVariance, ExplosionData), &CommonValidators::PositiveInt,
|
||||
"Variance, in milliseconds, of delayMS." );
|
||||
addField( "lifetimeMS", TypeS32, Offset(lifetimeMS, ExplosionData),
|
||||
addFieldV( "lifetimeMS", TypeRangedS32, Offset(lifetimeMS, ExplosionData), &CommonValidators::PositiveInt,
|
||||
"@brief Lifetime, in milliseconds, of the Explosion object.\n\n"
|
||||
"@note If explosionShape is defined and contains an <i>ambient</i> animation, "
|
||||
"this field is ignored, and the playSpeed scaled duration of the animation "
|
||||
"is used instead." );
|
||||
addField( "lifetimeVariance", TypeS32, Offset(lifetimeVariance, ExplosionData),
|
||||
addFieldV( "lifetimeVariance", TypeRangedS32, Offset(lifetimeVariance, ExplosionData), &CommonValidators::PositiveInt,
|
||||
"Variance, in milliseconds, of the lifetimeMS of the Explosion object.\n" );
|
||||
addField( "offset", TypeF32, Offset(offset, ExplosionData),
|
||||
addFieldV( "offset", TypeRangedF32, Offset(offset, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"@brief Offset distance (in a random direction) of the center of the explosion "
|
||||
"from the Explosion object position.\n\n"
|
||||
"Most often used to create some variance in position for subExplosion effects." );
|
||||
|
||||
addField( "times", TypeF32, Offset(times, ExplosionData), EC_NUM_TIME_KEYS,
|
||||
addFieldV( "times", TypeRangedF32, Offset(times, ExplosionData), &expTimeRange, EC_NUM_TIME_KEYS,
|
||||
"@brief Time keyframes used to scale the explosionShape model.\n\n"
|
||||
"Values should be in increasing order from 0.0 - 1.0, and correspond to "
|
||||
"the life of the Explosion where 0 is the beginning and 1 is the end of "
|
||||
|
|
@ -491,22 +495,22 @@ void ExplosionData::initPersistFields()
|
|||
addField( "camShakeAmp", TypePoint3F, Offset(camShakeAmp, ExplosionData),
|
||||
"@brief Amplitude of camera shaking, defined in the \"X Y Z\" axes.\n\n"
|
||||
"Set any value to 0 to disable shaking in that axis." );
|
||||
addField( "camShakeDuration", TypeF32, Offset(camShakeDuration, ExplosionData),
|
||||
addFieldV( "camShakeDuration", TypeRangedF32, Offset(camShakeDuration, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Duration (in seconds) to shake the camera." );
|
||||
addField( "camShakeRadius", TypeF32, Offset(camShakeRadius, ExplosionData),
|
||||
addFieldV( "camShakeRadius", TypeRangedF32, Offset(camShakeRadius, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Radial distance that a camera's position must be within relative to the "
|
||||
"center of the explosion to be shaken." );
|
||||
addField( "camShakeFalloff", TypeF32, Offset(camShakeFalloff, ExplosionData),
|
||||
addFieldV( "camShakeFalloff", TypeRangedF32, Offset(camShakeFalloff, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Falloff value for the camera shake." );
|
||||
endGroup("Camera Shake");
|
||||
|
||||
addGroup("Light Emitter");
|
||||
addField( "lightStartRadius", TypeF32, Offset(lightStartRadius, ExplosionData),
|
||||
addFieldV( "lightStartRadius", TypeRangedF32, Offset(lightStartRadius, ExplosionData), &expLightRadiusRange,
|
||||
"@brief Initial radius of the PointLight created by this explosion.\n\n"
|
||||
"Radius is linearly interpolated from lightStartRadius to lightEndRadius "
|
||||
"over the lifetime of the explosion.\n"
|
||||
"@see lifetimeMS" );
|
||||
addField( "lightEndRadius", TypeF32, Offset(lightEndRadius, ExplosionData),
|
||||
addFieldV( "lightEndRadius", TypeRangedF32, Offset(lightEndRadius, ExplosionData), &expLightRadiusRange,
|
||||
"@brief Final radius of the PointLight created by this explosion.\n\n"
|
||||
"@see lightStartRadius" );
|
||||
addField( "lightStartColor", TypeColorF, Offset(lightStartColor, ExplosionData),
|
||||
|
|
@ -517,15 +521,15 @@ void ExplosionData::initPersistFields()
|
|||
addField( "lightEndColor", TypeColorF, Offset(lightEndColor, ExplosionData),
|
||||
"@brief Final color of the PointLight created by this explosion.\n\n"
|
||||
"@see lightStartColor" );
|
||||
addField( "lightStartBrightness", TypeF32, Offset(lightStartBrightness, ExplosionData),
|
||||
addFieldV( "lightStartBrightness", TypeRangedF32, Offset(lightStartBrightness, ExplosionData), &expLightRadiusRange,
|
||||
"@brief Initial brightness of the PointLight created by this explosion.\n\n"
|
||||
"Brightness is linearly interpolated from lightStartBrightness to "
|
||||
"lightEndBrightness over the lifetime of the explosion.\n"
|
||||
"@see lifetimeMS" );
|
||||
addField("lightEndBrightness", TypeF32, Offset(lightEndBrightness, ExplosionData),
|
||||
addFieldV("lightEndBrightness", TypeRangedF32, Offset(lightEndBrightness, ExplosionData), &expLightRadiusRange,
|
||||
"@brief Final brightness of the PointLight created by this explosion.\n\n"
|
||||
"@see lightStartBrightness" );
|
||||
addField( "lightNormalOffset", TypeF32, Offset(lightNormalOffset, ExplosionData),
|
||||
addFieldV( "lightNormalOffset", TypeRangedF32, Offset(lightNormalOffset, ExplosionData), &CommonValidators::PositiveFloat,
|
||||
"Distance (in the explosion normal direction) of the PointLight position "
|
||||
"from the explosion center." );
|
||||
endGroup("Light Emitter");
|
||||
|
|
@ -754,12 +758,12 @@ void ExplosionData::packData(BitStream* stream)
|
|||
// Dynamic light info
|
||||
stream->writeFloat(lightStartRadius/MaxLightRadius, 8);
|
||||
stream->writeFloat(lightEndRadius/MaxLightRadius, 8);
|
||||
stream->writeFloat(lightStartColor.red,7);
|
||||
stream->writeFloat(lightStartColor.green,7);
|
||||
stream->writeFloat(lightStartColor.blue,7);
|
||||
stream->writeFloat(lightEndColor.red,7);
|
||||
stream->writeFloat(lightEndColor.green,7);
|
||||
stream->writeFloat(lightEndColor.blue,7);
|
||||
stream->writeFloat(lightStartColor.red,8);
|
||||
stream->writeFloat(lightStartColor.green,8);
|
||||
stream->writeFloat(lightStartColor.blue,8);
|
||||
stream->writeFloat(lightEndColor.red,8);
|
||||
stream->writeFloat(lightEndColor.green,8);
|
||||
stream->writeFloat(lightEndColor.blue,8);
|
||||
stream->writeFloat(lightStartBrightness/MaxLightRadius, 8);
|
||||
stream->writeFloat(lightEndBrightness/MaxLightRadius, 8);
|
||||
stream->write(lightNormalOffset);
|
||||
|
|
@ -858,12 +862,12 @@ void ExplosionData::unpackData(BitStream* stream)
|
|||
//
|
||||
lightStartRadius = stream->readFloat(8) * MaxLightRadius;
|
||||
lightEndRadius = stream->readFloat(8) * MaxLightRadius;
|
||||
lightStartColor.red = stream->readFloat(7);
|
||||
lightStartColor.green = stream->readFloat(7);
|
||||
lightStartColor.blue = stream->readFloat(7);
|
||||
lightEndColor.red = stream->readFloat(7);
|
||||
lightEndColor.green = stream->readFloat(7);
|
||||
lightEndColor.blue = stream->readFloat(7);
|
||||
lightStartColor.red = stream->readFloat(8);
|
||||
lightStartColor.green = stream->readFloat(8);
|
||||
lightStartColor.blue = stream->readFloat(8);
|
||||
lightEndColor.red = stream->readFloat(8);
|
||||
lightEndColor.green = stream->readFloat(8);
|
||||
lightEndColor.blue = stream->readFloat(8);
|
||||
lightStartBrightness = stream->readFloat(8) * MaxLightRadius;
|
||||
lightEndBrightness = stream->readFloat(8) * MaxLightRadius;
|
||||
stream->read( &lightNormalOffset );
|
||||
|
|
|
|||
|
|
@ -349,35 +349,35 @@ void fxFoliageReplicator::initPersistFields()
|
|||
// Add out own persistent fields.
|
||||
addGroup( "Debugging" ); // MM: Added Group Header.
|
||||
addField( "UseDebugInfo", TypeBool, Offset( mFieldData.mUseDebugInfo, fxFoliageReplicator ), "Culling bins are drawn when set to true." );
|
||||
addField( "DebugBoxHeight", TypeF32, Offset( mFieldData.mDebugBoxHeight, fxFoliageReplicator ), "Height multiplier for drawn culling bins.");
|
||||
addFieldV( "DebugBoxHeight", TypeRangedF32, Offset( mFieldData.mDebugBoxHeight, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Height multiplier for drawn culling bins.");
|
||||
addField( "HideFoliage", TypeBool, Offset( mFieldData.mHideFoliage, fxFoliageReplicator ), "Foliage is hidden when set to true." );
|
||||
addField( "ShowPlacementArea", TypeBool, Offset( mFieldData.mShowPlacementArea, fxFoliageReplicator ), "Draw placement rings when set to true." );
|
||||
addField( "PlacementAreaHeight", TypeS32, Offset( mFieldData.mPlacementBandHeight, fxFoliageReplicator ), "Height of the placement ring in world units." );
|
||||
addFieldV( "PlacementAreaHeight", TypeRangedS32, Offset( mFieldData.mPlacementBandHeight, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Height of the placement ring in world units." );
|
||||
addField( "PlacementColour", TypeColorF, Offset( mFieldData.mPlaceAreaColour, fxFoliageReplicator ), "Color of the placement ring." );
|
||||
endGroup( "Debugging" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Media" ); // MM: Added Group Header.
|
||||
addField( "Seed", TypeS32, Offset( mFieldData.mSeed, fxFoliageReplicator ), "Random seed for foliage placement." );
|
||||
addField( "FoliageFile", TypeFilename, Offset( mFieldData.mFoliageFile, fxFoliageReplicator ), "Image file for the foliage texture." );
|
||||
addField( "FoliageCount", TypeS32, Offset( mFieldData.mFoliageCount, fxFoliageReplicator ), "Maximum foliage instance count." );
|
||||
addField( "FoliageRetries", TypeS32, Offset( mFieldData.mFoliageRetries, fxFoliageReplicator ), "Number of times to try placing a foliage instance before giving up." );
|
||||
addFieldV( "FoliageCount", TypeRangedS32, Offset( mFieldData.mFoliageCount, fxFoliageReplicator ), &CommonValidators::NaturalNumber, "Maximum foliage instance count." );
|
||||
addFieldV( "FoliageRetries", TypeRangedS32, Offset( mFieldData.mFoliageRetries, fxFoliageReplicator ), &CommonValidators::PositiveInt, "Number of times to try placing a foliage instance before giving up." );
|
||||
endGroup( "Media" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Area" ); // MM: Added Group Header.
|
||||
addField( "InnerRadiusX", TypeS32, Offset( mFieldData.mInnerRadiusX, fxFoliageReplicator ), "Placement area inner radius on the X axis" );
|
||||
addField( "InnerRadiusY", TypeS32, Offset( mFieldData.mInnerRadiusY, fxFoliageReplicator ), "Placement area inner radius on the Y axis" );
|
||||
addField( "OuterRadiusX", TypeS32, Offset( mFieldData.mOuterRadiusX, fxFoliageReplicator ), "Placement area outer radius on the X axis" );
|
||||
addField( "OuterRadiusY", TypeS32, Offset( mFieldData.mOuterRadiusY, fxFoliageReplicator ), "Placement area outer radius on the Y axis" );
|
||||
addFieldV( "InnerRadiusX", TypeRangedS32, Offset( mFieldData.mInnerRadiusX, fxFoliageReplicator ), &CommonValidators::PositiveInt, "Placement area inner radius on the X axis" );
|
||||
addFieldV( "InnerRadiusY", TypeRangedS32, Offset( mFieldData.mInnerRadiusY, fxFoliageReplicator ), &CommonValidators::PositiveInt, "Placement area inner radius on the Y axis" );
|
||||
addFieldV( "OuterRadiusX", TypeRangedS32, Offset( mFieldData.mOuterRadiusX, fxFoliageReplicator ), &CommonValidators::PositiveInt, "Placement area outer radius on the X axis" );
|
||||
addFieldV( "OuterRadiusY", TypeRangedS32, Offset( mFieldData.mOuterRadiusY, fxFoliageReplicator ), &CommonValidators::PositiveInt, "Placement area outer radius on the Y axis" );
|
||||
endGroup( "Area" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Dimensions" ); // MM: Added Group Header.
|
||||
addField( "MinWidth", TypeF32, Offset( mFieldData.mMinWidth, fxFoliageReplicator ), "Minimum width of foliage billboards" );
|
||||
addField( "MaxWidth", TypeF32, Offset( mFieldData.mMaxWidth, fxFoliageReplicator ), "Maximum width of foliage billboards" );
|
||||
addField( "MinHeight", TypeF32, Offset( mFieldData.mMinHeight, fxFoliageReplicator ), "Minimum height of foliage billboards" );
|
||||
addField( "MaxHeight", TypeF32, Offset( mFieldData.mMaxHeight, fxFoliageReplicator ), "Maximum height of foliage billboards" );
|
||||
addFieldV( "MinWidth", TypeRangedF32, Offset( mFieldData.mMinWidth, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Minimum width of foliage billboards" );
|
||||
addFieldV( "MaxWidth", TypeRangedF32, Offset( mFieldData.mMaxWidth, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Maximum width of foliage billboards" );
|
||||
addFieldV( "MinHeight", TypeRangedF32, Offset( mFieldData.mMinHeight, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Minimum height of foliage billboards" );
|
||||
addFieldV( "MaxHeight", TypeRangedF32, Offset( mFieldData.mMaxHeight, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Maximum height of foliage billboards" );
|
||||
addField( "FixAspectRatio", TypeBool, Offset( mFieldData.mFixAspectRatio, fxFoliageReplicator ), "Maintain aspect ratio of image if true. This option ignores MaxWidth." );
|
||||
addField( "FixSizeToMax", TypeBool, Offset( mFieldData.mFixSizeToMax, fxFoliageReplicator ), "Use only MaxWidth and MaxHeight for billboard size. Ignores MinWidth and MinHeight." );
|
||||
addField( "OffsetZ", TypeF32, Offset( mFieldData.mOffsetZ, fxFoliageReplicator ), "Offset billboards by this amount vertically." );
|
||||
addFieldV( "OffsetZ", TypeRangedF32, Offset( mFieldData.mOffsetZ, fxFoliageReplicator ), &CommonValidators::F32Range, "Offset billboards by this amount vertically." );
|
||||
addField( "RandomFlip", TypeBool, Offset( mFieldData.mRandomFlip, fxFoliageReplicator ), "Randomly flip billboards left-to-right." );
|
||||
addField( "UseTrueBillboards", TypeBool, Offset( mFieldData.mUseTrueBillboards, fxFoliageReplicator ), "Use camera facing billboards ( including the z axis )." );
|
||||
endGroup( "Dimensions" ); // MM: Added Group Footer.
|
||||
|
|
@ -385,29 +385,29 @@ void fxFoliageReplicator::initPersistFields()
|
|||
addGroup( "Culling" ); // MM: Added Group Header.
|
||||
addField( "UseCulling", TypeBool, Offset( mFieldData.mUseCulling, fxFoliageReplicator ), "Use culling bins when enabled." );
|
||||
addField( "CullResolution", TypeS32, Offset( mFieldData.mCullResolution, fxFoliageReplicator ), "Minimum size of culling bins. Must be >= 8 and <= OuterRadius." );
|
||||
addField( "ViewDistance", TypeF32, Offset( mFieldData.mViewDistance, fxFoliageReplicator ), "Maximum distance from camera where foliage appears." );
|
||||
addField( "ViewClosest", TypeF32, Offset( mFieldData.mViewClosest, fxFoliageReplicator ), "Minimum distance from camera where foliage appears." );
|
||||
addField( "FadeInRegion", TypeF32, Offset( mFieldData.mFadeInRegion, fxFoliageReplicator ), "Region beyond ViewDistance where foliage fades in/out." );
|
||||
addField( "FadeOutRegion", TypeF32, Offset( mFieldData.mFadeOutRegion, fxFoliageReplicator ), "Region before ViewClosest where foliage fades in/out." );
|
||||
addField( "AlphaCutoff", TypeF32, Offset( mFieldData.mAlphaCutoff, fxFoliageReplicator ), "Minimum alpha value allowed on foliage instances." );
|
||||
addField( "GroundAlpha", TypeF32, Offset( mFieldData.mGroundAlpha, fxFoliageReplicator ), "Alpha of the foliage at ground level. 0 = transparent, 1 = opaque." );
|
||||
addFieldV( "ViewDistance", TypeRangedF32, Offset( mFieldData.mViewDistance, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Maximum distance from camera where foliage appears." );
|
||||
addFieldV( "ViewClosest", TypeRangedF32, Offset( mFieldData.mViewClosest, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Minimum distance from camera where foliage appears." );
|
||||
addFieldV( "FadeInRegion", TypeRangedF32, Offset( mFieldData.mFadeInRegion, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Region beyond ViewDistance where foliage fades in/out." );
|
||||
addFieldV( "FadeOutRegion", TypeRangedF32, Offset( mFieldData.mFadeOutRegion, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Region before ViewClosest where foliage fades in/out." );
|
||||
addFieldV( "AlphaCutoff", TypeRangedF32, Offset( mFieldData.mAlphaCutoff, fxFoliageReplicator ),&CommonValidators::NormalizedFloat, "Minimum alpha value allowed on foliage instances.");
|
||||
addFieldV( "GroundAlpha", TypeRangedF32, Offset( mFieldData.mGroundAlpha, fxFoliageReplicator ), &CommonValidators::NormalizedFloat, "Alpha of the foliage at ground level. 0 = transparent, 1 = opaque." );
|
||||
endGroup( "Culling" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Animation" ); // MM: Added Group Header.
|
||||
addField( "SwayOn", TypeBool, Offset( mFieldData.mSwayOn, fxFoliageReplicator ), "Foliage should sway randomly when true." );
|
||||
addField( "SwaySync", TypeBool, Offset( mFieldData.mSwaySync, fxFoliageReplicator ), "Foliage instances should sway together when true and SwayOn is enabled." );
|
||||
addField( "SwayMagSide", TypeF32, Offset( mFieldData.mSwayMagnitudeSide, fxFoliageReplicator ), "Left-to-right sway magnitude." );
|
||||
addField( "SwayMagFront", TypeF32, Offset( mFieldData.mSwayMagnitudeFront, fxFoliageReplicator ), "Front-to-back sway magnitude." );
|
||||
addField( "MinSwayTime", TypeF32, Offset( mFieldData.mMinSwayTime, fxFoliageReplicator ), "Minumum sway cycle time in seconds." );
|
||||
addField( "MaxSwayTime", TypeF32, Offset( mFieldData.mMaxSwayTime, fxFoliageReplicator ), "Maximum sway cycle time in seconds." );
|
||||
addFieldV( "SwayMagSide", TypeRangedF32, Offset( mFieldData.mSwayMagnitudeSide, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Left-to-right sway magnitude." );
|
||||
addFieldV( "SwayMagFront", TypeRangedF32, Offset( mFieldData.mSwayMagnitudeFront, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Front-to-back sway magnitude." );
|
||||
addFieldV( "MinSwayTime", TypeRangedF32, Offset( mFieldData.mMinSwayTime, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Minumum sway cycle time in seconds." );
|
||||
addFieldV( "MaxSwayTime", TypeRangedF32, Offset( mFieldData.mMaxSwayTime, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Maximum sway cycle time in seconds." );
|
||||
endGroup( "Animation" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Lighting" ); // MM: Added Group Header.
|
||||
addField( "LightOn", TypeBool, Offset( mFieldData.mLightOn, fxFoliageReplicator ), "Foliage should be illuminated with changing lights when true." );
|
||||
addField( "LightSync", TypeBool, Offset( mFieldData.mLightSync, fxFoliageReplicator ), "Foliage instances have the same lighting when set and LightOn is set." );
|
||||
addField( "MinLuminance", TypeF32, Offset( mFieldData.mMinLuminance, fxFoliageReplicator ), "Minimum luminance for foliage instances." );
|
||||
addField( "MaxLuminance", TypeF32, Offset( mFieldData.mMaxLuminance, fxFoliageReplicator ), "Maximum luminance for foliage instances." );
|
||||
addField( "LightTime", TypeF32, Offset( mFieldData.mLightTime, fxFoliageReplicator ), "Time before foliage illumination cycle repeats." );
|
||||
addFieldV( "MinLuminance", TypeRangedF32, Offset( mFieldData.mMinLuminance, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Minimum luminance for foliage instances." );
|
||||
addFieldV( "MaxLuminance", TypeRangedF32, Offset( mFieldData.mMaxLuminance, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Maximum luminance for foliage instances." );
|
||||
addFieldV( "LightTime", TypeRangedF32, Offset( mFieldData.mLightTime, fxFoliageReplicator ), &CommonValidators::PositiveFloat, "Time before foliage illumination cycle repeats." );
|
||||
endGroup( "Lighting" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "Restrictions" ); // MM: Added Group Header.
|
||||
|
|
@ -415,11 +415,11 @@ void fxFoliageReplicator::initPersistFields()
|
|||
addField( "AllowOnStatics", TypeBool, Offset( mFieldData.mAllowStatics, fxFoliageReplicator ), "Foliage will be placed on Static shapes when set." );
|
||||
addField( "AllowOnWater", TypeBool, Offset( mFieldData.mAllowOnWater, fxFoliageReplicator ), "Foliage will be placed on/under water when set." );
|
||||
addField( "AllowWaterSurface", TypeBool, Offset( mFieldData.mAllowWaterSurface, fxFoliageReplicator ), "Foliage will be placed on water when set. Requires AllowOnWater." );
|
||||
addField( "AllowedTerrainSlope", TypeS32, Offset( mFieldData.mAllowedTerrainSlope, fxFoliageReplicator ), "Maximum surface angle allowed for foliage instances." );
|
||||
addFieldV( "AllowedTerrainSlope", TypeRangedS32, Offset( mFieldData.mAllowedTerrainSlope, fxFoliageReplicator ), &CommonValidators::S32_PosDegreeRangeQuarter, "Maximum surface angle allowed for foliage instances." );
|
||||
endGroup( "Restrictions" ); // MM: Added Group Footer.
|
||||
|
||||
addGroup( "AFX" );
|
||||
addField( "AmbientModulationBias", TypeF32, Offset( mFieldData.mAmbientModulationBias,fxFoliageReplicator ), "Multiplier controling amount foliage is modulated by sun's ambient." );
|
||||
addFieldV( "AmbientModulationBias", TypeRangedF32, Offset( mFieldData.mAmbientModulationBias,fxFoliageReplicator ), &CommonValidators::NormalizedFloat, "Multiplier controling amount foliage is modulated by sun's ambient." );
|
||||
endGroup( "AFX" );
|
||||
// Initialise parents' persistent fields.
|
||||
Parent::initPersistFields();
|
||||
|
|
|
|||
|
|
@ -680,30 +680,30 @@ U32 fxShapeReplicator::packUpdate(NetConnection * con, U32 mask, BitStream * str
|
|||
{
|
||||
stream->writeAffineTransform(mObjToWorld); // Replicator Position.
|
||||
|
||||
stream->writeInt(mFieldData.mSeed, 32); // Replicator Seed.
|
||||
stream->writeInt(mFieldData.mShapeCount, 32); // Shapes Count.
|
||||
stream->writeInt(mFieldData.mShapeRetries, 32); // Shapes Retries.
|
||||
stream->write(mFieldData.mSeed); // Replicator Seed.
|
||||
stream->write(mFieldData.mShapeCount); // Shapes Count.
|
||||
stream->write(mFieldData.mShapeRetries); // Shapes Retries.
|
||||
stream->writeString(mFieldData.mShapeFile);
|
||||
stream->writeInt(mFieldData.mInnerRadiusX, 32); // Shapes Inner Radius X.
|
||||
stream->writeInt(mFieldData.mInnerRadiusY, 32); // Shapes Inner Radius Y.
|
||||
stream->writeInt(mFieldData.mOuterRadiusX, 32); // Shapes Outer Radius X.
|
||||
stream->writeInt(mFieldData.mOuterRadiusY, 32); // Shapes Outer Radius Y.
|
||||
stream->write(mFieldData.mInnerRadiusX); // Shapes Inner Radius X.
|
||||
stream->write(mFieldData.mInnerRadiusY); // Shapes Inner Radius Y.
|
||||
stream->write(mFieldData.mOuterRadiusX); // Shapes Outer Radius X.
|
||||
stream->write(mFieldData.mOuterRadiusY); // Shapes Outer Radius Y.
|
||||
mathWrite(*stream, mFieldData.mShapeScaleMin); // Shapes Scale Min.
|
||||
mathWrite(*stream, mFieldData.mShapeScaleMax); // Shapes Scale Max.
|
||||
mathWrite(*stream, mFieldData.mShapeRotateMin); // Shapes Rotate Min.
|
||||
mathWrite(*stream, mFieldData.mShapeRotateMax); // Shapes Rotate Max.
|
||||
stream->writeSignedInt(mFieldData.mOffsetZ, 32); // Shapes Offset Z.
|
||||
stream->write(mFieldData.mOffsetZ); // Shapes Offset Z.
|
||||
stream->writeFlag(mFieldData.mAllowOnTerrain); // Allow on Terrain.
|
||||
stream->writeFlag(mFieldData.mAllowStatics); // Allow on Statics.
|
||||
stream->writeFlag(mFieldData.mAllowOnWater); // Allow on Water.
|
||||
stream->writeFlag(mFieldData.mAllowWaterSurface); // Allow on Water Surface.
|
||||
stream->writeSignedInt(mFieldData.mAllowedTerrainSlope, 32); // Shapes Offset Z.
|
||||
stream->write(mFieldData.mAllowedTerrainSlope); // Shapes Offset Z.
|
||||
stream->writeFlag(mFieldData.mAlignToTerrain); // Shapes AlignToTerrain.
|
||||
mathWrite(*stream, mFieldData.mTerrainAlignment); // Write Terrain Alignment.
|
||||
stream->writeFlag(mFieldData.mHideReplications); // Hide Replications.
|
||||
stream->writeFlag(mFieldData.mInteractions); // Shape Interactions.
|
||||
stream->writeFlag(mFieldData.mShowPlacementArea); // Show Placement Area Flag.
|
||||
stream->writeInt(mFieldData.mPlacementBandHeight, 32); // Placement Area Height.
|
||||
stream->write(mFieldData.mPlacementBandHeight); // Placement Area Height.
|
||||
stream->write(mFieldData.mPlaceAreaColour);
|
||||
}
|
||||
|
||||
|
|
@ -725,30 +725,30 @@ void fxShapeReplicator::unpackUpdate(NetConnection * con, BitStream * stream)
|
|||
|
||||
stream->readAffineTransform(&ReplicatorObjectMatrix); // Replication Position.
|
||||
|
||||
mFieldData.mSeed = stream->readInt(32); // Replicator Seed.
|
||||
mFieldData.mShapeCount = stream->readInt(32); // Shapes Count.
|
||||
mFieldData.mShapeRetries = stream->readInt(32); // Shapes Retries.
|
||||
stream->read(&mFieldData.mSeed); // Replicator Seed.
|
||||
stream->read(&mFieldData.mShapeCount); // Shapes Count.
|
||||
stream->read(&mFieldData.mShapeRetries); // Shapes Retries.
|
||||
mFieldData.mShapeFile = stream->readSTString(); // Shape File.
|
||||
mFieldData.mInnerRadiusX = stream->readInt(32); // Shapes Inner Radius X.
|
||||
mFieldData.mInnerRadiusY = stream->readInt(32); // Shapes Inner Radius Y.
|
||||
mFieldData.mOuterRadiusX = stream->readInt(32); // Shapes Outer Radius X.
|
||||
mFieldData.mOuterRadiusY = stream->readInt(32); // Shapes Outer Radius Y.
|
||||
mathRead(*stream, &mFieldData.mShapeScaleMin); // Shapes Scale Min.
|
||||
mathRead(*stream, &mFieldData.mShapeScaleMax); // Shapes Scale Max.
|
||||
mathRead(*stream, &mFieldData.mShapeRotateMin); // Shapes Rotate Min.
|
||||
mathRead(*stream, &mFieldData.mShapeRotateMax); // Shapes Rotate Max.
|
||||
mFieldData.mOffsetZ = stream->readSignedInt(32); // Shapes Offset Z.
|
||||
stream->read(&mFieldData.mInnerRadiusX); // Shapes Inner Radius X.
|
||||
stream->read(&mFieldData.mInnerRadiusY); // Shapes Inner Radius Y.
|
||||
stream->read(&mFieldData.mOuterRadiusX); // Shapes Outer Radius X.
|
||||
stream->read(&mFieldData.mOuterRadiusY); // Shapes Outer Radius Y.
|
||||
mathRead(*stream, &mFieldData.mShapeScaleMin); // Shapes Scale Min.
|
||||
mathRead(*stream, &mFieldData.mShapeScaleMax); // Shapes Scale Max.
|
||||
mathRead(*stream, &mFieldData.mShapeRotateMin); // Shapes Rotate Min.
|
||||
mathRead(*stream, &mFieldData.mShapeRotateMax); // Shapes Rotate Max.
|
||||
stream->read(&mFieldData.mOffsetZ); // Shapes Offset Z.
|
||||
mFieldData.mAllowOnTerrain = stream->readFlag(); // Allow on Terrain.
|
||||
mFieldData.mAllowStatics = stream->readFlag(); // Allow on Statics.
|
||||
mFieldData.mAllowOnWater = stream->readFlag(); // Allow on Water.
|
||||
mFieldData.mAllowWaterSurface = stream->readFlag(); // Allow on Water Surface.
|
||||
mFieldData.mAllowedTerrainSlope = stream->readSignedInt(32); // Allowed Terrain Slope.
|
||||
stream->read(&mFieldData.mAllowedTerrainSlope); // Allowed Terrain Slope.
|
||||
mFieldData.mAlignToTerrain = stream->readFlag(); // Read AlignToTerrain.
|
||||
mathRead(*stream, &mFieldData.mTerrainAlignment); // Read Terrain Alignment.
|
||||
mathRead(*stream, &mFieldData.mTerrainAlignment); // Read Terrain Alignment.
|
||||
mFieldData.mHideReplications = stream->readFlag(); // Hide Replications.
|
||||
mFieldData.mInteractions = stream->readFlag(); // Read Interactions.
|
||||
mFieldData.mShowPlacementArea = stream->readFlag(); // Show Placement Area Flag.
|
||||
mFieldData.mPlacementBandHeight = stream->readInt(32); // Placement Area Height.
|
||||
stream->read(&mFieldData.mPlacementBandHeight); // Placement Area Height.
|
||||
stream->read(&mFieldData.mPlaceAreaColour);
|
||||
|
||||
// Set Transform.
|
||||
|
|
|
|||
|
|
@ -545,18 +545,18 @@ void GroundCover::initPersistFields()
|
|||
|
||||
INITPERSISTFIELD_MATERIALASSET(Material, GroundCover, "Material used by all GroundCover segments.");
|
||||
|
||||
addField( "radius", TypeF32, Offset( mRadius, GroundCover ), "Outer generation radius from the current camera position." );
|
||||
addField( "dissolveRadius",TypeF32, Offset( mFadeRadius, GroundCover ), "This is less than or equal to radius and defines when fading of cover elements begins." );
|
||||
addField( "reflectScale", TypeF32, Offset( mReflectRadiusScale, GroundCover ), "Scales the various culling radii when rendering a reflection. Typically for water." );
|
||||
addFieldV( "radius", TypeRangedF32, Offset( mRadius, GroundCover ), &CommonValidators::PositiveFloat, "Outer generation radius from the current camera position." );
|
||||
addFieldV( "dissolveRadius", TypeRangedF32, Offset( mFadeRadius, GroundCover ), &CommonValidators::PositiveFloat, "This is less than or equal to radius and defines when fading of cover elements begins." );
|
||||
addFieldV( "reflectScale", TypeRangedF32, Offset( mReflectRadiusScale, GroundCover ), &CommonValidators::PositiveFloat, "Scales the various culling radii when rendering a reflection. Typically for water." );
|
||||
|
||||
addField( "gridSize", TypeS32, Offset( mGridSize, GroundCover ), "The number of cells per axis in the grid." );
|
||||
addField( "zOffset", TypeF32, Offset( mZOffset, GroundCover ), "Offset along the Z axis to render the ground cover." );
|
||||
addFieldV( "gridSize", TypeRangedS32, Offset( mGridSize, GroundCover ), &CommonValidators::PositiveInt, "The number of cells per axis in the grid." );
|
||||
addFieldV( "zOffset", TypeRangedF32, Offset( mZOffset, GroundCover ), &CommonValidators::F32Range, "Offset along the Z axis to render the ground cover." );
|
||||
|
||||
addField( "seed", TypeS32, Offset( mRandomSeed, GroundCover ), "This RNG seed is saved and sent to clients for generating the same cover." );
|
||||
addField( "maxElements", TypeS32, Offset( mMaxPlacement, GroundCover ), "The maximum amount of cover elements to include in the grid at any one time." );
|
||||
addFieldV( "maxElements", TypeRangedS32, Offset( mMaxPlacement, GroundCover ), &CommonValidators::PositiveInt, "The maximum amount of cover elements to include in the grid at any one time." );
|
||||
|
||||
addField( "maxBillboardTiltAngle", TypeF32, Offset( mMaxBillboardTiltAngle, GroundCover ),"The maximum amout of degrees the billboard will tilt down to match the camera." );
|
||||
addField( "shapeCullRadius", TypeF32, Offset( mShapeCullRadius, GroundCover ), "This is the distance at which DTS elements are completely culled out." );
|
||||
addFieldV( "maxBillboardTiltAngle", TypeRangedF32, Offset( mMaxBillboardTiltAngle, GroundCover ), &CommonValidators::PosDegreeRangeHalf,"The maximum amout of degrees the billboard will tilt down to match the camera." );
|
||||
addFieldV( "shapeCullRadius", TypeRangedF32, Offset( mShapeCullRadius, GroundCover ), &CommonValidators::PositiveFloat, "This is the distance at which DTS elements are completely culled out." );
|
||||
addField( "shapesCastShadows", TypeBool, Offset( mShapesCastShadows, GroundCover ), "Whether DTS elements should cast shadows or not." );
|
||||
|
||||
addArray( "Types", MAX_COVERTYPES );
|
||||
|
|
@ -570,37 +570,37 @@ void GroundCover::initPersistFields()
|
|||
|
||||
addField( "invertLayer", TypeBool, Offset( mInvertLayer, GroundCover ), MAX_COVERTYPES, "Indicates that the terrain material index given in 'layer' is an exclusion mask." );
|
||||
|
||||
addField( "probability", TypeF32, Offset( mProbability, GroundCover ), MAX_COVERTYPES, "The probability of one cover type verses another (relative to all cover types)." );
|
||||
addFieldV( "probability", TypeRangedF32, Offset( mProbability, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "The probability of one cover type verses another (relative to all cover types)." );
|
||||
|
||||
addField( "sizeMin", TypeF32, Offset( mSizeMin, GroundCover ), MAX_COVERTYPES, "The minimum random size for each cover type." );
|
||||
addFieldV( "sizeMin", TypeRangedF32, Offset( mSizeMin, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "The minimum random size for each cover type." );
|
||||
|
||||
addField( "sizeMax", TypeF32, Offset( mSizeMax, GroundCover ), MAX_COVERTYPES, "The maximum random size of this cover type." );
|
||||
addFieldV( "sizeMax", TypeRangedF32, Offset( mSizeMax, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "The maximum random size of this cover type." );
|
||||
|
||||
addField( "sizeExponent", TypeF32, Offset( mSizeExponent, GroundCover ), MAX_COVERTYPES, "An exponent used to bias between the minimum and maximum random sizes." );
|
||||
addFieldV( "sizeExponent", TypeRangedF32, Offset( mSizeExponent, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "An exponent used to bias between the minimum and maximum random sizes." );
|
||||
|
||||
addField( "windScale", TypeF32, Offset( mWindScale, GroundCover ), MAX_COVERTYPES, "The wind effect scale." );
|
||||
addFieldV( "windScale", TypeRangedF32, Offset( mWindScale, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "The wind effect scale." );
|
||||
|
||||
addField( "minSlope", TypeF32, Offset(mMinSlope, GroundCover), MAX_COVERTYPES, "The minimum slope angle in degrees for placement.");
|
||||
addFieldV( "minSlope", TypeRangedF32, Offset(mMinSlope, GroundCover), &CommonValidators::PosDegreeRangeQuarter, MAX_COVERTYPES, "The minimum slope angle in degrees for placement.");
|
||||
|
||||
addField( "maxSlope", TypeF32, Offset( mMaxSlope, GroundCover ), MAX_COVERTYPES, "The maximum slope angle in degrees for placement." );
|
||||
addFieldV( "maxSlope", TypeRangedF32, Offset( mMaxSlope, GroundCover ), &CommonValidators::PosDegreeRangeQuarter, MAX_COVERTYPES, "The maximum slope angle in degrees for placement." );
|
||||
|
||||
addField("conformToNormal",TypeBool, Offset(mConformToNormal, GroundCover), MAX_COVERTYPES, "Use the terrain's slope for angle");
|
||||
addField("minRotX", TypeF32, Offset(mMinRotX, GroundCover), MAX_COVERTYPES, "minumum amount of rotation along the X axis to add");
|
||||
addField("maxRotX", TypeF32, Offset(mMaxRotX, GroundCover), MAX_COVERTYPES, "maximum amount of rotation along the X axis to add");
|
||||
addField("minRotY", TypeF32, Offset(mMinRotY, GroundCover), MAX_COVERTYPES, "minumum amount of rotation along the Y axis to add");
|
||||
addField("maxRotY", TypeF32, Offset(mMaxRotY, GroundCover), MAX_COVERTYPES, "maximum amount of rotation along the Y axis to add");
|
||||
addFieldV("minRotX", TypeRangedF32, Offset(mMinRotX, GroundCover), &CommonValidators::DegreeRange, MAX_COVERTYPES, "minumum amount of rotation along the X axis to add");
|
||||
addFieldV("maxRotX", TypeRangedF32, Offset(mMaxRotX, GroundCover), &CommonValidators::DegreeRange, MAX_COVERTYPES, "maximum amount of rotation along the X axis to add");
|
||||
addFieldV("minRotY", TypeRangedF32, Offset(mMinRotY, GroundCover), &CommonValidators::DegreeRange, MAX_COVERTYPES, "minumum amount of rotation along the Y axis to add");
|
||||
addFieldV("maxRotY", TypeRangedF32, Offset(mMaxRotY, GroundCover), &CommonValidators::DegreeRange, MAX_COVERTYPES, "maximum amount of rotation along the Y axis to add");
|
||||
|
||||
addField( "minElevation", TypeF32, Offset( mMinElevation, GroundCover ), MAX_COVERTYPES, "The minimum world space elevation for placement." );
|
||||
addFieldV( "minElevation", TypeRangedF32, Offset( mMinElevation, GroundCover ), &CommonValidators::F32Range, MAX_COVERTYPES, "The minimum world space elevation for placement." );
|
||||
|
||||
addField( "maxElevation", TypeF32, Offset( mMaxElevation, GroundCover ), MAX_COVERTYPES, "The maximum world space elevation for placement." );
|
||||
addFieldV( "maxElevation", TypeRangedF32, Offset( mMaxElevation, GroundCover ), &CommonValidators::F32Range, MAX_COVERTYPES, "The maximum world space elevation for placement." );
|
||||
|
||||
addField( "minClumpCount", TypeS32, Offset( mMinClumpCount, GroundCover ), MAX_COVERTYPES, "The minimum amount of elements in a clump." );
|
||||
addFieldV( "minClumpCount", TypeRangedS32, Offset( mMinClumpCount, GroundCover ), &CommonValidators::PositiveInt, MAX_COVERTYPES, "The minimum amount of elements in a clump." );
|
||||
|
||||
addField( "maxClumpCount", TypeS32, Offset( mMaxClumpCount, GroundCover ), MAX_COVERTYPES, "The maximum amount of elements in a clump." );
|
||||
addFieldV( "maxClumpCount", TypeRangedS32, Offset( mMaxClumpCount, GroundCover ), &CommonValidators::PositiveInt, MAX_COVERTYPES, "The maximum amount of elements in a clump." );
|
||||
|
||||
addField( "clumpExponent", TypeF32, Offset( mClumpCountExponent, GroundCover ), MAX_COVERTYPES, "An exponent used to bias between the minimum and maximum clump counts for a particular clump." );
|
||||
addFieldV( "clumpExponent", TypeRangedF32, Offset( mClumpCountExponent, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "An exponent used to bias between the minimum and maximum clump counts for a particular clump." );
|
||||
|
||||
addField( "clumpRadius", TypeF32, Offset( mClumpRadius, GroundCover ), MAX_COVERTYPES, "The maximum clump radius." );
|
||||
addFieldV( "clumpRadius", TypeRangedF32, Offset( mClumpRadius, GroundCover ), &CommonValidators::PositiveFloat, MAX_COVERTYPES, "The maximum clump radius." );
|
||||
|
||||
endArray( "Types" );
|
||||
|
||||
|
|
@ -610,12 +610,12 @@ void GroundCover::initPersistFields()
|
|||
|
||||
addField( "windDirection", TypePoint2F, Offset( mWindDirection, GroundCover ), "The direction of the wind." );
|
||||
|
||||
addField( "windGustLength", TypeF32, Offset( mWindGustLength, GroundCover ), "The length in meters between peaks in the wind gust." );
|
||||
addField( "windGustFrequency",TypeF32, Offset( mWindGustFrequency, GroundCover ), "Controls how often the wind gust peaks per second." );
|
||||
addField( "windGustStrength", TypeF32, Offset( mWindGustStrength, GroundCover ), "The maximum distance in meters that the peak wind gust will displace an element." );
|
||||
addFieldV( "windGustLength", TypeRangedF32, Offset( mWindGustLength, GroundCover ), &CommonValidators::PositiveFloat, "The length in meters between peaks in the wind gust." );
|
||||
addFieldV( "windGustFrequency", TypeRangedF32, Offset( mWindGustFrequency, GroundCover ), &CommonValidators::PositiveFloat, "Controls how often the wind gust peaks per second." );
|
||||
addFieldV( "windGustStrength", TypeRangedF32, Offset( mWindGustStrength, GroundCover ), &CommonValidators::PositiveFloat, "The maximum distance in meters that the peak wind gust will displace an element." );
|
||||
|
||||
addField( "windTurbulenceFrequency", TypeF32, Offset( mWindTurbulenceFrequency, GroundCover ),"Controls the overall rapidity of the wind turbulence." );
|
||||
addField( "windTurbulenceStrength", TypeF32, Offset( mWindTurbulenceStrength, GroundCover ), "The maximum distance in meters that the turbulence can displace a ground cover element." );
|
||||
addFieldV( "windTurbulenceFrequency", TypeRangedF32, Offset( mWindTurbulenceFrequency, GroundCover ), &CommonValidators::PositiveFloat,"Controls the overall rapidity of the wind turbulence." );
|
||||
addFieldV( "windTurbulenceStrength", TypeRangedF32, Offset( mWindTurbulenceStrength, GroundCover ), &CommonValidators::PositiveFloat, "The maximum distance in meters that the turbulence can displace a ground cover element." );
|
||||
|
||||
endGroup( "GroundCover Wind" );
|
||||
|
||||
|
|
|
|||
|
|
@ -410,12 +410,12 @@ void Lightning::initPersistFields()
|
|||
{
|
||||
docsURL;
|
||||
addGroup( "Strikes" );
|
||||
addField( "strikesPerMinute", TypeS32, Offset(strikesPerMinute, Lightning),
|
||||
addFieldV( "strikesPerMinute", TypeRangedS32, Offset(strikesPerMinute, Lightning), &CommonValidators::PositiveInt,
|
||||
"@brief Number of lightning strikes to perform per minute.\n\n"
|
||||
"Automatically invokes strikeRandomPoint() at regular intervals." );
|
||||
addField( "strikeWidth", TypeF32, Offset(strikeWidth, Lightning),
|
||||
addFieldV( "strikeWidth", TypeRangedF32, Offset(strikeWidth, Lightning), &CommonValidators::PositiveFloat,
|
||||
"Width of a lightning bolt." );
|
||||
addField( "strikeRadius", TypeF32, Offset(strikeRadius, Lightning),
|
||||
addFieldV( "strikeRadius", TypeRangedF32, Offset(strikeRadius, Lightning), &CommonValidators::PositiveFloat,
|
||||
"@brief Horizontal size (XY plane) of the search box used to find and "
|
||||
"damage Player or Vehicle objects within range of the strike.\n\n"
|
||||
"Only the object at highest altitude with a clear line of sight to the "
|
||||
|
|
@ -431,9 +431,9 @@ void Lightning::initPersistFields()
|
|||
endGroup( "Colors" );
|
||||
|
||||
addGroup( "Bolts" );
|
||||
addField( "chanceToHitTarget", TypeF32, Offset(chanceToHitTarget, Lightning),
|
||||
addFieldV( "chanceToHitTarget", TypeRangedF32, Offset(chanceToHitTarget, Lightning), &CommonValidators::NormalizedFloat,
|
||||
"Percentage chance (0-1) that a given lightning bolt will hit something." );
|
||||
addField( "boltStartRadius", TypeF32, Offset(boltStartRadius, Lightning),
|
||||
addFieldV( "boltStartRadius", TypeRangedF32, Offset(boltStartRadius, Lightning), &CommonValidators::PositiveFloat,
|
||||
"@brief Radial distance from the center of the Lightning object for the "
|
||||
"start point of the bolt.\n\n"
|
||||
"The actual start point will be a random point within this radius." );
|
||||
|
|
|
|||
|
|
@ -141,6 +141,8 @@ ParticleData::ParticleData()
|
|||
FRangeValidator dragCoefFValidator(0.f, 5.f);
|
||||
FRangeValidator gravCoefFValidator(-10.f, 10.f);
|
||||
FRangeValidator spinRandFValidator(-1000.f, 1000.f);
|
||||
FRangeValidator particleTimeFValidator(0.0f, 1.0f, 1<<8);
|
||||
FRangeValidator particleSizeFValidator(0.0f, MaxParticleSize, 1<<16);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// initPersistFields
|
||||
|
|
@ -160,31 +162,31 @@ void ParticleData::initPersistFields()
|
|||
"If true, particles blend like ParticleBlendStyle NORMAL, if false, "
|
||||
"blend like ParticleBlendStyle ADDITIVE.\n"
|
||||
"@note If ParticleEmitterData::blendStyle is set, it will override this value.");
|
||||
addField("lifetimeMS", TYPEID< S32 >(), Offset(lifetimeMS, ParticleData),
|
||||
addFieldV("lifetimeMS", TypeRangedS32, Offset(lifetimeMS, ParticleData), &CommonValidators::PositiveInt,
|
||||
"Time in milliseconds before this particle is destroyed.");
|
||||
addField("lifetimeVarianceMS", TYPEID< S32 >(), Offset(lifetimeVarianceMS, ParticleData),
|
||||
addFieldV("lifetimeVarianceMS", TypeRangedS32, Offset(lifetimeVarianceMS, ParticleData), &CommonValidators::PositiveInt,
|
||||
"Variance in lifetime of particle, from 0 - lifetimeMS.");
|
||||
endGroup("Basic");
|
||||
|
||||
addGroup("Motion");
|
||||
addFieldV("dragCoefficient", TYPEID< F32 >(), Offset(dragCoefficient, ParticleData), &dragCoefFValidator,
|
||||
addFieldV("dragCoefficient", TypeRangedF32, Offset(dragCoefficient, ParticleData), &dragCoefFValidator,
|
||||
"Particle physics drag amount.");
|
||||
addField("windCoefficient", TYPEID< F32 >(), Offset(windCoefficient, ParticleData),
|
||||
addFieldV("windCoefficient", TypeRangedF32, Offset(windCoefficient, ParticleData),&CommonValidators::F32Range,
|
||||
"Strength of wind on the particles.");
|
||||
addFieldV("gravityCoefficient", TYPEID< F32 >(), Offset(gravityCoefficient, ParticleData), &gravCoefFValidator,
|
||||
addFieldV("gravityCoefficient", TypeRangedF32, Offset(gravityCoefficient, ParticleData), &gravCoefFValidator,
|
||||
"Strength of gravity on the particles.");
|
||||
addFieldV("inheritedVelFactor", TYPEID< F32 >(), Offset(inheritedVelFactor, ParticleData), &CommonValidators::NormalizedFloat,
|
||||
addFieldV("inheritedVelFactor", TypeRangedF32, Offset(inheritedVelFactor, ParticleData), &CommonValidators::NormalizedFloat,
|
||||
"Amount of emitter velocity to add to particle initial velocity.");
|
||||
addField("constantAcceleration", TYPEID< F32 >(), Offset(constantAcceleration, ParticleData),
|
||||
addFieldV("constantAcceleration", TypeRangedF32, Offset(constantAcceleration, ParticleData), &CommonValidators::F32Range,
|
||||
"Constant acceleration to apply to this particle.");
|
||||
endGroup("Motion");
|
||||
|
||||
addGroup("Spin");
|
||||
addField("spinSpeed", TYPEID< F32 >(), Offset(spinSpeed, ParticleData),
|
||||
addFieldV("spinSpeed", TypeRangedF32, Offset(spinSpeed, ParticleData), &spinRandFValidator,
|
||||
"Speed at which to spin the particle.");
|
||||
addFieldV("spinRandomMin", TYPEID< F32 >(), Offset(spinRandomMin, ParticleData), &spinRandFValidator,
|
||||
addFieldV("spinRandomMin", TypeRangedF32, Offset(spinRandomMin, ParticleData), &spinRandFValidator,
|
||||
"Minimum allowed spin speed of this particle, between -1000 and spinRandomMax.");
|
||||
addFieldV("spinRandomMax", TYPEID< F32 >(), Offset(spinRandomMax, ParticleData), &spinRandFValidator,
|
||||
addFieldV("spinRandomMax", TypeRangedF32, Offset(spinRandomMax, ParticleData), &spinRandFValidator,
|
||||
"Maximum allowed spin speed of this particle, between spinRandomMin and 1000.");
|
||||
endGroup("Spin");
|
||||
|
||||
|
|
@ -223,16 +225,16 @@ void ParticleData::initPersistFields()
|
|||
|
||||
// Interpolation variables
|
||||
addGroup("Over Time");
|
||||
addProtectedField("times", TYPEID< F32 >(), Offset(times, ParticleData), &protectedSetTimes,
|
||||
&defaultProtectedGetFn, PDC_NUM_KEYS,
|
||||
addProtectedFieldV("times", TypeRangedF32, Offset(times, ParticleData), &protectedSetTimes,
|
||||
&defaultProtectedGetFn, &particleTimeFValidator, PDC_NUM_KEYS,
|
||||
"@brief Time keys used with the colors and sizes keyframes.\n\n"
|
||||
"Values are from 0.0 (particle creation) to 1.0 (end of lifespace).");
|
||||
addField( "colors", TYPEID< LinearColorF >(), Offset(colors, ParticleData), PDC_NUM_KEYS,
|
||||
"@brief Particle RGBA color keyframe values.\n\n"
|
||||
"The particle color will linearly interpolate between the color/time keys "
|
||||
"over the lifetime of the particle." );
|
||||
addProtectedField( "sizes", TYPEID< F32 >(), Offset(sizes, ParticleData), &protectedSetSizes,
|
||||
&defaultProtectedGetFn, PDC_NUM_KEYS,
|
||||
addProtectedFieldV( "sizes", TypeRangedF32, Offset(sizes, ParticleData), &protectedSetSizes,
|
||||
&defaultProtectedGetFn, &particleSizeFValidator, PDC_NUM_KEYS,
|
||||
"@brief Particle size keyframe values.\n\n"
|
||||
"The particle size will linearly interpolate between the size/time keys "
|
||||
"over the lifetime of the particle." );
|
||||
|
|
@ -242,10 +244,10 @@ void ParticleData::initPersistFields()
|
|||
addProtectedField("textureExtName", TypeFilename, Offset(mTextureExtName, ParticleData), _setTextureExtData, &defaultProtectedGetFn, "", AbstractClassRep::FIELD_HideInInspectors);
|
||||
INITPERSISTFIELD_IMAGEASSET(TextureExt, ParticleData, "");
|
||||
addField("constrainPos", TypeBool, Offset(constrain_pos, ParticleData));
|
||||
addField("angle", TypeF32, Offset(start_angle, ParticleData));
|
||||
addField("angleVariance", TypeF32, Offset(angle_variance, ParticleData));
|
||||
addField("sizeBias", TypeF32, Offset(sizeBias, ParticleData));
|
||||
addField("spinBias", TypeF32, Offset(spinBias, ParticleData));
|
||||
addFieldV("angle", TypeRangedF32, Offset(start_angle, ParticleData), &CommonValidators::DegreeRange);
|
||||
addFieldV("angleVariance", TypeRangedF32, Offset(angle_variance, ParticleData), &CommonValidators::DegreeRange);
|
||||
addFieldV("sizeBias", TypeRangedF32, Offset(sizeBias, ParticleData), &CommonValidators::F32Range);
|
||||
addFieldV("spinBias", TypeRangedF32, Offset(spinBias, ParticleData), &CommonValidators::F32Range);
|
||||
addField("randomizeSpinDir", TypeBool, Offset(randomizeSpinDir, ParticleData));
|
||||
endGroup("AFX");
|
||||
Parent::initPersistFields();
|
||||
|
|
@ -296,10 +298,10 @@ void ParticleData::packData(BitStream* stream)
|
|||
|
||||
for( i=0; i<count; i++ )
|
||||
{
|
||||
stream->writeFloat( colors[i].red, 7);
|
||||
stream->writeFloat( colors[i].green, 7);
|
||||
stream->writeFloat( colors[i].blue, 7);
|
||||
stream->writeFloat( colors[i].alpha, 7);
|
||||
stream->writeFloat( colors[i].red, 8);
|
||||
stream->writeFloat( colors[i].green, 8);
|
||||
stream->writeFloat( colors[i].blue, 8);
|
||||
stream->writeFloat( colors[i].alpha, 8);
|
||||
// AFX bits raised from 14 to 16 to allow larger sizes
|
||||
stream->writeFloat( sizes[i]/MaxParticleSize, 16);
|
||||
stream->writeFloat( times[i], 8);
|
||||
|
|
@ -381,10 +383,10 @@ void ParticleData::unpackData(BitStream* stream)
|
|||
S32 count = stream->readInt(3) + 1;
|
||||
for(i = 0;i < count; i++)
|
||||
{
|
||||
colors[i].red = stream->readFloat(7);
|
||||
colors[i].green = stream->readFloat(7);
|
||||
colors[i].blue = stream->readFloat(7);
|
||||
colors[i].alpha = stream->readFloat(7);
|
||||
colors[i].red = stream->readFloat(8);
|
||||
colors[i].green = stream->readFloat(8);
|
||||
colors[i].blue = stream->readFloat(8);
|
||||
colors[i].alpha = stream->readFloat(8);
|
||||
// AFX bits raised from 14 to 16 to allow larger sizes
|
||||
sizes[i] = stream->readFloat(16) * MaxParticleSize;
|
||||
times[i] = stream->readFloat(8);
|
||||
|
|
@ -443,6 +445,17 @@ bool ParticleData::protectedSetTimes( void *object, const char *index, const cha
|
|||
|
||||
pData->times[i] = mClampF( val, 0.f, 1.f );
|
||||
|
||||
pData->times[0] = 0.0f;
|
||||
|
||||
S32 last = i - 1;
|
||||
S32 next = i + 1;
|
||||
if (last >= 0 && next < PDC_NUM_KEYS-1)
|
||||
{
|
||||
if ((pData->times[last] != -1.0f) && (pData->times[i] < pData->times[last]))
|
||||
pData->times[i] = pData->times[last];
|
||||
else if ((pData->times[next] != -1.0f) && (pData->times[i] > pData->times[next]))
|
||||
pData->times[i] = pData->times[next];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,8 +199,6 @@ IRangeValidator ejectPeriodIValidator(1, 2047);
|
|||
IRangeValidator periodVarianceIValidator(0, 2047);
|
||||
FRangeValidator ejectionFValidator(0.f, 655.35f);
|
||||
FRangeValidator velVarianceFValidator(0.f, 163.83f);
|
||||
FRangeValidator thetaFValidator(0.f, 180.f);
|
||||
FRangeValidator phiFValidator(0.f, 360.f);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// initPersistFields
|
||||
|
|
@ -210,45 +208,45 @@ void ParticleEmitterData::initPersistFields()
|
|||
docsURL;
|
||||
addGroup( "ParticleEmitterData" );
|
||||
|
||||
addFieldV("ejectionPeriodMS", TYPEID< S32 >(), Offset(ejectionPeriodMS, ParticleEmitterData), &ejectPeriodIValidator,
|
||||
addFieldV("ejectionPeriodMS", TypeRangedS32, Offset(ejectionPeriodMS, ParticleEmitterData), &ejectPeriodIValidator,
|
||||
"Time (in milliseconds) between each particle ejection." );
|
||||
|
||||
addFieldV("periodVarianceMS", TYPEID< S32 >(), Offset(periodVarianceMS, ParticleEmitterData), &periodVarianceIValidator,
|
||||
addFieldV("periodVarianceMS", TypeRangedS32, Offset(periodVarianceMS, ParticleEmitterData), &periodVarianceIValidator,
|
||||
"Variance in ejection period, from 1 - ejectionPeriodMS." );
|
||||
|
||||
addFieldV( "ejectionVelocity", TYPEID< F32 >(), Offset(ejectionVelocity, ParticleEmitterData), &ejectionFValidator,
|
||||
addFieldV( "ejectionVelocity", TypeRangedF32, Offset(ejectionVelocity, ParticleEmitterData), &ejectionFValidator,
|
||||
"Particle ejection velocity." );
|
||||
|
||||
addFieldV( "velocityVariance", TYPEID< F32 >(), Offset(velocityVariance, ParticleEmitterData), &velVarianceFValidator,
|
||||
addFieldV( "velocityVariance", TypeRangedF32, Offset(velocityVariance, ParticleEmitterData), &velVarianceFValidator,
|
||||
"Variance for ejection velocity, from 0 - ejectionVelocity." );
|
||||
|
||||
addFieldV( "ejectionOffset", TYPEID< F32 >(), Offset(ejectionOffset, ParticleEmitterData), &ejectionFValidator,
|
||||
addFieldV( "ejectionOffset", TypeRangedF32, Offset(ejectionOffset, ParticleEmitterData), &ejectionFValidator,
|
||||
"Distance along ejection Z axis from which to eject particles." );
|
||||
|
||||
addFieldV( "ejectionOffsetVariance", TYPEID< F32 >(), Offset(ejectionOffsetVariance, ParticleEmitterData), &ejectionFValidator,
|
||||
addFieldV( "ejectionOffsetVariance", TypeRangedF32, Offset(ejectionOffsetVariance, ParticleEmitterData), &ejectionFValidator,
|
||||
"Distance Padding along ejection Z axis from which to eject particles." );
|
||||
|
||||
addFieldV( "thetaMin", TYPEID< F32 >(), Offset(thetaMin, ParticleEmitterData), &thetaFValidator,
|
||||
addFieldV( "thetaMin", TypeRangedF32, Offset(thetaMin, ParticleEmitterData), &CommonValidators::PosDegreeRangeHalf,
|
||||
"Minimum angle, from the horizontal plane, to eject from." );
|
||||
|
||||
addFieldV( "thetaMax", TYPEID< F32 >(), Offset(thetaMax, ParticleEmitterData), &thetaFValidator,
|
||||
addFieldV( "thetaMax", TypeRangedF32, Offset(thetaMax, ParticleEmitterData), &CommonValidators::PosDegreeRangeHalf,
|
||||
"Maximum angle, from the horizontal plane, to eject particles from." );
|
||||
|
||||
addFieldV( "thetaVariance", TYPEID< F32 >(), Offset(thetaVariance, ParticleEmitterData), &thetaFValidator,
|
||||
addFieldV( "thetaVariance", TypeRangedF32, Offset(thetaVariance, ParticleEmitterData), &CommonValidators::PosDegreeRangeHalf,
|
||||
"Angle variance from the previous particle, from 0 - 180." );
|
||||
|
||||
addFieldV( "phiReferenceVel", TYPEID< F32 >(), Offset(phiReferenceVel, ParticleEmitterData), &phiFValidator,
|
||||
addFieldV( "phiReferenceVel", TypeRangedF32, Offset(phiReferenceVel, ParticleEmitterData), &CommonValidators::PosDegreeRange,
|
||||
"Reference angle, from the vertical plane, to eject particles from." );
|
||||
|
||||
addFieldV( "phiVariance", TYPEID< F32 >(), Offset(phiVariance, ParticleEmitterData), &phiFValidator,
|
||||
addFieldV( "phiVariance", TypeRangedF32, Offset(phiVariance, ParticleEmitterData), &CommonValidators::PosDegreeRange,
|
||||
"Variance from the reference angle, from 0 - 360." );
|
||||
|
||||
addField( "softnessDistance", TYPEID< F32 >(), Offset(softnessDistance, ParticleEmitterData),
|
||||
addFieldV( "softnessDistance", TypeRangedF32, Offset(softnessDistance, ParticleEmitterData), &CommonValidators::PositiveFloat,
|
||||
"For soft particles, the distance (in meters) where particles will be "
|
||||
"faded based on the difference in depth between the particle and the "
|
||||
"scene geometry." );
|
||||
|
||||
addField( "ambientFactor", TYPEID< F32 >(), Offset(ambientFactor, ParticleEmitterData),
|
||||
addFieldV( "ambientFactor", TypeRangedF32, Offset(ambientFactor, ParticleEmitterData), &CommonValidators::NormalizedFloat,
|
||||
"Used to generate the final particle color by controlling interpolation "
|
||||
"between the particle color and the particle color multiplied by the "
|
||||
"ambient light color." );
|
||||
|
|
@ -272,10 +270,10 @@ void ParticleEmitterData::initPersistFields()
|
|||
"A random one of these datablocks is selected each time a particle is "
|
||||
"emitted." );
|
||||
|
||||
addField( "lifetimeMS", TYPEID< S32 >(), Offset(lifetimeMS, ParticleEmitterData),
|
||||
addFieldV( "lifetimeMS", TypeRangedS32, Offset(lifetimeMS, ParticleEmitterData), &CommonValidators::PositiveInt,
|
||||
"Lifetime of emitted particles (in milliseconds)." );
|
||||
|
||||
addField("lifetimeVarianceMS", TYPEID< S32 >(), Offset(lifetimeVarianceMS, ParticleEmitterData),
|
||||
addFieldV("lifetimeVarianceMS", TypeRangedS32, Offset(lifetimeVarianceMS, ParticleEmitterData), &CommonValidators::PositiveInt,
|
||||
"Variance in particle lifetime from 0 - lifetimeMS." );
|
||||
|
||||
addField( "useEmitterSizes", TYPEID< bool >(), Offset(useEmitterSizes, ParticleEmitterData),
|
||||
|
|
@ -338,7 +336,7 @@ void ParticleEmitterData::initPersistFields()
|
|||
#if defined(AFX_CAP_PARTICLE_POOLS)
|
||||
addGroup("AFX Pooled Particles");
|
||||
addField("poolData", TYPEID<afxParticlePoolData>(), Offset(pool_datablock, ParticleEmitterData));
|
||||
addField("poolIndex", TypeS32, Offset(pool_index, ParticleEmitterData));
|
||||
addFieldV("poolIndex", TypeRangedS32, Offset(pool_index, ParticleEmitterData), &CommonValidators::PositiveInt);
|
||||
addField("poolDepthFade", TypeBool, Offset(pool_depth_fade, ParticleEmitterData));
|
||||
addField("poolRadialFade", TypeBool, Offset(pool_radial_fade, ParticleEmitterData));
|
||||
endGroup("AFX Pooled Particles");
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class ParticleEmitterData : public GameBaseData
|
|||
F32 ambientFactor;
|
||||
|
||||
S32 lifetimeMS; ///< Lifetime of particles
|
||||
U32 lifetimeVarianceMS; ///< Varience in lifetime from 0 to n
|
||||
S32 lifetimeVarianceMS; ///< Varience in lifetime from 0 to n
|
||||
|
||||
bool overrideAdvance; ///<
|
||||
bool orientParticles; ///< Particles always face the screen
|
||||
|
|
|
|||
|
|
@ -87,10 +87,11 @@ ParticleEmitterNodeData::~ParticleEmitterNodeData()
|
|||
//-----------------------------------------------------------------------------
|
||||
// initPersistFields
|
||||
//-----------------------------------------------------------------------------
|
||||
FRangeValidator emTimeMultipleRange(0.01f,100.0f);
|
||||
void ParticleEmitterNodeData::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
addField( "timeMultiple", TYPEID< F32 >(), Offset(timeMultiple, ParticleEmitterNodeData),
|
||||
addFieldV( "timeMultiple", TypeRangedF32, Offset(timeMultiple, ParticleEmitterNodeData), &emTimeMultipleRange,
|
||||
"@brief Time multiplier for particle emitter nodes.\n\n"
|
||||
"Increasing timeMultiple is like running the emitter at a faster rate - single-shot "
|
||||
"emitters will complete in a shorter time, and continuous emitters will generate "
|
||||
|
|
@ -187,7 +188,7 @@ void ParticleEmitterNode::initPersistFields()
|
|||
"Controls whether particles are emitted from this node." );
|
||||
addField( "emitter", TYPEID< ParticleEmitterData >(), Offset(mEmitterDatablock, ParticleEmitterNode),
|
||||
"Datablock to use when emitting particles." );
|
||||
addField( "velocity", TYPEID< F32 >(), Offset(mVelocity, ParticleEmitterNode),
|
||||
addFieldV( "velocity", TypeRangedF32, Offset(mVelocity, ParticleEmitterNode), &CommonValidators::F32Range,
|
||||
"Velocity to use when emitting particles (in the direction of the "
|
||||
"ParticleEmitterNode object's up (Z) axis)." );
|
||||
|
||||
|
|
|
|||
|
|
@ -173,11 +173,11 @@ void PrecipitationData::initPersistFields()
|
|||
|
||||
addField( "splashShader", TypeString, Offset(mSplashShaderName, PrecipitationData),
|
||||
"The name of the shader used for splashes." );
|
||||
addField( "dropsPerSide", TypeS32, Offset(mDropsPerSide, PrecipitationData),
|
||||
addFieldV( "dropsPerSide", TypeRangedS32, Offset(mDropsPerSide, PrecipitationData), &CommonValidators::PositiveInt,
|
||||
"@brief How many rows and columns are in the raindrop texture.\n\n"
|
||||
"For example, if the texture has 16 raindrops arranged in a grid, this "
|
||||
"field should be set to 4." );
|
||||
addField( "splashesPerSide", TypeS32, Offset(mSplashesPerSide, PrecipitationData),
|
||||
addFieldV( "splashesPerSide", TypeRangedS32, Offset(mSplashesPerSide, PrecipitationData), &CommonValidators::PositiveInt,
|
||||
"@brief How many rows and columns are in the splash texture.\n\n"
|
||||
"For example, if the texture has 9 splashes arranged in a grid, this "
|
||||
"field should be set to 3." );
|
||||
|
|
@ -368,45 +368,45 @@ void Precipitation::initPersistFields()
|
|||
docsURL;
|
||||
addGroup("Precipitation");
|
||||
|
||||
addFieldV( "numDrops", TypeS32, Offset(mNumDrops, Precipitation), &ValidNumDropsRange,
|
||||
addFieldV( "numDrops", TypeRangedS32, Offset(mNumDrops, Precipitation), &ValidNumDropsRange,
|
||||
"@brief Maximum number of drops allowed to exist in the precipitation "
|
||||
"box at any one time.\n\n"
|
||||
"The actual number of drops in the effect depends on the current "
|
||||
"percentage, which can change over time using modifyStorm()." );
|
||||
|
||||
addField( "boxWidth", TypeF32, Offset(mBoxWidth, Precipitation),
|
||||
addFieldV( "boxWidth", TypeRangedF32, Offset(mBoxWidth, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Width and depth (horizontal dimensions) of the precipitation box." );
|
||||
|
||||
addField( "boxHeight", TypeF32, Offset(mBoxHeight, Precipitation),
|
||||
addFieldV( "boxHeight", TypeRangedF32, Offset(mBoxHeight, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Height (vertical dimension) of the precipitation box." );
|
||||
|
||||
endGroup("Precipitation");
|
||||
|
||||
addGroup("Rendering");
|
||||
|
||||
addField( "dropSize", TypeF32, Offset(mDropSize, Precipitation),
|
||||
addFieldV( "dropSize", TypeRangedF32, Offset(mDropSize, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Size of each drop of precipitation. This will scale the texture." );
|
||||
|
||||
addField( "splashSize", TypeF32, Offset(mSplashSize, Precipitation),
|
||||
addFieldV( "splashSize", TypeRangedF32, Offset(mSplashSize, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Size of each splash animation when a drop collides with another surface." );
|
||||
|
||||
addField( "splashMS", TypeS32, Offset(mSplashMS, Precipitation),
|
||||
addFieldV( "splashMS", TypeRangedS32, Offset(mSplashMS, Precipitation), &CommonValidators::PositiveInt,
|
||||
"Lifetime of splashes in milliseconds." );
|
||||
|
||||
addField( "animateSplashes", TypeBool, Offset(mAnimateSplashes, Precipitation),
|
||||
"Set to true to enable splash animations when drops collide with other surfaces." );
|
||||
|
||||
addField( "dropAnimateMS", TypeS32, Offset(mDropAnimateMS, Precipitation),
|
||||
addFieldV( "dropAnimateMS", TypeRangedS32, Offset(mDropAnimateMS, Precipitation), &CommonValidators::PositiveInt,
|
||||
"@brief Length (in milliseconds) to display each drop frame.\n\n"
|
||||
"If #dropAnimateMS <= 0, drops select a single random frame at creation "
|
||||
"that does not change throughout the drop's lifetime. If #dropAnimateMS "
|
||||
"> 0, each drop cycles through the the available frames in the drop "
|
||||
"texture at the given rate." );
|
||||
|
||||
addField( "fadeDist", TypeF32, Offset(mFadeDistance, Precipitation),
|
||||
addFieldV( "fadeDist", TypeRangedF32, Offset(mFadeDistance, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"The distance at which drops begin to fade out." );
|
||||
|
||||
addField( "fadeDistEnd", TypeF32, Offset(mFadeDistanceEnd, Precipitation),
|
||||
addFieldV( "fadeDistEnd", TypeRangedF32, Offset(mFadeDistanceEnd, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"The distance at which drops are completely faded out." );
|
||||
|
||||
addField( "useTrueBillboards", TypeBool, Offset(mUseTrueBillboards, Precipitation),
|
||||
|
|
@ -459,23 +459,23 @@ void Precipitation::initPersistFields()
|
|||
"Controls whether drops are affected by wind.\n"
|
||||
"@see ForestWindEmitter" );
|
||||
|
||||
addField( "minSpeed", TypeF32, Offset(mMinSpeed, Precipitation),
|
||||
addFieldV( "minSpeed", TypeRangedF32, Offset(mMinSpeed, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"@brief Minimum speed at which a drop will fall.\n\n"
|
||||
"On creation, the drop will be assigned a random speed between #minSpeed "
|
||||
"and #maxSpeed." );
|
||||
|
||||
addField( "maxSpeed", TypeF32, Offset(mMaxSpeed, Precipitation),
|
||||
addFieldV( "maxSpeed", TypeRangedF32, Offset(mMaxSpeed, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"@brief Maximum speed at which a drop will fall.\n\n"
|
||||
"On creation, the drop will be assigned a random speed between #minSpeed "
|
||||
"and #maxSpeed." );
|
||||
|
||||
addField( "minMass", TypeF32, Offset(mMinMass, Precipitation),
|
||||
addFieldV( "minMass", TypeRangedF32, Offset(mMinMass, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"@brief Minimum mass of a drop.\n\n"
|
||||
"Drop mass determines how strongly the drop is affected by wind and "
|
||||
"turbulence. On creation, the drop will be assigned a random speed "
|
||||
"between #minMass and #minMass." );
|
||||
|
||||
addField( "maxMass", TypeF32, Offset(mMaxMass, Precipitation),
|
||||
addFieldV( "maxMass", TypeRangedF32, Offset(mMaxMass, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"@brief Maximum mass of a drop.\n\n"
|
||||
"Drop mass determines how strongly the drop is affected by wind and "
|
||||
"turbulence. On creation, the drop will be assigned a random speed "
|
||||
|
|
@ -489,10 +489,10 @@ void Precipitation::initPersistFields()
|
|||
"Check to enable turbulence. This causes precipitation drops to spiral "
|
||||
"while falling." );
|
||||
|
||||
addField( "maxTurbulence", TypeF32, Offset(mMaxTurbulence, Precipitation),
|
||||
addFieldV( "maxTurbulence", TypeRangedF32, Offset(mMaxTurbulence, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Radius at which precipitation drops spiral when turbulence is enabled." );
|
||||
|
||||
addField( "turbulenceSpeed", TypeF32, Offset(mTurbulenceSpeed, Precipitation),
|
||||
addFieldV( "turbulenceSpeed", TypeRangedF32, Offset(mTurbulenceSpeed, Precipitation), &CommonValidators::PositiveFloat,
|
||||
"Speed at which precipitation drops spiral when turbulence is enabled." );
|
||||
|
||||
endGroup("Turbulence");
|
||||
|
|
|
|||
|
|
@ -73,27 +73,27 @@ void RibbonData::initPersistFields()
|
|||
|
||||
addGroup("Ribbon");
|
||||
|
||||
addField("size", TypeF32, Offset(mSizes, RibbonData), NumFields,
|
||||
addFieldV("size", TypeRangedF32, Offset(mSizes, RibbonData), &CommonValidators::PositiveFloat, NumFields,
|
||||
"The size of the ribbon at the specified keyframe.");
|
||||
addField("color", TypeColorF, Offset(mColours, RibbonData), NumFields,
|
||||
"The colour of the ribbon at the specified keyframe.");
|
||||
addField("position", TypeF32, Offset(mTimes, RibbonData), NumFields,
|
||||
addFieldV("position", TypeRangedF32, Offset(mTimes, RibbonData), &CommonValidators::PositiveFloat, NumFields,
|
||||
"The position of the keyframe along the lifetime of the ribbon.");
|
||||
|
||||
addField("ribbonLength", TypeS32, Offset(mRibbonLength, RibbonData),
|
||||
addFieldV("ribbonLength", TypeRangedS32, Offset(mRibbonLength, RibbonData), &CommonValidators::NaturalNumber,
|
||||
"The amount of segments the Ribbon can maximally have in length.");
|
||||
addField("segmentsPerUpdate", TypeS32, Offset(segmentsPerUpdate, RibbonData),
|
||||
addFieldV("segmentsPerUpdate", TypeRangedS32, Offset(segmentsPerUpdate, RibbonData), &CommonValidators::NaturalNumber,
|
||||
"How many segments to add each update.");
|
||||
addField("skipAmount", TypeS32, Offset(mSegmentSkipAmount, RibbonData),
|
||||
addFieldV("skipAmount", TypeRangedS32, Offset(mSegmentSkipAmount, RibbonData), &CommonValidators::PositiveInt,
|
||||
"The amount of segments to skip each update.");
|
||||
|
||||
addField("useFadeOut", TypeBool, Offset(mUseFadeOut, RibbonData),
|
||||
"If true, the ribbon will fade away after deletion.");
|
||||
addField("fadeAwayStep", TypeF32, Offset(mFadeAwayStep, RibbonData),
|
||||
addFieldV("fadeAwayStep", TypeRangedF32, Offset(mFadeAwayStep, RibbonData), &CommonValidators::PositiveFloat,
|
||||
"How much to fade the ribbon with each update, after deletion.");
|
||||
addField("ribbonMaterial", TypeString, Offset(mMatName, RibbonData),
|
||||
"The material the ribbon uses for rendering.");
|
||||
addField("tileScale", TypeF32, Offset(mTileScale, RibbonData),
|
||||
addFieldV("tileScale", TypeRangedF32, Offset(mTileScale, RibbonData), &CommonValidators::NormalizedFloat,
|
||||
"How much to scale each 'tile' with, where 1 means the material is stretched"
|
||||
"across the whole ribbon. (If TexcoordsRelativeToDistance is true, this is in meters.)");
|
||||
addField("fixedTexcoords", TypeBool, Offset(mFixedTexcoords, RibbonData),
|
||||
|
|
|
|||
|
|
@ -121,26 +121,26 @@ void SplashData::initPersistFields()
|
|||
|
||||
addField("scale", TypePoint3F, Offset(scale, SplashData), "The scale of this splashing effect, defined as the F32 points X, Y, Z.\n");
|
||||
addField("emitter", TYPEID< ParticleEmitterData >(), Offset(emitterList, SplashData), NUM_EMITTERS, "List of particle emitters to create at the point of this Splash effect.\n");
|
||||
addField("delayMS", TypeS32, Offset(delayMS, SplashData), "Time to delay, in milliseconds, before actually starting this effect.\n");
|
||||
addField("delayVariance", TypeS32, Offset(delayVariance, SplashData), "Time variance for delayMS.\n");
|
||||
addField("lifetimeMS", TypeS32, Offset(lifetimeMS, SplashData), "Lifetime for this effect, in milliseconds.\n");
|
||||
addField("lifetimeVariance", TypeS32, Offset(lifetimeVariance, SplashData), "Time variance for lifetimeMS.\n");
|
||||
addField("width", TypeF32, Offset(width, SplashData), "Width for the X and Y coordinates to create this effect within.");
|
||||
addField("numSegments", TypeS32, Offset(numSegments, SplashData), "Number of ejection points in the splash ring.\n");
|
||||
addField("velocity", TypeF32, Offset(velocity, SplashData), "Velocity for the splash effect to travel.\n");
|
||||
addField("height", TypeF32, Offset(height, SplashData), "Height for the splash to reach.\n");
|
||||
addField("acceleration", TypeF32, Offset(acceleration, SplashData), "Constant acceleration value to place upon the splash effect.\n");
|
||||
addField("times", TypeF32, Offset(times, SplashData), NUM_TIME_KEYS, "Times to transition through the splash effect. Up to 4 allowed. Values are 0.0 - 1.0, and corrispond to the life of the particle where 0 is first created and 1 is end of lifespace.\n" );
|
||||
addFieldV("delayMS", TypeRangedS32, Offset(delayMS, SplashData), &CommonValidators::PositiveInt, "Time to delay, in milliseconds, before actually starting this effect.\n");
|
||||
addFieldV("delayVariance", TypeRangedS32, Offset(delayVariance, SplashData), &CommonValidators::PositiveInt, "Time variance for delayMS.\n");
|
||||
addFieldV("lifetimeMS", TypeRangedS32, Offset(lifetimeMS, SplashData), &CommonValidators::PositiveInt, "Lifetime for this effect, in milliseconds.\n");
|
||||
addFieldV("lifetimeVariance", TypeRangedS32, Offset(lifetimeVariance, SplashData), &CommonValidators::PositiveInt, "Time variance for lifetimeMS.\n");
|
||||
addFieldV("width", TypeRangedF32, Offset(width, SplashData), &CommonValidators::PositiveFloat, "Width for the X and Y coordinates to create this effect within.");
|
||||
addFieldV("numSegments", TypeRangedS32, Offset(numSegments, SplashData), &CommonValidators::NaturalNumber, "Number of ejection points in the splash ring.\n");
|
||||
addFieldV("velocity", TypeRangedF32, Offset(velocity, SplashData), &CommonValidators::PositiveFloat, "Velocity for the splash effect to travel.\n");
|
||||
addFieldV("height", TypeRangedF32, Offset(height, SplashData), &CommonValidators::PositiveFloat, "Height for the splash to reach.\n");
|
||||
addFieldV("acceleration", TypeRangedF32, Offset(acceleration, SplashData), &CommonValidators::PositiveFloat, "Constant acceleration value to place upon the splash effect.\n");
|
||||
addFieldV("times", TypeRangedF32, Offset(times, SplashData), &CommonValidators::NormalizedFloat, NUM_TIME_KEYS, "Times to transition through the splash effect. Up to 4 allowed. Values are 0.0 - 1.0, and corrispond to the life of the particle where 0 is first created and 1 is end of lifespace.\n" );
|
||||
addField("colors", TypeColorF, Offset(colors, SplashData), NUM_TIME_KEYS, "Color values to set the splash effect, rgba. Up to 4 allowed. Will transition through colors based on values set in the times value. Example: colors[0] = \"0.6 1.0 1.0 0.5\".\n" );
|
||||
|
||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(Texture, NUM_TEX, SplashData, "Image to use as the texture for the splash effect.\n");
|
||||
|
||||
addField("texWrap", TypeF32, Offset(texWrap, SplashData), "Amount to wrap the texture around the splash ring, 0.0f - 1.0f.\n");
|
||||
addField("texFactor", TypeF32, Offset(texFactor, SplashData), "Factor in which to apply the texture to the splash ring, 0.0f - 1.0f.\n");
|
||||
addField("ejectionFreq", TypeF32, Offset(ejectionFreq, SplashData), "Frequency in which to emit splash rings.\n");
|
||||
addField("ejectionAngle", TypeF32, Offset(ejectionAngle, SplashData), "Rotational angle to create a splash ring.\n");
|
||||
addField("ringLifetime", TypeF32, Offset(ringLifetime, SplashData), "Lifetime, in milliseconds, for a splash ring.\n");
|
||||
addField("startRadius", TypeF32, Offset(startRadius, SplashData), "Starting radius size of a splash ring.\n");
|
||||
addFieldV("texWrap", TypeRangedF32, Offset(texWrap, SplashData), &CommonValidators::NormalizedFloat, "Amount to wrap the texture around the splash ring, 0.0f - 1.0f.\n");
|
||||
addFieldV("texFactor", TypeRangedF32, Offset(texFactor, SplashData), &CommonValidators::NormalizedFloat, "Factor in which to apply the texture to the splash ring, 0.0f - 1.0f.\n");
|
||||
addFieldV("ejectionFreq", TypeRangedF32, Offset(ejectionFreq, SplashData), &CommonValidators::PositiveFloat, "Frequency in which to emit splash rings.\n");
|
||||
addFieldV("ejectionAngle", TypeRangedF32, Offset(ejectionAngle, SplashData), &CommonValidators::DegreeRange, "Rotational angle to create a splash ring.\n");
|
||||
addFieldV("ringLifetime", TypeRangedF32, Offset(ringLifetime, SplashData), &CommonValidators::PositiveFloat, "Lifetime, in milliseconds, for a splash ring.\n");
|
||||
addFieldV("startRadius", TypeRangedF32, Offset(startRadius, SplashData), &CommonValidators::PositiveFloat, "Starting radius size of a splash ring.\n");
|
||||
addField("explosion", TYPEID< ExplosionData >(), Offset(explosion, SplashData), "ExplosionData object to create at the creation position of this splash effect.\n");
|
||||
|
||||
Parent::initPersistFields();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue