本文整理汇总了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;
}
示例2: Element
public Element( Vector3 position, float width, float texCoord, ColorEx color )
{
this.position = position;
this.width = width;
this.texCoord = texCoord;
this.color = color;
}
示例3: Element
public Element( Vector3 position, float width, float texCoord, ColorEx color )
{
Position = position;
Width = width;
TexCoord = texCoord;
Color = color;
}
示例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;
}
示例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;
}
示例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");
}
示例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);
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}