mbcp/ja/api/mp_math/segment.html

38 lines
43 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="ja-JP" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>mbcp.mp_math.segment | MBCP ドキュメント</title>
<meta name="description" content="MBCP ライブラリ ドキュメント">
<meta name="generator" content="VitePress v1.3.4">
<link rel="preload stylesheet" href="/assets/style.UiSpMRXd.css" as="style">
<script type="module" src="/assets/app.CHPdwxJh.js"></script>
<link rel="modulepreload" href="/assets/chunks/theme.B1OYTEE9.js">
<link rel="modulepreload" href="/assets/chunks/framework.DpC1ZpOZ.js">
<link rel="modulepreload" href="/assets/ja_api_mp_math_segment.md.BnrDCNWp.lean.js">
<link rel="icon" type="image/svg+xml" href="/mbcp-logo.svg">
<link rel="stylesheet" href="https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-22f859ac><!--[--><!--]--><!--[--><span tabindex="-1" data-v-3e86afbf></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-3e86afbf> Skip to content </a><!--]--><!----><header class="VPNav" data-v-22f859ac data-v-2a4e514e><div class="VPNavBar has-sidebar top" data-v-2a4e514e data-v-1303e283><div class="wrapper" data-v-1303e283><div class="container" data-v-1303e283><div class="title" data-v-1303e283><div class="VPNavBarTitle has-sidebar" data-v-1303e283 data-v-10b95b50><a class="title" href="/ja/" data-v-10b95b50><!--[--><!--]--><!--[--><img class="VPImage logo" src="/mbcp-logo.svg" alt data-v-f925500d><!--]--><span data-v-10b95b50>MBCP ドキュメント</span><!--[--><!--]--></a></div></div><div class="content" data-v-1303e283><div class="content-body" data-v-1303e283><!--[--><!--]--><div class="VPNavBarSearch search" data-v-1303e283><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="検索を開く"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">検索</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-1303e283 data-v-0fb289c1><span id="main-nav-aria-label" class="visually-hidden" data-v-0fb289c1> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ja/guide/" tabindex="0" data-v-0fb289c1 data-v-ad4a8b64><!--[--><span data-v-ad4a8b64>スタート</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ja/refer.html" tabindex="0" data-v-0fb289c1 data-v-ad4a8b64><!--[--><span data-v-ad4a8b64>リファレンス</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ja/api/" tabindex="0" data-v-0fb289c1 data-v-ad4a8b64><!--[--><span data-v-ad4a8b64>APIリファレンス</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ja/demo/" tabindex="0" data-v-0fb289c1 data-v-ad4a8b64><!--[--><span data-v-ad4a8b64>インスタンス</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-1303e283 data-v-cd7b67e8 data-v-ec8c49bc><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-ec8c49bc><span class="text" data-v-ec8c49bc><span class="vpi-languages option-icon" data-v-ec8c49bc></span><!----><span class="vpi-chevron-down text-icon" data-v-ec8c49bc></span></span></button><div class="menu" data-v-ec8c49bc><div class="VPMenu" data-v-ec8c49bc data-v-9990563e><!----><!--[--><!--[--><div class="items" data-v-cd7b67e8><p class="title" data-v-cd7b67e8>日本語</p><!--[--><div class="VPMenuLink" data-v-cd7b67e8 data-v-79776a7a><a class="VPLink link" href="/api/mp_math/segment.html" data-v-79776a7a><!--[-->简体中文<!--]--></a></div><div class="VPMenuLink" data-v-cd7b67e8 data-v-79776a7a><a class="VPLink link" href="/en/api/mp_math/segment.html" data-v-79776a7a><!--[-->English<!--]--></a></div><div class="VPMenuLink" data-v-cd7b67e8 data-v-79776a7a><a class="VPLink link" href="/zht/api/mp_math/segment.html" data-v-79776a7a><!--[-->繁體中文<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-1303e283 data-v-2a6692f8><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-2a6692f8 data-v-3a50aa5c data-v-d82e607b><span class="check" data-v-d82e607b><span class="icon" data-v-d82e607b><!--[--><span class="vpi-sun sun" data-v-3a50aa5c></span><span class="vpi-moon moon" data-v-3a50aa5c></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-1303e283 data-v-f3b91b3a data-v-fa18fe49><!--[--><a class="VPSocialLink no-icon" href="https://github.com/
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 三维空间中的线段。</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> :param p1:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> :param p2:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;方向向量&#39;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;长度&#39;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.length</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;中心点&#39;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.midpoint </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3((</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details></div></div></main><footer class="VPDocFooter" data-v-40342069 data-v-a4b38bd6><!--[--><!--]--><div class="edit-info" data-v-a4b38bd6><div class="edit-link" data-v-a4b38bd6><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/snowykami/mbcp/tree/main/mbcp//mp_math/segment.py" target="_blank" rel="noreferrer" data-v-a4b38bd6><!--[--><span class="vpi-square-pen edit-link-icon" data-v-a4b38bd6></span> このページをGitHubで編集する<!--]--></a></div><div class="last-updated" data-v-a4b38bd6><p class="VPLastUpdated" data-v-a4b38bd6 data-v-5cebc0fc>Last updated: <time datetime="2024-08-29T07:07:35.000Z" data-v-5cebc0fc></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-a4b38bd6><span class="visually-hidden" id="doc-footer-aria-label" data-v-a4b38bd6>Pager</span><div class="pager" data-v-a4b38bd6><a class="VPLink link pager-link prev" href="/ja/api/mp_math/point.html" data-v-a4b38bd6><!--[--><span class="desc" data-v-a4b38bd6>前のページ</span><span class="title" data-v-a4b38bd6>mbcp.mp_math.point</span><!--]--></a></div><div class="pager" data-v-a4b38bd6><a class="VPLink link pager-link next" href="/ja/api/mp_math/utils.html" data-v-a4b38bd6><!--[--><span class="desc" data-v-a4b38bd6>次のページ</span><span class="title" data-v-a4b38bd6>mbcp.mp_math.utils</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-22f859ac data-v-e3ca6860><div class="container" data-v-e3ca6860><p class="message" data-v-e3ca6860><a href="https://vitepress.dev/">VitePress</a> で構築されたドキュメント | <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a> によって生成されたAPIリファレンス</p><p class="copyright" data-v-e3ca6860>Copyright (C) 2020-2024 SnowyKami. All Rights Reserved</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_api.md\":\"DrpzHy2M\",\"api_index.md\":\"Q9oDvH_6\",\"api_mp_math_angle.md\":\"BC8mLT9V\",\"api_mp_math_const.md\":\"CzjBJIjC\",\"api_mp_math_equation.md\":\"DEwnqiM5\",\"api_mp_math_function.md\":\"BOcZ-k7E\",\"api_mp_math_index.md\":\"CgPZqWk2\",\"api_mp_math_line.md\":\"B9prk9Kj\",\"api_mp_math_mp_math.md\":\"BMEFqLKu\",\"api_mp_math_mp_math_typing.md\":\"CKmrvjJE\",\"api_mp_math_plane.md\":\"CUvZ7jG1\",\"api_mp_math_point.md\":\"BWtm0p2C\",\"api_mp_math_segment.md\":\"Ce2Drjt_\",\"api_mp_math_utils.md\":\"BLAIQYJV\",\"api_mp_math_vector.md\":\"BCYHQW5q\",\"api_particle_index.md\":\"DpbhbZuY\",\"api_particle_particle.md\":\"Bpw0MV0e\",\"api_presets_index.md\":\"CrTHQDyB\",\"api_presets_model_index.md\":\"DYX4VzQJ\",\"api_presets_model_model.md\":\"DNXALr2n\",\"api_presets_presets.md\":\"D3vtk8sc\",\"demo_index.md\":\"CVAdlaFI\",\"en_api_api.md\":\"CH3w1csg\",\"en_api_index.md\":\"CcTWWu9r\",\"en_api_mp_math_angle.md\":\"yv5orygX\",\"en_api_mp_math_const.md\":\"CwN5-LSI\",\"en_api_mp_math_equation.md\":\"DwwuRd9E\",\"en_api_mp_math_function.md\":\"n3_MFy8m\",\"en_api_mp_math_index.md\":\"ChUIwSIA\",\"en_api_mp_math_line.md\":\"CsLkFBW5\",\"en_api_mp_math_mp_math.md\":\"DJS2qf3J\",\"en_api_mp_math_mp_math_typing.md\":\"BR4PPCj-\",\"en_api_mp_math_plane.md\":\"DjH7GwuZ\",\"en_api_mp_math_point.md\":\"BWVvxLrx\",\"en_api_mp_math_segment.md\":\"BE8bo5x9\",\"en_api_mp_math_utils.md\":\"BTOp0Uzp\",\"en_api_mp_math_vector.md\":\"BND_-HDs\",\"en_api_particle_index.md\":\"_wUK3v42\",\"en_api_particle_particle.md\":\"C-miN5aa\",\"en_api_presets_index.md\":\"93s9NTDq\",\"en_api_presets_model_index.md\":\"Dcjf9yDt\",\"en_api_presets_model_model.md\":\"NeRZCRe5\",\"en_api_presets_presets.md\":\"D2NLt3Ov\",\"en_guide_index.md\":\"C3kI8f8A\",\"en_index.md\":\"D5CddOW-\",\"en_refer_index.md\":\"Cq6GWi0V\",\"guide_index.md\":\"BVhQ0kPy\",\"index.md\":\"DJWBRkUz\",\"ja_api_api.md\":\"CUi97znf\",\"ja_api_index.md\":\"Bq-UqhKm\",\"ja_api_mp_math_angle.md\":\"COKT-3q5\",\"ja_api_mp_math_const.md\":\"B4Hx0PDl\",\"ja_api_mp_math_equation.md\":\"ByVCwmo8\",\"ja_api_mp_math_function.md\":\"DOkBmQkF\",\"ja_api_mp_math_index.md\":\"8LkEwDIJ\",\"ja_api_mp_math_line.md\":\"qbPLxepH\",\"ja_api_mp_math_mp_math.md\":\"DK0nb8oY\",\"ja_api_mp_math_mp_math_typing.md\":\"CWgc3ohG\",\"ja_api_mp_math_plane.md\":\"BJFpJM2I\",\"ja_api_mp_math_point.md\":\"0YsozwPt\",\"ja_api_mp_math_segment.md\":\"BnrDCNWp\",\"ja_api_mp_math_utils.md\":\"ClIgAy7y\",\"ja_api_mp_math_vector.md\":\"B4iis1R2\",\"ja_api_particle_index.md\":\"CF-T1DaN\",\"ja_api_particle_particle.md\":\"CViXNyfB\",\"ja_api_presets_index.md\":\"B7ygl08S\",\"ja_api_presets_model_index.md\":\"DQliiN_s\",\"ja_api_presets_model_model.md\":\"Do2QSwoB\",\"ja_api_presets_presets.md\":\"C1NN1QPM\",\"ja_guide_index.md\":\"w1Tf2Adm\",\"ja_index.md\":\"DnsqZi7i\",\"ja_refer_index.md\":\"DamUscs8\",\"refer_function_curry.md\":\"D_oqRDd3\",\"refer_function_function.md\":\"Bi_82lIJ\",\"refer_index.md\":\"yFZW0kI4\",\"zht_api_api.md\":\"C2hNRcuq\",\"zht_api_index.md\":\"BzaFnMgS\",\"zht_api_mp_math_angle.md\":\"_YgAKKZ8\",\"zht_api_mp_math_const.md\":\"Bg9yfrey\",\"zht_api_mp_math_equation.md\":\"Dl4VlL2q\",\"zht_api_mp_math_function.md\":\"DCZGszhC\",\"zht_api_mp_math_index.md\":\"DKOGJ-3J\",\"zht_api_mp_math_line.md\":\"Ba-cpukS\",\"zht_api_mp_math_mp_math.md\":\"D_TBbvzi\",\"zht_api_mp_math_mp_math_typing.md\":\"BJ_jDclm\",\"zht_api_mp_math_plane.md\":\"BvA7i9gf\",\"zht_api_mp_math_point.md\":\"D8L5j_3H\",\"zht_api_mp_math_segment.md\":\"BA1zEcot\",\"zht_api_mp_math_utils.md\":\"BxPb0JBp\",\"zht_api_mp_math_vector.md\":\"EOHN-8Si\",\"zht_api_particle_index.md\":\"Jrca0iMX\",\"zht_api_particle_particle.md\":\"BREKhh73\",\"zht_api_presets_index.md\":\"whJMVguT\",\"zht_api_presets_model_index.md\":\"DqPIkHvh\",\"zht_api_presets_model_model.md\":\"x1HKRue1\",\"zht_api_presets_presets.md\":\"BHPziOmZ\",\"zht_guide_index.md\":\"BNnMViC8\",\"zht_index.md\":\"CUR8-QXm\",\"zht_refer_index.md\":\"B7CQS2UW\"}");function deserializeFunctions(r){return Array.isArray(r)
</body>
</html>