Empeld
Empeld plugin documentation.
|
Class to synchronize primitives that support addition and multiplication Smoothing (Interpolation) the result across time. Great for linear interpolation of positions, rotation and other such variable data. More...
Public Member Functions | |
SmoothSync () | |
SmoothSync (T val) | |
SmoothSync (T val, TimeSpan period) | |
void | ClearFactor () |
Clear the interpolative factor More... | |
void | Jump (T val) |
Jump to a specific value, over the network, ignoring interpolation More... | |
Public Member Functions inherited from pluginbase.Objects.Syncable.Watchers.SyncBase< T > | |
SyncBase () | |
SyncBase (T val) | |
override string | ToString () |
sealed override bool | Equals (object obj) |
sealed override int | GetHashCode () |
Static Public Member Functions | |
static implicit | operator T (SmoothSync< T > sync) |
Static Public Member Functions inherited from pluginbase.Objects.Syncable.Watchers.SyncBase< T > | |
static implicit | operator T (SyncBase< T > sync) |
static bool | operator== (SyncBase< T > left, T right) |
static bool | operator!= (SyncBase< T > left, T right) |
static bool | operator== (SyncBase< T > left, SyncBase< T > right) |
static bool | operator!= (SyncBase< T > left, SyncBase< T > right) |
Protected Member Functions | |
override void | EncodeTo (System.IO.BinaryWriter writer, EncodeContext context) |
override void | DecodeFrom (System.IO.BinaryReader reader, DecodeContext context) |
override void | Load (pluginbase.Objects.Libs.Persist.IReadPersistObject obj) |
Protected Member Functions inherited from pluginbase.Objects.Syncable.Watchers.SyncBase< T > | |
override void | EncodeTo (BinaryWriter writer, EncodeContext context) |
override void | DecodeFrom (BinaryReader reader, DecodeContext context) |
override void | Persist (IPersistObject obj) |
override void | Load (IReadPersistObject obj) |
Properties | |
float | Factor [get, set] |
The current factor of which the interpolative multiplcation happens. Can be overriden with a value. To clear override, use ClearFactor() More... | |
TimeSpan | Period [get, set] |
The length of time over which interpolative smoothing occurs More... | |
bool | FinishedInterpolating [get] |
Has the interpolation finished More... | |
T | RawValue [get, set] |
The raw, real-value, of the underlying syncable object, without smoothing More... | |
T | Value [get, set] |
The smoothed value over time More... | |
Additional Inherited Members | |
Protected Attributes inherited from pluginbase.Objects.Syncable.Watchers.SyncBase< T > | |
T | InternalValue |
Static Protected Attributes inherited from pluginbase.Objects.Syncable.Watchers.SyncBase< T > | |
static readonly IEqualityComparer< T > | Comparer |
static readonly string | TypeName |
Class to synchronize primitives that support addition and multiplication Smoothing (Interpolation) the result across time. Great for linear interpolation of positions, rotation and other such variable data.
Can interpolate anything with basic arithmatic expressions (Convert from float, add, subtract, multiply)
T | : | struct |
pluginbase.Objects.Syncable.Watchers.SmoothSync< T >.SmoothSync | ( | T | val | ) |
pluginbase.Objects.Syncable.Watchers.SmoothSync< T >.SmoothSync | ( | T | val, |
TimeSpan | period | ||
) |
void pluginbase.Objects.Syncable.Watchers.SmoothSync< T >.ClearFactor | ( | ) |
|
protected |
|
protected |
void pluginbase.Objects.Syncable.Watchers.SmoothSync< T >.Jump | ( | T | val | ) |
Jump to a specific value, over the network, ignoring interpolation
val | Value. |
|
protected |
|
static |
|
getset |
The current factor of which the interpolative multiplcation happens. Can be overriden with a value. To clear override, use ClearFactor()
The factor.
|
get |
Has the interpolation finished
true
if finished interpolating; otherwise, false
.
|
getset |
The length of time over which interpolative smoothing occurs
The period.
|
getset |
The raw, real-value, of the underlying syncable object, without smoothing
The raw value.
|
getset |
The smoothed value over time
The value.