Exemplo n.º 1
0
        /// <summary>
        ///		Normal constructor. Should not be called directly, but rather the SceneManager.CreateLight method should be used.
        /// </summary>
        /// <param name="name"></param>
        public Light(string name)
        {
            this.name = name;

            // Default to point light, white diffuse light, linear attenuation, fair range
            type              = LightType.Point;
            diffuse           = ColorEx.White;
            specular          = ColorEx.Black;
            range             = 100000;
            attenuationConst  = 1.0f;
            attenuationLinear = 0.0f;
            attenuationQuad   = 0.0f;

            // Center in world, direction irrelevant but set anyway
            position  = Vector3.Zero;
            direction = Vector3.UnitZ;

            // Default some spot values
            spotInner   = 30.0f;
            spotOuter   = 40.0f;
            spotFalloff = 1.0f;

            localTransformDirty     = false;
            powerScale              = 1.0f;
            customShadowCameraSetup = null;
        }
Exemplo n.º 2
0
 /// <summary>
 ///    Reset the shadow camera setup to the default. 
 ///    see ShadowCameraSetup
 /// </summary>
 public void ResetCustomShadowCameraSetup()
 {
     customShadowCameraSetup = null;
 }
Exemplo n.º 3
0
        /// <summary>
        ///		Normal constructor. Should not be called directly, but rather the SceneManager.CreateLight method should be used.
        /// </summary>
        /// <param name="name"></param>
        public Light(string name)
        {
            this.name = name;

            // Default to point light, white diffuse light, linear attenuation, fair range
            type = LightType.Point;
            diffuse = ColorEx.White;
            specular = ColorEx.Black;
            range = 100000;
            attenuationConst = 1.0f;
            attenuationLinear = 0.0f;
            attenuationQuad = 0.0f;

            // Center in world, direction irrelevant but set anyway
            position = Vector3.Zero;
            direction = Vector3.UnitZ;

            // Default some spot values
            spotInner = 30.0f;
            spotOuter = 40.0f;
            spotFalloff = 1.0f;

            localTransformDirty = false;
            powerScale = 1.0f;
            customShadowCameraSetup = null;
        }
        public SceneManager(string smName)
        {
            this.smName = smName;
            cameraList = new Dictionary<string, Camera>();
            //lightList = new LightList();
            //entityList = new EntityList();
            movableObjectCollectionMap = new Dictionary<string, Dictionary<string, MovableObject>>();
            sceneNodeList = new Dictionary<string, SceneNode>();
            //billboardSetList = new Dictionary<string, BillboardSet>();
            animationList = new Dictionary<string, Animation>();
            animationStateList = new AnimationStateSet();
            regionList = new List<Region>();

            // create the root scene node
            rootSceneNode = new SceneNode(this, "Root");
            defaultRootNode = rootSceneNode;

            // default to no fog
            fogMode = FogMode.None;

            // no shadows by default
            shadowTechnique = ShadowTechnique.None;

            illuminationStage = IlluminationRenderStage.None;
            renderingNoShadowQueue = false;
            renderingMainGroup = false;
            shadowColor = new ColorEx(0.25f, 0.25f, 0.25f);
            shadowDirLightExtrudeDist = 10000;
            shadowIndexBufferSize = 51200;
            shadowTextureOffset = 0.6f;
            shadowTextureFadeStart = 0.7f;
            shadowTextureFadeEnd = 0.9f;
            shadowTextureSize = 512;
            shadowTextureConfigDirty = true;
            ShadowTextureCount = 1;
            findVisibleObjects = true;
            suppressRenderStateChanges = false;
            suppressShadows = false;
            shadowUseInfiniteFarPlane = true;
            shadowCasterRenderBackFaces = true;
            defaultShadowCameraSetup = new DefaultShadowCameraSetup();
        }
Exemplo n.º 5
0
 /// <summary>
 ///    Reset the shadow camera setup to the default.
 ///    see ShadowCameraSetup
 /// </summary>
 public void ResetCustomShadowCameraSetup()
 {
     customShadowCameraSetup = null;
 }