{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-perspective-camera-screen-boundary#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary.md",
  "context": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:uwa-answer-perspective-camera-screen-boundary",
  "slug": "uwa-answer-perspective-camera-screen-boundary",
  "title": "倾斜视角的透视相机算3d空间里的物体对应屏幕边界",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "倾斜视角的透视相机算3d空间里的物体对应屏幕边界",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "4381a55d7a11af1e410e329c25fd8b78052cb9424fc01f879f2f69759bda40f5",
  "assets": [
    {
      "reference": "assets/6046fb16cfa35d5b536699df/01.png",
      "url": "/media/e7b39a854268b58d02dd.png",
      "mediaType": "image/png",
      "contentHash": "e7b39a854268b58d02ddef6ca7391db1d43b5d7847c6d0eda0e2300848b30415",
      "byteLength": 60610,
      "width": 867,
      "height": 357
    },
    {
      "reference": "assets/6046fb16cfa35d5b536699df/02.png",
      "url": "/media/1c4b51016e8ede17c393.png",
      "mediaType": "image/png",
      "contentHash": "1c4b51016e8ede17c393d82b9c34acf6faf457f36c89e9bafb4532484d815078",
      "byteLength": 89638,
      "width": 601,
      "height": 612
    },
    {
      "reference": "assets/6046fb16cfa35d5b536699df/03.png",
      "url": "/media/f4f56dbaba680f739424.png",
      "mediaType": "image/png",
      "contentHash": "f4f56dbaba680f73942489e2772dd167894a07e8d3e6df88e648acbdc9ea9966",
      "byteLength": 9202,
      "width": 524,
      "height": 373
    },
    {
      "reference": "assets/6046fb16cfa35d5b536699df/04.png",
      "url": "/media/7554eadb17a2ea823369.png",
      "mediaType": "image/png",
      "contentHash": "7554eadb17a2ea82336999d904cb102dbe6a2b61c6c54aee36d41babe1c26f6d",
      "byteLength": 8234,
      "width": 533,
      "height": 322
    },
    {
      "reference": "assets/6046fb16cfa35d5b536699df/05.png",
      "url": "/media/ec0fa28435a7bcbd312d.png",
      "mediaType": "image/png",
      "contentHash": "ec0fa28435a7bcbd312d9f560050d9b6f89c52f246d7792a2851342e53265a53",
      "byteLength": 19266,
      "width": 838,
      "height": 505
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "倾斜视角的透视相机算3d空间里的物体对应屏幕边界",
      "anchor": "倾斜视角的透视相机算3d空间里的物体对应屏幕边界",
      "citation": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/#%E5%80%BE%E6%96%9C%E8%A7%86%E8%A7%92%E7%9A%84%E9%80%8F%E8%A7%86%E7%9B%B8%E6%9C%BA%E7%AE%973d%E7%A9%BA%E9%97%B4%E9%87%8C%E7%9A%84%E7%89%A9%E4%BD%93%E5%AF%B9%E5%BA%94%E5%B1%8F%E5%B9%95%E8%BE%B9%E7%95%8C"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/#%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94"
    },
    {
      "depth": 2,
      "text": "来源与关系",
      "anchor": "来源与关系",
      "citation": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "claims": [],
  "outgoing": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "上位集合：我的 UWA 问答",
      "citation": "https://www.pystone.net/notes/uwa-answer-perspective-camera-screen-boundary/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "incoming": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "2021-03-09：倾斜视角的透视相机算3d空间里的物体对应屏幕边界（终端平台）",
      "citation": "https://www.pystone.net/notes/my-uwa-answers/#2021"
    },
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "我的UWA问答中的“2021-03-09 - 倾斜视角的透视相机算3d空间里的物体对应屏幕边界”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# 倾斜视角的透视相机算3d空间里的物体对应屏幕边界\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n![test.png](assets/6046fb16cfa35d5b536699df/01.png)\n\n3d空间信息如上图，已知camera坐标，rotation，fov，一堆格子点组成的平面的信息。在xz平面移动物体做屏幕内平移操作时该如何确定移动的边界点和相机移动的关系\n\n- 提问者：Katrol\n- 提问时间：2021-03-09 20:35:34\n\n## 我的回答\n\n条件还不太明白，什么叫\"移动的边界点和相机移动的关系\"呢，意思是Camera的位置也是不断在变化的，要保证物体始终限制在屏幕能看到的位置吗？ 是要求物体只要有一部分在屏幕内就可以，还是要整个都在屏幕中？\n\n###\n\n有一点思路看是否可行：\n\n视锥体与平面相交得到一个四边形 A ，如图（特殊角度下是一个梯形）：\n\n![1.png](assets/6046fb16cfa35d5b536699df/02.png)\n\n![2.png](assets/6046fb16cfa35d5b536699df/03.png)\n\n平面内的物体为长方形 B， 图中为蓝色。\n\n那么本质问题就是——限制长方形B与四边形（梯形）A 必须有交集。\n\n![3.png](assets/6046fb16cfa35d5b536699df/04.png)\n\n其位置范围如图所示：\n\n![4.png](assets/6046fb16cfa35d5b536699df/05.png)\n\n只要实时计算出视锥体与平面相交得到的四边形，就可以确定物体的位置范围。\n\n- 回答时间：2021-03-09 21:17:58\n- 最后更新：2021-03-10 00:47:13\n- 采纳状态：未采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：终端平台\n- 原始问题：[倾斜视角的透视相机算3d空间里的物体对应屏幕边界](https://answer.uwa4d.com/question/6046fb16cfa35d5b536699df)\n- 源页最后更新：2021-03-09 21:17:58\n"
}
