1. One Time Fulcrum to lua calls
2. Repeated fulcrum to lua calls
3. Event Based Fulcrum to Lua Calls
4. Local Lua class calls or Lua to lua moduls calls.
5. Lua to Fulcrum Calls
6. Property manager Vehicle Class Joints Assesment Module
7. Process Functions 1.Calls started when Setup calls are compeleted
7.1. Script.onRender 1.when opengl is loaded 2.running even in paused state.
7.2. Script.onProcess 1.Running when simulation resumed.
7.2.1. Tractor.Engine:brake(math.max(1, Controls.currBrake)
7.2.2. Tractor:process(delta);
7.2.2.1. Actor Sleep = False
7.2.2.2. self.Engine:process(delta);
7.2.2.2.1. self:CalculateRPM();
7.2.2.2.2. self:CalculateTorqueWithChart(); 1. Toruqe calculate based on RPM. 2. GearReduction 3. Wheel Toque calculate.
7.2.2.2.3. self:ProcessEngineState();
7.2.2.3. self:SendCraneDataParameter();
7.2.2.4. self:checkAttachmentInRange();
7.2.2.4.1. self.entity.getPoint('Load1');
7.2.2.4.2. Engine.getEntity(self.m_attachmentID);
7.2.2.5. self:CheckMachineToppled();
7.2.2.6. self:ProcessMotion(delta);
7.2.2.7. self:processSendRollPitchYaw();
7.2.3. Controls:process(delta); 1. Local clss Controls. 2. accelration, brake and steering angle.
7.2.4. Tractor:turn(Controls.currSteering*0.01745329252); Converting degreee to radian.
7.2.4.1. self:setSteeringAngle(math.min(math.max(angle, -0.44), 0.44));
7.2.5. Tractor.Engine:accelerate(Controls.currAcceleration);
7.3. Script.onUpdateProperties 1.Running even in Paused State.
8. Script.onInitialize
8.1. Localclass function calls
8.1.1. Tractor.entity.ID;
8.1.2. Tractor:create(entity);
8.1.2.1. calls to fulcrum
8.1.2.1.1. entity.getActor('BackJoint');
8.1.2.1.2. entity.createDispatchPoint('Steering', self.actor);
8.1.2.1.3. entity.getPoint('Load0');
8.1.2.1.4. self.Wheel.RL.globalBound.dimensions().y
8.1.2.2. LUA modules
8.1.2.2.1. Engine.getScriptClass();
8.1.2.2.2. Component.attach(self.entity, AssessmentHandler);
8.1.2.2.3. Engine.TerrainManager.track(self.actor, 8);
8.1.2.2.4. Common.UpdateSettingParameter(self,self.entity);
8.1.2.2.5. AssessmentHAndler
8.1.2.2.6. FamiliarizationInterface
8.1.2.2.7. craneEvnet
8.1.2.3. Local Tractor class function calls
8.1.2.3.1. self:CreateTractorAndBackJoint(); This Function Create Joints with base actor and Back levers
8.1.2.3.2. self:setupSteering(); This function set Tractor left right steering ball joint with base. and joint desc
8.1.2.3.3. self:setupWheels(); This function create joints with base actor and wheels. 1. Motoriezed joint. 2. Non motorized 3. track lenght/ Beam Length/2 ??? 4. wheel base
8.1.2.3.4. self.Engine:addMotor(self.Motor.wheelRL, self.Wheel.RL)
9. Setup Calls 1.One time Call
9.1. Script.onSceneLoadComplete
9.1.1. Tractor:SetTarget()
9.1.1.1. Engine.getEntity('DestinationPoint')
9.1.1.1.1. Engine.getScriptClass(target)
9.1.2. Tractor.CargoTargetHandler
9.1.2.1. self:fillOperationData("Connect Attachment ",111,NONE,nil,{1},0,false); fillOperationData = function(self,name,subtype,jointtype,limit,limittocheck,offset,reverse)
9.2. Script.onSimulationReady
9.3. Script.onTag
10. Event Based calls 1.Simulation Resumed 2.ON Event
10.1. Script.onCollision
10.2. Script.onEnumProperties
10.3. Script.onInputEvent
10.3.1. Key Board Inputs
10.3.1.1. Local Control Class Variable update.
10.3.1.2. Local Tractor Class Variable update.
10.3.2. Joystick