private void makeProp()
 {
     if (simObject == null)
     {
         simObject = TimelineController.PropFactory.createProp(propType, translation, rotation);
         if (simObject != null)
         {
             propFade = simObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior;
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// Create a model.
        /// </summary>
        /// <param name="meshName">The name of the mesh to load.</param>
        /// <param name="scene">The scene to load the mesh into.</param>
        public void createModel(String meshName, SimScene scene)
        {
            entityDefintion.MeshName = meshName;
            currentSimObject         = simObjectDefinition.register(scene.getDefaultSubScene());
            Stopwatch sw = new Stopwatch();

            sw.Start();
            scene.buildScene(SceneBuildOptions.None);
            sw.Stop();
            Log.Info("Scene loaded in {0} ms.", sw.ElapsedMilliseconds);
            entity = ((SceneNodeElement)currentSimObject.getElement("EntityNode")).getNodeObject("Entity") as Entity;
            readModelInfo();
            entity.setDisplaySkeleton(showSkeleton);
            selectableModel.ModelObject = currentSimObject;
            controller.ObjectMover.clearMovableObjects();
            controller.ObjectMover.addMovableObject("model", selectableModel);
        }