using System;
using RealmForge.Rendering;
using AxAxiom.Core;
using RealmForge;
using RealmForge.Definitions.Infos;
using RealmForge.Physics;
using RealmForge.Scene;
using RealmForge.Definitions;
namespace RealmForge.SceneObjects{
/// <summary>
/// A region such as a desert, forest, or building which has its own attributes such as terrain type
/// fog, sky, and ambient light
/// </summary>
public class AxiomRealm : AxiomSceneNode, IRealm
{
#region Fields
private PhysicalRealmMode mode = PhysicalRealmMode.NonPhysical;
private IPhysicsManager physics = null;
#endregion
#region Constructors
public AxiomRealm(string id) : this(id, AxiomSceneManager.AxiomInstance) {
}
protected internal AxiomRealm(string id, Ax.SceneManager scene) : base(id, scene)
{
}
#endregion
#region Methods
protected override ITemplateReference CreateStateHolder()
{
return new RealmForge.Definitions.Infos.RealmInfo();
}
#endregion
#region Properties
protected string camera = "MainCamera";
/// <summary>
/// Gets or Sets the camera that is made the primary camera when this realm is activated
/// This is the unique ID of a camera that exists in this Realm
/// </summary>
public string Camera { get { return camera; } set{ camera = value; } }
public override IRealm Realm { get { return this; } }
public override IRegion Region{ get{ return null; } set { } }
public PhysicalRealmMode PhysicalMode
{
get { return mode; }
set{
mode = value;
//TODO: Change physics was already created and is different
}
}
public IPhysicsManager Physics
{
get { return physics; }
set
{
physics = value;
}
}
/// <summary>
/// Gets or Sets the ID
/// </summary>
public new string ID
{
get{ return node.Name; }
set{
RF.Realms.RekeyRealm(node.Name,value);
node.Name = value;
}
}
#endregion
}
}
|