public Core(Vector3 pos, float m, Vector3 vel, RootNode r) { mass = m; root = r; velocity = vel; position = pos; sphere = new SphereNode(0.05f, 10); tNode = new TranslationNode(position); root.AddChild(tNode); tNode.AddChild(sphere); point = new List <RenderVertex> { new RenderVertex(position, position.Normalized(), Color4.Aquamarine) }; }
public override void SetupScenegraph() { GetRoot().LightPosition = new Vector3(1, 1, 1); GetRoot().Animated = true; // Sphere geometry TranslationNode sphereTranslation = new TranslationNode(new Vector3(1, -0.5f, 0)); INode sphereNode = new SphereNode(0.5f, 20); sphereTranslation.AddChild(sphereNode); GetRoot().AddChild(sphereTranslation); // Cube geometry TranslationNode cubeTranslation = new TranslationNode(new Vector3(-1, 0.5f, 0)); INode cubeNode = new CubeNode(0.5f); cubeTranslation.AddChild(cubeNode); GetRoot().AddChild(cubeTranslation); }