本文整理汇总了C#中Cube.AddEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Cube.AddEffect方法的具体用法?C# Cube.AddEffect怎么用?C# Cube.AddEffect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cube
的用法示例。
在下文中一共展示了Cube.AddEffect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FormSceneSample
/// <summary>
/// Initializes a new instance of the <see cref="FormSceneSample"/> class.
/// </summary>
public FormSceneSample()
{
InitializeComponent();
sceneControl1.MouseDown += new MouseEventHandler(FormSceneSample_MouseDown);
sceneControl1.MouseMove += new MouseEventHandler(FormSceneSample_MouseMove);
sceneControl1.MouseUp += new MouseEventHandler(sceneControl1_MouseUp);
// Add some design-time primitives.
sceneControl1.Scene.SceneContainer.AddChild(new
UnU.OpenGL.SceneGraph.Primitives.Grid());
sceneControl1.Scene.SceneContainer.AddChild(new
UnU.OpenGL.SceneGraph.Primitives.Axies());
// Create a light.
Light light = new Light()
{
On = true,
Position = new Vertex(3, 10, 3),
GLCode = OpenGL.GL_LIGHT0
};
// Add the light.
sceneControl1.Scene.SceneContainer.AddChild(light);
// Create a sphere.
Cube cube = new Cube();
cube.AddEffect(arcBallEffect);
// Add it.
sceneControl1.Scene.SceneContainer.AddChild(cube);
// Add the root element to the tree.
AddElementToTree(sceneControl1.Scene.SceneContainer, treeView1.Nodes);
}