protected override void link() { deltaSimObject = Owner.getOtherSimObject(deltaSimObjectName); if (deltaSimObject == null) { blacklist("Cannot find delta sim object {0}.", deltaSimObjectName); } MeasurementController.addMesurement(this); startingDelta = calculateDelta().length(); if (startingDelta == 0.0f) //Handle 0, just be a straight scaler in that case, really pretty unlikely { startingDelta = 1.0f; } }
protected override void constructed() { sceneNode = Owner.getElement(nodeName) as SceneNodeElement; if (sceneNode == null) { blacklist("Cannot find scene node named {0}.", nodeName); } manualObject = sceneNode.getNodeObject(manualObjectName) as ManualObject; if (manualObject == null) { blacklist("Cannot find manual object named {0}.", manualObjectName); } manualObject.setVisible(drawLines); manualObject.begin("Grid", OperationType.OT_LINE_LIST); manualObject.position(ref Vector3.Zero); manualObject.color(0, 0, 0, 0); manualObject.position(ref Vector3.Zero); manualObject.color(0, 0, 0, 0); manualObject.end(); MeasurementController.setMeasurementDrawer(this); }
protected override void destroy() { MeasurementController.removeMeasurement(this); }
protected override void destroy() { MeasurementController.setMeasurementDrawer(null); }