Esempio n. 1
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
TimeReadout::TimeReadout()
{
   STANDARD_CONSTRUCTOR()

   lcStrcpy(format,FORMAT_LENGTH,"%02d:%02d:%04.1f");
   tmode = hhmmss;
} 
Esempio n. 2
0
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
SolenoidButton::SolenoidButton()
{
   STANDARD_CONSTRUCTOR()
   noTimer = false;
   pushed = false;
   pushedSD.empty();
}
Esempio n. 3
0
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
ThreadSyncTask::ThreadSyncTask(Component* const p, const LCreal pri) : Thread(p, pri)
{
   STANDARD_CONSTRUCTOR()

   startSig = nullptr;
   completedSig = nullptr;
}
Esempio n. 4
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
DirectionReadout::DirectionReadout()
{
   STANDARD_CONSTRUCTOR()

   lcStrcpy(format,FORMAT_LENGTH,"%+07.2f");
   tmode = dd;
}
Esempio n. 5
0
// Constructor
TabLogger::LogActiveTrack::LogActiveTrack(int t, const TrackManager* const mgr, const Track* const trk)
{
    STANDARD_CONSTRUCTOR()
    thePlayer = 0;
    theEmission = 0;
    theType = t;
    theManager = mgr;
    theTrack = trk;
    if (theManager != 0) {
        thePlayer = dynamic_cast<const Player*>( theManager->findContainerByType(typeid(Player)) );
    }
    if (theTrack != 0) {
        const RfTrack* const rfTrk = dynamic_cast<const RfTrack*>(trk);
        if (rfTrk != 0) {
            theEmission = rfTrk->getLastEmission();
        }
    }
    pos.set(0,0,0);
    vel.set(0,0,0);
    angles.set(0,0,0);
    tgtPos.set(0,0,0);
    tgtVel.set(0,0,0);
    tgtAngles.set(0,0,0);
    sn = 0;
}
Esempio n. 6
0
// Constructor
Arc::Arc()
{
    STANDARD_CONSTRUCTOR()
    startAngle = 0.0;
    arcLength = 90.0;
    setIsConnected(false);
}
Esempio n. 7
0
MonitorMetrics::MonitorMetrics()
{
    // default configuration based on data from an unknown CRT monitor
    const int npoints = 21;
    LCreal luminanceLevels[npoints] = { 0.0f,     0.05f,    0.1f,    0.15f,   0.2f,    0.25f,    0.3f,
                                        0.35f,    0.4f,     0.45f,   0.5f,    0.55f,   0.6f,     0.65f,
                                        0.7f,     0.75f,    0.8f,    0.85f,   0.9f,    0.95f,    1.0f };
    LCreal luminanceRed[npoints] =    { 0.0f,     0.0f,     1.613f,  3.3f,    5.487f,  7.657f,  10.19f,
                                       13.02f,  16.49f,   19.36f,  22.57f,  26.21f,  30.32f,   33.67f,
                                       37.4f,   41.65f,   46.25f,  49.96f,  54.33f,  59.19f,   63.43f };
    LCreal luminanceGreen[npoints] =  { 0.0f,     0.0f,     3.14f,   7.482f, 13.28f,  20.13f,   27.91f,
                                       36.77f,  47.04f,   55.47f,  66.16f,  77.91f,  90.12f,  100.9f,
                                      113.4f, 127.3f,   142.2f,  152.7f,  165.8f,  178.7f,   191.0f };
    LCreal luminanceBlue[npoints] =   { 0.0f,     0.7603f,  2.025f,  3.653f,  5.554f,  7.427f,   9.427f,
                                       11.71f,  14.25f,   16.47f,  18.97f,  21.6f,   24.15f,   26.67f,
                                       29.51f,  32.16f,   35.22f,  37.61f,  40.53f,  43.4f,    45.99f };

    STANDARD_CONSTRUCTOR()

    redLuminance = new Table1(luminanceRed, npoints, luminanceLevels, npoints);
    greenLuminance = new Table1(luminanceGreen, npoints, luminanceLevels, npoints);
    blueLuminance = new Table1(luminanceBlue, npoints, luminanceLevels, npoints);
    phosphorCoordinates.set( 0.628f, 0.346f, 0.026f, 0.0f,
                             0.347f, 0.556f, 0.097f, 0.0f,
                             0.147f, 0.065f, 0.788f, 0.0f,
                             0.0f,   0.0f,   0.0f,   1.0f );
    refwhiteRGB.set( 0.211138f, 0.635777f, 0.153086f);
    refwhiteCIE.set( 0.276f, 0.239f, 0.485f );

    computeMatrix();
}
Esempio n. 8
0
//------------------------------------------------------------------------------
// Constructor(s)
//------------------------------------------------------------------------------
Gun::Gun()
{
   STANDARD_CONSTRUCTOR()

   bullet = nullptr;

   armed = false;
   fire = false;
   unlimited = false;

   burstFrameTimer = 0;
   burstFrameTime = 1.0f/LCreal(DEFAULT_BURST_RATE);
   rcount = 0.0;

   shortBurstTimer = 0.0;
   shortBurstTime  = 0.5;

   rounds = 0;
   initRounds = DEFAULT_NUM_ROUNDS;

   rpm = DEFAULT_ROUNDS_PER_MINUTE;

   setPosition(0.0, 0.0, 0.0);
   setAngles(0.0, 0.0, 0.0);
   // Note: rotation matrix (mm) was initialized by setAngles()

}
Esempio n. 9
0
// Constructor
TabLogger::LogGunActivity::LogGunActivity(int t, const Player* const launcher, const int n)
{
    STANDARD_CONSTRUCTOR()
    theType = t;
    thePlayer = launcher;
    rounds = n;
}
Esempio n. 10
0
Exp::Exp()
{
  STANDARD_CONSTRUCTOR()
  setMean(10.0);

  std::cout << "Exp::Exp() called\n";
}
Esempio n. 11
0
LinearVelocity::LinearVelocity(const Distance* const newDistance, const Time* const newTime)
{
    STANDARD_CONSTRUCTOR()

    distance = 1;
    time = 1;

    //Set checks to false
    bool okDistance = false;
    bool okTime = false;

    //Check and convert the distance to meters
    if (newDistance != nullptr)
    {
        LCreal finalDistance = Meters::convertStatic( *newDistance );
        okDistance = setMeters(finalDistance);
    }

    //Check and convert the time to seconds
    if (newTime != nullptr)
    {
        LCreal finaltime = Seconds::convertStatic( *newTime );
        okTime = setSeconds(finaltime);
    }

    //Check that both were set correctly - if not give error
    if ( !okTime || !okDistance )
    {
        //Give error if something was not set correctly:
        std::cerr << "Distance or Time not set correctly - new LinearVelocity Object bad." << std::endl;

    }

}
Esempio n. 12
0
//------------------------------------------------------------------------------
// Constructor(s)
//------------------------------------------------------------------------------
IrBox::IrBox()
{
   STANDARD_CONSTRUCTOR()
   x = 10.0;
   y = 10.0;
   z = 10.0;
}
Esempio n. 13
0
// Constructor
OcclusionArc::OcclusionArc()
{
    STANDARD_CONSTRUCTOR()
    // outer radius just a bit bigger than inner radius
    outerRadius = 1.1f;
    setFilled(true);
    setSlices(100);
}
Esempio n. 14
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
Rotary2::Rotary2()
{
   STANDARD_CONSTRUCTOR()

   Basic::Integer* p = new Basic::Integer(1);    // default rotary item
   setSelectionName(p);
   p->unref();
}
Esempio n. 15
0
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
Otm::Otm()
{
   STANDARD_CONSTRUCTOR()

   refFormName = 0;
   refTypeName = 0;
   typeId = 0;
}
Esempio n. 16
0
Uniform::Uniform()
{
   STANDARD_CONSTRUCTOR()
   min = 0;
   max = 1;

   std::cout << "Uniform::Uniform() called\n";
}
Esempio n. 17
0
// Constructor
TabLogger::LogPlayerData::LogPlayerData(int t, const Player* const p)
{
    STANDARD_CONSTRUCTOR()

    initData();
    thePlayer = p;
    theType = t;
}
Esempio n. 18
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
Cursor::Cursor()
{
   STANDARD_CONSTRUCTOR()

   width(1);
   setText(" ");
   setDisplayMode(reversed);
   setFlashRate(1.0f);
}
Esempio n. 19
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
Rotary::Rotary()
{
   STANDARD_CONSTRUCTOR()

   Basic::Integer* p = new Basic::Integer(1);    // default rotary item
   setSelectionName(p);
   p->unref();
   preDrawSelectList = true;
}
Esempio n. 20
0
Scanline::PolyData::PolyData() : polygon(nullptr), orig(nullptr)
{
   STANDARD_CONSTRUCTOR()

   x0 = 0.0f;
   n0.set(0.0f,0.0f,1.0f);
   nslope.set(0.0f,0.0f,0.0f);
   aptEdge2 = false;
}
Esempio n. 21
0
//------------------------------------------------------------------------------
// Constructor(s)
//------------------------------------------------------------------------------
SigAzEl::SigAzEl()
{
   STANDARD_CONSTRUCTOR()

   tbl = 0;
   swapOrderFlg = false;
   degFlg = false;
   dbFlg = false;
}
Esempio n. 22
0
Timer::Timer(const Type direction, const double rtime)
{
    STANDARD_CONSTRUCTOR()

   initData();

    timerValue = rtime;
    ctime  = rtime;
    dir = direction;
}
Esempio n. 23
0
MyObj::MyObj()
{
   STANDARD_CONSTRUCTOR()
   colorTable = nullptr;
   textColor = nullptr;
   backColor = nullptr;
   vector = nullptr;
   message = nullptr;
   visible = false;
}
Esempio n. 24
0
//------------------------------------------------------------------------------
// Class support functions
//------------------------------------------------------------------------------
LongitudeReadout::LongitudeReadout()
{
   STANDARD_CONSTRUCTOR()

   lcStrcpy(format,FORMAT_LENGTH,"%+04d@%04.1f");
   tmode = ddmm;
   plusChar = 'E';
   minusChar = 'W';
   postSign = false;
}
Esempio n. 25
0
TabLogger::LogPlayerData::LogPlayerData(int t, const Player* const p, const Player* const w)
{
    STANDARD_CONSTRUCTOR()

    initData();

    theSource = w;  // source of damage, usually a weapon, always a player
    thePlayer = p;
    theType = t;
    mach = -1.0;
}
Esempio n. 26
0
SigAzEl::SigAzEl(const Basic::Table2* const tbl0)
{
   STANDARD_CONSTRUCTOR()

   tbl = 0;
   if (tbl0 != 0) {
      tbl = tbl0->clone();
   }
   swapOrderFlg = false;
   degFlg = false;
   dbFlg = false;
}
Esempio n. 27
0
// Constructor
TabLogger::LogWeaponActivity::LogWeaponActivity(const int callType, const Player* const lancher, const Player* const wpn, const Player* const tgt, const unsigned int t, const LCreal d)
{
    STANDARD_CONSTRUCTOR()
    theType   = callType;
    thePlayer = lancher;
    theWeapon = wpn;
    theTarget = tgt;
    detType   = t;
    missDist  = d;
    theTrack = 0;
    eventID = 0;
}
Esempio n. 28
0
//------------------------------------------------------------------------------
// Constructor(s)
//------------------------------------------------------------------------------
MonitorMetrics::MonitorMetrics(const Table1* redLumTbl, const Table1* greenLumTbl, const Table1* blueLumTbl,
                               const osg::Matrix& phosphorCoordMatrix, const osg::Vec3& whiteRGB, const osg::Vec3& whiteCIE)
{
    STANDARD_CONSTRUCTOR()

    redLuminance = redLumTbl;
    greenLuminance = greenLumTbl;
    blueLuminance = blueLumTbl;
    phosphorCoordinates = phosphorCoordMatrix;
    refwhiteRGB = whiteRGB;
    refwhiteCIE = whiteCIE;

    computeMatrix();
}
Esempio n. 29
0
// Constructor
TabLogger::LogPlayerData::LogPlayerData(int t, const Player* const p)
{
    STANDARD_CONSTRUCTOR()
    theSource = 0;
    thePlayer = p;
    theType = t;
    pos.set(0,0,0);
    vel.set(0,0,0);
    angles.set(0,0,0);
    alpha = 0;
    beta = 0;
    ias = 0;
    mach = 0.0;
    pLoading = 0.0;
}
Esempio n. 30
0
TabLogger::LogPlayerData::LogPlayerData(int t, const Player* const p, const Player* const w)
{
    STANDARD_CONSTRUCTOR()
    theSource = w;  // source of damage, usually a weapon, always a player
    thePlayer = p;
    theType = t;
    pos.set(0,0,0);
    vel.set(0,0,0);
    angles.set(0,0,0);
    alpha = 0;
    beta = 0;
    ias = 0;
    mach = -1.0;
    pLoading = 0.0;
}