private void buildBackground() { background.begin(materialName, OperationType.OT_TRIANGLE_LIST); //bottom left background.position(-halfWidth, -halfHeight, 0); background.textureCoord(0, uvY); //top left background.position(-halfWidth, halfHeight, 0); background.textureCoord(0, 0); //bottom right background.position(halfWidth, -halfHeight, 0); background.textureCoord(uvX, uvY); //top left background.position(-halfWidth, halfHeight, 0); background.textureCoord(0, 0); //top right background.position(halfWidth, halfHeight, 0); background.textureCoord(uvX, 0); //bottom right background.position(halfWidth, -halfHeight, 0); background.textureCoord(uvX, uvY); background.setRenderQueueGroup(0); background.end(); }
protected override void applyAlphaToMaterial(float alpha) { workingAlpha = alpha; alphaQuat.w = alpha; subEntity.setCustomParameter(0, alphaQuat); if (disableOnHidden) { entity.setVisible(alpha >= 0.00008f); } if (alpha >= 0.9999f) { subEntity.setMaterialName(baseMaterialName); entity.setRenderQueueGroup(0); } else { subEntity.setMaterialName(finalAlphaMaterialName); entity.setRenderQueueGroup((byte)(95 + renderGroupOffset)); } }
public void sceneLoaded(SimScene scene) { SimSubScene subScene = scene.getDefaultSubScene(); if (subScene != null) { OgreSceneManager sceneManager = subScene.getSimElementManager <OgreSceneManager>(); manualObject = sceneManager.SceneManager.createManualObject(name + "__MeasurementManualObject"); manualObject.setRenderQueueGroup(95); manualObject.RedrawRequired += manualObject_RedrawRequired; sceneNode = sceneManager.SceneManager.createSceneNode(name + "__MeasurementManualObjectSceneNode"); sceneNode.attachObject(manualObject); sceneNode.setVisible(visible); sceneNode.setPosition(origin); sceneManager.SceneManager.getRootSceneNode().addChild(sceneNode); redraw(); } }