Example #1
0
        public Instance(string pId, BAuth pAuth, Displayable pDisplayable)
            : base(pId, pAuth)
        {
            _displayable = pDisplayable;
            _type        = InstanceType.UNKNOWN;

            DefineProperties(new List <PropertyDefnBase>()
            {
                new PropertyDefn <InstanceType>("_InstanceType")
                {
                    getter = () => { return(_type); }
                },
                new PropertyDefn <BItemState>("_DisplayableState")
                {
                    getter = () => { return(_displayable.State); }
                },
                new PropertyDefn <OMV.Vector3>("_Position")
                {
                    getter = () => { return(GPos); }
                },
                new PropertyDefn <OMV.Quaternion>("_Rotation")
                {
                    getter = () => { return(GRot); }
                },
            });
        }
Example #2
0
        public InstanceMeshSet(string pId, BAuth pAuth, Displayable pDisplayable)
            : base(pId, pAuth, pDisplayable)
        {
            _type = InstanceType.meshset;

            DefineProperties(new List <PropertyDefnBase>()
            {
                new PropertyDefn <OMV.Vector3>("_Position")
                {
                    getter = () => { return(GPos); },
                    setter = (val) => { GPos = val;
                                        // TODO: Update position in the displayed version
                    }
                },
                new PropertyDefn <OMV.Quaternion>("_Rotation")
                {
                    getter = () => { return(GRot); },
                    setter = (val) => { GRot = val;
                                        // TODO: Update rotation in the displayed version
                    }
                },
                new PropertyDefn <CoordSystem>("_PosCoordSystem")
                {
                    getter = () => { return(GPosCoordSystem); },
                    setter = (val) => { GPosCoordSystem = val;
                                        // TODO: Update coordSystem in the displayed version
                    }
                },
                new PropertyDefn <RotationSystem>("_RotCoordSystem")
                {
                    getter = () => { return(GRotCoordSystem); },
                    setter = (val) => { GRotCoordSystem = val;
                                        // TODO: Update coordSystem in the displayed version
                    }
                },
            });

            SetReady();
        }