private SceneObject AddPrimitive(int meshType, string name) { SceneObject primitive = SceneObject.CreatePrimitive(meshType, name); primitive.Parent = onyx3DControl.Scene.Root; return(primitive); }
// -------------------------------------------------------------------- public static void AddPrimitive(int meshType, string name, bool select = true) { SceneObject primitive = SceneObject.CreatePrimitive(meshType, name); primitive.Parent = SceneManagement.ActiveScene.Root; if (select) { Selection.ActiveObject = primitive; } }