예제 #1
0
        /// <summary>
        /// Removes and destroys a ManualObject from the SceneManager.
        /// </summary>
        /// <param name="obj">The object to destroy.</param>
        public void destroyManualObject(ManualObject obj)
        {
            IntPtr ogreManual = obj.OgreObject;

            manualObjects.destroyObject(ogreManual);
            SceneManager_destroyManualObject(ogreSceneManager, ogreManual);
        }
예제 #2
0
 public override void eventOccured()
 {
     switch (this.EventType)
     {
     case KnownRenderSystemEvents.DeviceRestored:
         ManualObject.fireRedrawRequired();
         break;
     }
 }
예제 #3
0
        public void destroySection(String sectionName)
        {
            ManualObject manualObject;

            if (manualObjectMap.TryGetValue(sectionName, out manualObject))
            {
                sceneNode.detachObject(manualObject);
                scene.destroyManualObject(manualObject);
                manualObjectMap.Remove(sectionName);
                if (manualObject == currentManualObject)
                {
                    currentManualObject = null;
                }
            }
        }
예제 #4
0
 public void begin(String sectionName, DrawingType drawingType)
 {
     if (manualObjectMap.TryGetValue(sectionName, out currentManualObject))
     {
         if (currentManualObject.getNumSections() != 0)
         {
             currentManualObject.beginUpdate(0);
         }
         else
         {
             currentManualObject.begin(currentMaterial, getOpType(drawingType));
         }
     }
     else
     {
         currentManualObject = scene.createManualObject(sectionName + MANUAL_OBJECT_RESERVED_NAME);
         currentManualObject.setRenderQueueGroup((byte)RenderQueueGroupID.RENDER_QUEUE_OVERLAY);
         currentManualObject.setDynamic(true);
         sceneNode.attachObject(currentManualObject);
         currentManualObject.begin(currentMaterial, getOpType(drawingType));
         manualObjectMap.Add(sectionName, currentManualObject);
     }
 }
예제 #5
0
 public void end()
 {
     currentManualObject.end();
     currentManualObject = null;
 }
 public ManualObjectDefinition(String name, ManualObject manualObject)
     : base(name, manualObject)
 {
 }