Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

USARBot.Sensor


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
class Sensor extends Item abstract;

var config bool HiddenSensor;
var config InterpCurve  OutputCurve;
var config float    Noise;
// Contains Gaussian Random Number generator
var USARUtils utils;
// Variables to be used in the gaussian random number generator
var float Mean;
var float Sigma;

// Whether the sensor data will be sent out in group style or not. Right now,
// all the sensor in the same type are treated as a group
var config bool bUseGroup; 
var config bool bWithTimeStamp;

function Init(String SName, Actor parent, vector position, rotator direction, KVehicle platform, name mount)
{
    Super.Init(SName,parent,position,direction,platform,mount);
    bHidden = HiddenSensor;
    utils = New class'USARUtils';
}

function String GetData()
{
    local string outstring;

    outstring="{Name "$ItemName$"}";

    return outstring;
}

function String GetHead()
{
    local string outstring;

    if (bWithTimeStamp)
        outstring="SEN {Time "$Level.TimeSeconds$"} {Type "$ItemType$"}";
    else
        outstring="SEN {Type "$ItemType$"}";

    return outstring;
}

function String GetConfHead()
{
    local string outstring;

    outstring="CONF {Type "$ItemType$"}";

    return outstring;
}

function String GetConfData()
{
    return "{Name "$ItemName$"}";
}

function string GetGeoHead()
{
    local string outstring;

    outstring="GEO {Type "$ItemType$"}";

    return outstring;
}

function string GetGeoData()
{
    local string outstring;

    if (converter==None)
        outstring="{Name "$ItemName$" Location "$(Location-Base.Location)$" Orientation "$(Rotation-Base.Rotation)$" Mount "$ItemMount$"}";
    else 
        outstring="{Name "$ItemName$" Location "$(converter.Str_LengthVectorFromUU(Location-Base.Location))
                               $" Orientation "$(converter.Str_RotatorFromUU(Rotation-Base.Rotation))
                                     $" Mount "$ItemMount$"}";
    return outstring;
}

defaultproperties
{
    ItemType="Sensor"
    HiddenSensor=true
    Noise=0.001
    DrawType=DT_StaticMesh
    DrawScale=0.1
    StaticMesh=StaticMesh'USARSim_VehicleParts_Meshes.Sensors.Sensor'
    bHardAttach=true
    RemoteRole=ROLE_None
    bUseGroup=false;
        Sigma=0.05
    Mean=0.0
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Do 25.1.2007 19:56:46.000 - Creation time: Mo 16.4.2007 11:20:53.078 - Created with UnCodeX