mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 03:23:52 +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
|
|
@ -98,28 +98,28 @@ void ReflectorDesc::initPersistFields()
|
|||
docsURL;
|
||||
addGroup( "ReflectorDesc" );
|
||||
|
||||
addField( "texSize", TypeS32, Offset( texSize, ReflectorDesc ),
|
||||
addFieldV( "texSize", TypeRangedS32, Offset( texSize, ReflectorDesc ), &CommonValidators::PositiveInt,
|
||||
"Size in pixels of the (square) reflection texture. For a cubemap "
|
||||
"this value is interpreted as size of each face." );
|
||||
|
||||
addField( "nearDist", TypeF32, Offset( nearDist, ReflectorDesc ),
|
||||
addFieldV( "nearDist", TypeRangedF32, Offset( nearDist, ReflectorDesc ), &CommonValidators::PositiveFloat,
|
||||
"Near plane distance to use when rendering this reflection. Adjust "
|
||||
"this to limit self-occlusion artifacts." );
|
||||
|
||||
addField( "farDist", TypeF32, Offset( farDist, ReflectorDesc ),
|
||||
addFieldV( "farDist", TypeRangedF32, Offset( farDist, ReflectorDesc ), &CommonValidators::PositiveFloat,
|
||||
"Far plane distance to use when rendering reflections." );
|
||||
|
||||
addField( "objectTypeMask", TypeS32, Offset( objectTypeMask, ReflectorDesc ),
|
||||
addField( "objectTypeMask", TypeGameTypeMasksType, Offset( objectTypeMask, ReflectorDesc ),
|
||||
"Object types which render into this reflection." );
|
||||
|
||||
addField( "detailAdjust", TypeF32, Offset( detailAdjust, ReflectorDesc ),
|
||||
addFieldV( "detailAdjust", TypeRangedF32, Offset( detailAdjust, ReflectorDesc ), &CommonValidators::PositiveFloat,
|
||||
"Scale applied to lod calculation of objects rendering into "
|
||||
"this reflection ( modulates $pref::TS::detailAdjust )." );
|
||||
|
||||
addField( "priority", TypeF32, Offset( priority, ReflectorDesc ),
|
||||
addFieldV( "priority", TypeRangedF32, Offset( priority, ReflectorDesc ), &CommonValidators::PositiveFloat,
|
||||
"Priority for updating this reflection, relative to others." );
|
||||
|
||||
addField( "maxRateMs", TypeS32, Offset( maxRateMs, ReflectorDesc ),
|
||||
addFieldV( "maxRateMs", TypeRangedS32, Offset( maxRateMs, ReflectorDesc ), &CommonValidators::PositiveInt,
|
||||
"If less than maxRateMs has elapsed since this relfection was last "
|
||||
"updated, then do not update it again. This 'skip' can be disabled by "
|
||||
"setting maxRateMs to zero." );
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void SceneObject::setHidden( bool hidden )
|
|||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
IRangeValidator soMountRange(-1, SceneObject::NumMountPoints);
|
||||
void SceneObject::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
|
|
@ -685,7 +685,7 @@ void SceneObject::initPersistFields()
|
|||
"@brief PersistentID of object we are mounted to.\n\n"
|
||||
"Unlike the SimObjectID that is determined at run time, the PersistentID of an object is saved with the level/mission and "
|
||||
"may be used to form a link between objects." );
|
||||
addField( "mountNode", TypeS32, Offset( mMount.node, SceneObject ), "Node we are mounted to." );
|
||||
addFieldV( "mountNode", TypeRangedS32, Offset( mMount.node, SceneObject ),&soMountRange, "Node we are mounted to." );
|
||||
addField( "mountPos", TypeMatrixPosition, Offset( mMount.xfm, SceneObject ), "Position we are mounted at ( object space of our mount object )." );
|
||||
addField( "mountRot", TypeMatrixRotation, Offset( mMount.xfm, SceneObject ), "Rotation we are mounted at ( object space of our mount object )." );
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "scene/pathManager.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "console/typeValidators.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
|
@ -174,13 +175,13 @@ void Path::initPersistFields()
|
|||
{
|
||||
docsURL;
|
||||
addField("isLooping", TypeBool, Offset(mIsLooping, Path), "If this is true, the loop is closed, otherwise it is open.\n");
|
||||
addField("Speed", TypeF32, Offset(mPathSpeed, Path), "Speed.\n");
|
||||
addFieldV("Speed", TypeRangedF32, Offset(mPathSpeed, Path), &CommonValidators::PositiveFloat, "Speed.\n");
|
||||
addProtectedField("mPathShape", TYPEID< PathShapeData >(), Offset(mDataBlock, Path),
|
||||
&setDataBlockProperty, &defaultProtectedGetFn,
|
||||
"@brief Spawned PathShape.\n\n");
|
||||
addField("spawnCount", TypeS32, Offset(mSpawnCount, Path), "Spawn Count.\n");
|
||||
addField("minDelay", TypeS32, Offset(mMinDelay, Path), "Spawn Delay (min).\n");
|
||||
addField("maxDelay", TypeS32, Offset(mMaxDelay, Path), "Spawn Delay (max).\n");
|
||||
addFieldV("spawnCount", TypeRangedS32, Offset(mSpawnCount, Path), &CommonValidators::PositiveInt, "Spawn Count.\n");
|
||||
addFieldV("minDelay", TypeRangedS32, Offset(mMinDelay, Path), &CommonValidators::PositiveInt, "Spawn Delay (min).\n");
|
||||
addFieldV("maxDelay", TypeRangedS32, Offset(mMaxDelay, Path), &CommonValidators::PositiveInt, "Spawn Delay (max).\n");
|
||||
|
||||
Parent::initPersistFields();
|
||||
//
|
||||
|
|
@ -467,10 +468,10 @@ void Marker::initPersistFields()
|
|||
{
|
||||
docsURL;
|
||||
addGroup( "Misc" );
|
||||
addField("seqNum", TypeS32, Offset(mSeqNum, Marker), "Marker position in sequence of markers on this path.\n");
|
||||
addFieldV("seqNum", TypeRangedS32, Offset(mSeqNum, Marker), &CommonValidators::PositiveInt, "Marker position in sequence of markers on this path.\n");
|
||||
addField("hitCommand", TypeCommand, Offset(mHitCommand, Marker), "The command to execute when a path follower reaches this marker.");
|
||||
addField("type", TYPEID< KnotType >(), Offset(mKnotType, Marker), "Type of this marker/knot. A \"normal\" knot will have a smooth camera translation/rotation effect.\n\"Position Only\" will do the same for translations, leaving rotation un-touched.\nLastly, a \"Kink\" means the rotation will take effect immediately for an abrupt rotation change.\n");
|
||||
addField("msToNext", TypeS32, Offset(mMSToNext, Marker), "Milliseconds to next marker in sequence.\n");
|
||||
addFieldV("msToNext", TypeRangedS32, Offset(mMSToNext, Marker), &CommonValidators::NaturalNumber, "Milliseconds to next marker in sequence.\n");
|
||||
addField("smoothingType", TYPEID< SmoothingType >(), Offset(mSmoothingType, Marker), "Path smoothing at this marker/knot. \"Linear\" means no smoothing, while \"Spline\" means to smooth.\n");
|
||||
endGroup("Misc");
|
||||
|
||||
|
|
|
|||
|
|
@ -105,10 +105,10 @@ U32 SceneSimpleZone::packUpdate( NetConnection* connection, U32 mask, BitStream*
|
|||
if( stream->writeFlag( mask & AmbientMask ) )
|
||||
{
|
||||
stream->writeFlag( mUseAmbientLightColor );
|
||||
stream->writeFloat( mAmbientLightColor.red, 7 );
|
||||
stream->writeFloat( mAmbientLightColor.green, 7 );
|
||||
stream->writeFloat( mAmbientLightColor.blue, 7 );
|
||||
stream->writeFloat( mAmbientLightColor.alpha, 7 );
|
||||
stream->writeFloat( mAmbientLightColor.red, 8 );
|
||||
stream->writeFloat( mAmbientLightColor.green, 8 );
|
||||
stream->writeFloat( mAmbientLightColor.blue, 8 );
|
||||
stream->writeFloat( mAmbientLightColor.alpha, 8 );
|
||||
}
|
||||
|
||||
return retMask;
|
||||
|
|
@ -123,10 +123,10 @@ void SceneSimpleZone::unpackUpdate( NetConnection* connection, BitStream* stream
|
|||
if( stream->readFlag() ) // AmbientMask
|
||||
{
|
||||
mUseAmbientLightColor = stream->readFlag();
|
||||
mAmbientLightColor.red = stream->readFloat( 7 );
|
||||
mAmbientLightColor.green = stream->readFloat( 7 );
|
||||
mAmbientLightColor.blue = stream->readFloat( 7 );
|
||||
mAmbientLightColor.alpha = stream->readFloat( 7 );
|
||||
mAmbientLightColor.red = stream->readFloat( 8 );
|
||||
mAmbientLightColor.green = stream->readFloat( 8 );
|
||||
mAmbientLightColor.blue = stream->readFloat( 8 );
|
||||
mAmbientLightColor.alpha = stream->readFloat( 8 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue