Difference between revisions of "LlRot2Fwd/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{multi-lang}} {{LSL_Function/ja |func_id=18|func_sleep=0.0|func_energy=10.0 |func=llRot2Fwd|sort=Rot2Fwd |return_type=vector|p1_type=rotation|p1_name=q |func_footnote |func_desc |return_t...)
 
m
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{multi-lang}}
{{LSL_Function/ja
{{LSL_Function/ja
|func_id=18|func_sleep=0.0|func_energy=10.0
|func_id=18|func_sleep=0.0|func_energy=10.0
|func=llRot2Fwd|sort=Rot2Fwd
|func=llRot2Fwd|sort=Rot2Fwd
|return_type=vector|p1_type=rotation|p1_name=q
|return_type=vector|p1_type=rotation|p1_name=q
|func_footnote
|func_desc={{HoverText|ローカル X 軸|プリム前方}} の {{HoverLink|Viewer_coordinate_frames/ja#Global|グローバル位置システム|地球}} に対する方向を計算します。<br/>
|func_desc
|return_text='''q''' で定義される前方ベクトル、言い換えれば、ローカルの正の X 方向を指す単位ベクトル
|return_text=例えばローカルの正数X方向を指す単位ユニットのように、'''q'''によって定義される前方ベクトル
|func_footnote=プリムのローカル{{HoverText|正面|局所平面}}の方向を知るのに便利です。X 軸は常にこの正面に対して垂直ですので。
|spec
|spec=計算上同じ結果となります:
<source lang="lsl2">ret = llVecNorm(<1., 0., 0.> * q);</source>
'''q''' が単位ベクトルであるとわかっているなら、シンプルにできます:
<source lang="lsl2">ret = <1., 0., 0.> * q;</source>
|caveats
|caveats
|constants
|constants
|examples
|examples=
<source lang="lsl2">
// タッチした時に、X軸に沿って5メートル前方に進みます
default
{
    touch_start(integer total_number)
    {
        vector v = llRot2Fwd( llGetLocalRot() );
        llSetPos( llGetLocalPos() + v * 5 );
    }
}
</source>
|helpers
|helpers
|also_functions=*{{LSLG/ja|llRot2Left}}
|also_functions=
*{{LSLG/ja|llRot2Up}}
{{LSL DefineRow||{{LSLG/ja|llRot2Left}}}}
*{{LSLG/ja|llRot2Axis}}
{{LSL DefineRow||{{LSLG/ja|llRot2Up}}}}
*{{LSLG/ja|llRot2Angle}}
{{LSL DefineRow||{{LSLG/ja|llRot2Axis}}}}
{{LSL DefineRow||{{LSLG/ja|llRot2Angle}}}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes
|permission
|cat1=Rotation
|inventory
|negative_index
|cat1=Rotation/ja
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 14:49, 29 September 2020

要約

関数: vector llRot2Fwd( rotation q );

ローカル X 軸地球 に対する方向を計算します。

q で定義される前方ベクトル、言い換えれば、ローカルの正の X 方向を指す単位ベクトルを vector で返します。

• rotation q

プリムのローカル正面の方向を知るのに便利です。X 軸は常にこの正面に対して垂直ですので。

仕様

計算上同じ結果となります:

ret = llVecNorm(<1., 0., 0.> * q);

q が単位ベクトルであるとわかっているなら、シンプルにできます:

ret = <1., 0., 0.> * q;

サンプル

// タッチした時に、X軸に沿って5メートル前方に進みます
default
{
    touch_start(integer total_number)
    {
        vector v = llRot2Fwd( llGetLocalRot() );
        llSetPos( llGetLocalPos() + v * 5 );
    }
}

関連項目

関数

•  llRot2Left
•  llRot2Up
•  llRot2Axis
•  llRot2Angle

特記事項

Search JIRA for related Issues

Signature

function vector llRot2Fwd( rotation q );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。