当前位置: 首页>>代码示例>>C#>>正文


C# Core.ColorEx类代码示例

本文整理汇总了C#中Axiom.Core.ColorEx的典型用法代码示例。如果您正苦于以下问题:C# ColorEx类的具体用法?C# ColorEx怎么用?C# ColorEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ColorEx类属于Axiom.Core命名空间,在下文中一共展示了ColorEx类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GlobalAmbientLight

 public GlobalAmbientLight(IWorldContainer parentContainer,WorldEditor worldEditor, SceneManager sceneManager, ColorEx lightColor)
 {
     this.parent = parentContainer;
     this.app = worldEditor;
     this.scene = sceneManager;
     this.color = lightColor;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:7,代码来源:GlobalAmbientLight.cs

示例2: Element

			public Element( Vector3 position, float width, float texCoord, ColorEx color )
			{
				this.position = position;
				this.width = width;
				this.texCoord = texCoord;
				this.color = color;
			}
开发者ID:WolfgangSt,项目名称:axiom,代码行数:7,代码来源:BillboardChain.cs

示例3: Element

			public Element( Vector3 position, float width, float texCoord, ColorEx color )
			{
				Position = position;
				Width = width;
				TexCoord = texCoord;
				Color = color;
			}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:7,代码来源:BillboardChain.cs

示例4: AddFogCommand

 public AddFogCommand(WorldEditor app, Boundary parent, ColorEx color, float nearin, float farin)
 {
     this.app = app;
     this.parent = parent;
     this.color = color;
     this.near = nearin;
     this.far = farin;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:8,代码来源:AddFogCommand.cs

示例5: GlobalDirectionalLight

 public GlobalDirectionalLight(WorldEditor worldEditor, IWorldContainer parent, Vector3 lightDir, ColorEx diff, ColorEx spec)
 {
     this.app = worldEditor;
     this.parent = parent;
     this.lightDirection = lightDir;
     this.diffuse = diff;
     this.specular = spec;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:8,代码来源:GlobalDirectionalLight.cs

示例6: DirectionalLight

 public DirectionalLight(WorldEditor worldEditor, Boundary parent, Vector3 lightDir, ColorEx diff, ColorEx spec)
 {
     this.app = worldEditor;
     this.parent = parent;
     this.lightDirection = lightDir;
     this.diffuse = diff;
     this.specular = spec;
     this.name = String.Format("{0}-{1}", this.parent.Name, "DirectionalLight");
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:9,代码来源:DirectionalLight.cs

示例7: MultiLights

        public MultiLights(SceneManager pSceneManager, SceneNode pCamNode, MovingObject pPlayerShip, Int32 pNumberOfLights)
        {
            oldCamLightColor = CamLightColor = new ColorEx(0.13f, 0.1f, 0.05f);
            PlayerLightColor = ColorEx.White;
            camLights = new List<Light>(pNumberOfLights);

            innerLights = (Int32)Math.Round(pNumberOfLights / 3.0f, MidpointRounding.AwayFromZero);
            outerLights = pNumberOfLights - innerLights;

            // create the playership's light.
            playerLight = pSceneManager.CreateLight("playerSpotLight");
            playerLight.Type = LightType.Spotlight;
            playerLight.Diffuse = PlayerLightColor;
            playerLight.Specular = ColorEx.White;
            playerLight.SetSpotlightRange(0.0f, 120.0f);
            playerLight.Direction = Vector3.NegativeUnitZ;

            playerLightNode = pPlayerShip.Node.CreateChildSceneNode();
            playerLightNode.AttachObject(playerLight);
            playerLightNode.Position = new Vector3(0, 0, 0);
            playerLightNode.SetDirection(new Vector3(1, 0, 0), TransformSpace.Local);

            // create the camera spotlights around the camera's direction.
            camInnerLightNode = pCamNode.CreateChildSceneNode();
            camInnerLightNode.Position = new Vector3(0, 0, 0);
            camOuterLightNode = pCamNode.CreateChildSceneNode();
            camOuterLightNode.Position = new Vector3(0, 0, 0);

            for (var i = 0; i < innerLights; i++)
            {
                var light = pSceneManager.CreateLight("camInnerLight " + (i + 1));
                light.Type = LightType.Spotlight;
                light.Diffuse = CamLightColor;
                light.Specular = ColorEx.White;
                light.SetSpotlightRange(0.0f, 25.0f);
                light.Direction = Quaternion.FromAngleAxis(360.0 * i / innerLights * Constants.DegreesToRadians, Vector3.UnitZ) *
                    Quaternion.FromAngleAxis(10.0 * Constants.DegreesToRadians, Vector3.UnitX) *
                    Vector3.NegativeUnitZ;

                camLights.Add(light);
                camInnerLightNode.AttachObject(light);
            }
            for (var i = 0; i < outerLights; i++)
            {
                var light = pSceneManager.CreateLight("camOuterLight " + (i + 1));
                light.Type = LightType.Spotlight;
                light.Diffuse = CamLightColor;
                light.Specular = ColorEx.White;
                light.SetSpotlightRange(0.0f, 25.0f);
                light.Direction = Quaternion.FromAngleAxis(360.0 * i / outerLights * Constants.DegreesToRadians, Vector3.UnitZ) *
                    Quaternion.FromAngleAxis(20.0 * Constants.DegreesToRadians, Vector3.UnitX) *
                    Vector3.NegativeUnitZ;

                camLights.Add(light);
                camOuterLightNode.AttachObject(light);
            }
        }
开发者ID:jonathandlo,项目名称:Evolution_War,代码行数:57,代码来源:MultiLights.cs

示例8: ColorInterpolatorAffector

        public ColorInterpolatorAffector()
        {
            this.type = "ColourInterpolator";

            for( int i = 0; i < MAX_STAGES; ++i ) {
                colorAdj[i] = new ColorEx(0.5f, 0.5f, 0.5f, 0.0f);
                timeAdj[i] = 1.0f;
            }
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:9,代码来源:ColorInterpolatorAffector.cs

示例9: ParseColor

        /// <summary>
        ///		Parses an array of params and returns a color from it.
        /// </summary>
        /// <param name="val"></param>
        public static ColorEx ParseColor(string[] values)
        {
            ColorEx color = new ColorEx();
            color.r = ParseFloat(values[0]);
            color.g = ParseFloat(values[1]);
            color.b = ParseFloat(values[2]);
            color.a = (values.Length > 3) ? ParseFloat(values[3]) : 1.0f;

            return color;
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:14,代码来源:StringConverter.cs

示例10: TextureLight

 /// <summary>
 ///		Normal constructor. Should not be called directly, but rather the SceneManager.CreateLight method should be used.
 /// </summary>
 /// <param name="name"></param>
 public TextureLight(string name, BspSceneManager creator)
     : base(name)
 {
     this.creator = creator;
     isTextureLight = true;
     diffuse = ColorEx.White;
     textureColor = ColorEx.White;
     intensity = LightIntensity.Normal;
     priority = 100;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:14,代码来源:TextureLight.cs

示例11: AddDirectionalLightCommand

 public AddDirectionalLightCommand(WorldEditor worldEditor, IWorldContainer parentObject, String objectName, string meshName, ColorEx specular, ColorEx diffuse)
 {
     this.app = worldEditor;
     this.parent =  (Boundary) parentObject;
     this.name = objectName;
     this.meshName = meshName;
     this.specular = specular;
     this.diffuse = diffuse;
     this.scene = app.Scene;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:10,代码来源:AddDirectionalLightCommand.cs

示例12: PointLight

 public PointLight(WorldEditor worldEditor, IWorldContainer parent, SceneManager scene, string name, ColorEx specular, ColorEx diffuse, Vector3 position)
 {
     this.app = worldEditor;
     this.parent = parent;
     this.scene = scene;
     this.name = name;
     this.position = position;
     this.specular = specular;
     this.diffuse = diffuse;
     this.terrainOffset = app.Config.DefaultPointLightHeight;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:11,代码来源:PointLight.cs

示例13: NewTrail

        public static Trail NewTrail(MovingObject pObjectToFollow, Single pMaxWidth, ColorEx pColor)
        {
            if (freeTrails.Count == 0)
            {
                return new Trail(pObjectToFollow, pMaxWidth, pColor);
            }

            var trail = freeTrails.Dequeue();
            trail.Relaunch(pObjectToFollow, pMaxWidth, pColor);
            return trail;
        }
开发者ID:jonathandlo,项目名称:Evolution_War,代码行数:11,代码来源:RecycleFactory.cs

示例14: AddPointLightCommand

 public AddPointLightCommand(WorldEditor worldEditor, IWorldContainer parentObject, String objectName, string meshName, ColorEx specular, ColorEx diffuse)
 {
     this.app = worldEditor;
     this.parent = parentObject;
     this.name = objectName;
     this.meshName = meshName;
     this.specular = specular;
     this.diffuse = diffuse;
     this.scene = app.Scene;
     placing = true;
 }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:11,代码来源:AddPointLightCommand.cs

示例15: TextArea

        /// <summary>
        ///    Basic constructor, internal since it should only be created by factories.
        /// </summary>
        /// <param name="name"></param>
        internal TextArea(string name)
            : base(name)
        {
            isTransparent = false;
            alignment = HorizontalAlignment.Left;

            colorTop = ColorEx.White;
            colorBottom = ColorEx.White;
            haveColorsChanged = true;

            charHeight = 0.02f;
            pixelCharHeight = 12;
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:17,代码来源:TextArea.cs


注:本文中的Axiom.Core.ColorEx类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。