Ejemplo n.º 1
0
        public static VObject NewVObject(Primitive pPrim, VObject pOldObj)
        {
            VObject returnVObject = null;

            if (pOldObj == null)
            {
                returnVObject = new VObject();
                returnVObject.Node = null;
            }
            else
            {
                returnVObject = pOldObj;
            }

            returnVObject.Prim = pPrim;
            returnVObject.Mesh = null;

            return returnVObject;
        }
Ejemplo n.º 2
0
        public static string GetHashId(VObject pObj)
        {
            string returnString = string.Empty;

            if (pObj.Prim != null)
            {
                ulong simhandle = pObj.Prim.RegionHandle;
                ulong TESTNEIGHBOR = 1099511628032256;
                if (simhandle == 0)
                        simhandle = TESTNEIGHBOR;

                returnString =simhandle.ToString() + pObj.Prim.LocalID.ToString();
            }

            return returnString;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Set Target to a VObject (for tracking)
        /// </summary>
        /// <param name="pTarget"></param>
        public void SetTarget(VObject pTarget)
        {
            if (pTarget == null)
                return;

            if (pTarget.Prim != null)
            {
                //Vector3D target = new Vector3D(pTarget.Prim.Position.X + pTarget.ParentPosition.X, pTarget.Prim.Position.Z + pTarget.ParentPosition.Z + Reference.Viewer.CameraOffsetY, pTarget.Prim.Position.Y + pTarget.ParentPosition.Y);
                //Vector3D target = pTarget.Node.Position + new Vector3D( pTarget.ParentPosition.X, pTarget.ParentPosition.Z + Reference.Viewer.CameraOffsetY, pTarget.ParentPosition.Y);
                Vector3D target = pTarget.Node.Position + new Vector3D(0, Reference.Viewer.CameraOffsetY, 0);

                // note: prim is in libomv coords, but settarget is in irr coords, so swap y and z
                SetTarget(target);
                VOtarget = pTarget;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// User's Camera
        /// </summary>
        /// <param name="psmgr">Scene Manager</param>
        public Camera(Viewer _viewer)
            : base(_viewer, -1)
        {
            //
            VOtarget = null;
            SNCamera = Reference.SceneManager.AddCameraSceneNode(Reference.SceneManager.RootSceneNode);
            SNCamera.Position = new Vector3D(0f, 235f, -44.70f);
            SNCamera.Target = new Vector3D(-273, -255.3f, 407.3f);
            SNCamera.FarValue = 12800;
            SNCamera.FOV = Reference.Viewer.CameraFOV;
            SNCamera.Name = "Camera";

            LookAtCam[0] = Vector3.Zero;
            LookAtCam[1] = Vector3.Zero;
            LookAtCam[2] = Vector3.Zero;

            nowDistance = Reference.Viewer.CameraDistance;

            UpdateCameraPosition();
        }
Ejemplo n.º 5
0
 public IrrMeshThread(Viewer viewer, VObject _obj, string _directory)
     : base(viewer, -1)
 {
     obj = _obj;
     workDirectory = _directory;
 }
Ejemplo n.º 6
0
 public void OnTextureComplete(string tex, string extension, VObject vObj, UUID AssetID)
 {
     TextureCompleteNotification tx = new TextureCompleteNotification();
     tx.texture = tex;
     tx.extension = extension;
     tx.vObj = vObj;
     tx.textureID = AssetID;
     entityManager.AddTexture(tx);
 }