public MRMPrim(IObject obj, MRMPrimFactory factory) { _factory = factory; _id = obj.GlobalID; _factory.RegisterPrim(this); SetUpExistingObj(obj, factory); }
public MRMPrim(MRMPrimFactory factory, string name, Vector3 position, Color colour = default(Color), Vector3 scale = default(Vector3), PrimType shape = PrimType.Unknown, Quaternion rotation = default(Quaternion)) { _exists = true; _editable = true; _factory = factory; _name = name; _obj = factory.RegisterPrim(this, name, position); _id = _obj.GlobalID; _child = !ID.Equals(_obj.Root.GlobalID); Glow = 0d; Name = _name; Colour = !colour.Equals(default(Color)) ? colour : Color.White; Shape = !shape.Equals(PrimType.Unknown) ? shape : PrimType.Box; Rotation = !rotation.Equals(default(Quaternion)) ? rotation : Quaternion.Identity; Scale = !scale.Equals(default(Vector3)) ? scale : new Vector3(.5f, .5f, .5f); _updateListener = Update; factory.Update += _updateListener; }
public MRMPrim(UUID id, MRMPrimFactory factory) { _factory = factory; _id = id; SetUpExistingObj(_factory.RegisterPrim(this, id), factory); }