PRIM ROTATION/ja

From Second Life Wiki
Jump to navigation Jump to search

解説

定数: integer PRIM_ROTATION = 8;

integer 定数 PRIM_ROTATION の値は 8 です。

PRIM_ROTATIONはプリムの回転の取得あるいは設定に用いられます。

llSetPrimitiveParams

[ PRIM_ROTATION, rotation rot ]
• rotation rot Any valid rotation

llSetPrimitiveParamsllSetLinkPrimitiveParamsが使用された時。

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_ROTATION ]);

rotation rot ]のlistを返します。

• rotation rot Any valid rotation

警告

  • texture がプリムの中で見つからない場合、かつこれが UUID でない場合、またはこれがtextureでない場合、エラーが DEBUG_CHANNEL 上で叫ばれます。
  • textureUUID である場合、オブジェクト自体に新たな アセット権限 が発生するようなことはありません。
    • アセットをプリムのインベントリの中に置いた場合、これまで発生していた使用制限は新しいオブジェクトで新たに作成されません。
  • If render_material is missing from the prim's inventory and it is not a UUID or it is not a material then an error is shouted on DEBUG_CHANNEL.
  • If render_material is a UUID then there are no new asset permissions consequences for the object.
    • The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.
  • ストレージ媒体として フローティングテキスト の機能が使えると思わないでください。これは不完全ですし、安全なものでもありません。
    • フローティングテキストはサーバの更新時に変更になったことが過去にあり、その際に既に設定されている内容は消去されていました。将来も変更が発生する可能性があります。
    • 「不可視」[2] のフローティングテキストもクライアントに送信されます。
      • 不可視にしているテキストを表示することのできるクライアントを持っている人が見れてしまう可能性があります。
      • テキストが含まれている通信パケットが盗聴され、テキストが読まれる可能性があります。
  • top_size とクライアントの値は異なります。範囲は一致しておらず、変換が必要です。シンプルな計算式は、結果 = 1.0 - value です。詳細は top_size Explained をご覧ください。
  • map がプリムの中で見つからない場合、かつこれが UUID でない場合、またはこれがtextureでない場合、エラーが DEBUG_CHANNEL 上で叫ばれます。
  • mapUUID である場合、オブジェクト自体に新たな アセット権限 が発生するようなことはありません。
    • アセットをプリムのインベントリの中に置いた場合、これまで発生していた使用制限は新しいオブジェクトで新たに作成されません。
  • PRIM_OMEGA/ja on nonphysical objects, and child prims of physical objects, is only a client side effect; the object or prim will collide as non-moving geometry.
  • PRIM_OMEGA/ja cannot be used on avatars sitting on the object. It will emit the error message "PRIM_OMEGA disallowed on agent".
  • If PRIM_OMEGA/ja does not appear to be working, make sure that that Develop > Network > Velocity Interpolate Objects is enabled on the viewer.
  • In the parameters returned by llGetPrimitiveParams([PRIM_OMEGA/ja]), the vector is normalized, and the spinrate is multiplied by the magnitude of the original vector.
  • If texture is missing from the prim's inventory and it is not a UUID or it is not a texture then an error is shouted on DEBUG_CHANNEL.
  • If texture is a UUID then there are no new asset permissions consequences for the object.
    • The resulting object develops no new usage restrictions that might have occurred if the asset had been placed in the prims inventory.
  • repeats is not only used to set the number of repeats but the sign of the individual components is also used to set the "Flip" attribute.
  • To clear the normal map parameters from the face (and possibly remove the material), set texture to NULL_KEY (the other parameters must be supplied in this case but will be ignored).
  • Note that whenever any face in a linkset contains a material (i.e. has a non-default PRIM_NORMAL, PRIM_SPECULAR, or PRIM_ALPHA_MODE), the linkset will use the new accounting system.
  • In the default texture mapping mode the texture repeats units are in texture repeats per face. In the planar texture mapping mode the texture repeats units are in texture repeats per half meter. This is in contrast to the in-world editing tool, in which the planar texture scaling units are repeats per meter.
  • texture がプリムの中で見つからない場合、かつこれが UUID でない場合、またはこれがtextureでない場合、エラーが DEBUG_CHANNEL 上で叫ばれます。
  • textureUUID である場合、オブジェクト自体に新たな アセット権限 が発生するようなことはありません。
    • アセットをプリムのインベントリの中に置いた場合、これまで発生していた使用制限は新しいオブジェクトで新たに作成されません。
  • repeats is not only used to set the number of repeats but the sign of the individual components is also used to set the "Flip" attribute.
  • To clear the specular map parameters from the face (and possibly remove the material), set texture to NULL_KEY (the other parameters must be supplied in this case but will be ignored).
  • Note that whenever any face in a linkset contains a material (i.e. has a non-default PRIM_NORMAL, PRIM_SPECULAR, or PRIM_ALPHA_MODE), the linkset will use the new accounting system.
  • In the default texture mapping mode the texture repeats units are in texture repeats per face. In the planar texture mapping mode the texture repeats units are in texture repeats per half meter. This is in contrast to the in-world editing tool, in which the planar texture scaling units are repeats per meter.
  • If PRIM_LINK_TARGET's link_target describes a seated avatar...
  • faceALL_SIDES であれば flag は全ての面に作用します。
  • face が存在しない面を指している場合、 flag はエラーを出さずに復帰します。

重要事項

~ JIRA で関連バグを検索する
   We need PRIM_ALPHA_MODE_DEFAULT to revert alpha to old "if the texture has an alpha mask, use alpha. If not, don't" behavior.

関連記事

関数

•  llGetPrimitiveParams
•  llSetPrimitiveParams
•  llSetLinkPrimitiveParams
•  llGetRot
•  llSetRot
•  llSetLocalRot
•  llGetLocalRot
•  llGetRootRotation
•  llGetObjectDetails -style="vertical-align:top;" •  llGetLinkNumber スクリプトが入っているプリムのリンク番号を取得します。

記事

•  各種制限 SL の制限と制約
•  LSL での色
•  透明度
•  LSL での色
•  透明度

注意事項

リンク番号

オブジェクトを構成するそれぞれのプリムにはアドレスがあります。それがリンク番号です。オブジェクトの特定のプリムにアクセスするには、そのプリムのリンク番号を知らなければなりません。リンク番号はプリムに振られますが、オブジェクトに座っているアバターにも振られます。

  • オブジェクトが単一のプリムで構成されていて、アバターが座っていないとき、(ルート)プリムのリンク番号は 0 です。
  • しかし、オブジェクトが複数のプリムで構成されていたり、オブジェクトに座っているアバターがいたりすると、ルートプリムのリンク番号は 1 となります。

アバターがオブジェクトに座ると、リンクセットの末尾に追加され、いちばん大きなリンク番号が振られることになります。さらに、アバターがオブジェクトに座っている場合、アバターを立たせないと、プリムのリンク・リンク解除ができません。

プリムやアバターの数え方

オブジェクトのプリムや、プリムに座っているアバターの数を調べるのに、2つの関数があります。

  • llGetNumberOfPrims() - プリムと座っているアバターの数を返します。
  • llGetObjectPrimCount(llGetKey()) - オブジェクトのプリムの数だけを返しますが、アタッチメントとなっている場合は 0 を返します。
integer GetPrimCount() { //常にプリムの数だけを返します。
    if(llGetAttached())//装着されているか?
        return llGetNumberOfPrims();//アバターとプリムの数を返しますが、アタッチメントの上には座れないのでこれでいいです。
    return llGetObjectPrimCount(llGetKey());//プリムの数だけを返しますが、アタッチメントの場合ここは通りません。
}

特記事項

PRIM_TYPE の top_size とクライアントのテーパー変換
範囲 尖る 尖らない 底が尖る
クライアント [-1, 1] 1.0 0.0 -1.0
PRIM_TYPE [0, 2] 0.0 1.0 2.0
LEGACY [0, 1] 0.0 1.0 なし
1.11 以前 [0, 1] 0.0 1.0 なし

top_size について解説

もともとの PRIM_TYPE のインターフェースが廃止されたとき (PRIM_TYPE_LEGACY, SL 1.5)、新しい PRIM_TYPE インターフェースはプリムの底を尖らせる機能がまだサポートされておらず、SL 1.11 (2年後) になってようやく導入されました。これが導入され新しい PRIM_TYPE が廃止されたときに、top_size の範囲が拡張されました。 それまでの間、クライアントの中で属性とその定義値が再定義されていました。この再定義と範囲の拡張により、異なる値で同じことをする2つのインターフェースが存在することになりました。それまでの間 PRIM_TYPE_LEGACY のインターフェースは更新されず、プリムの底を尖らせるのはサポートされないままでした。その結果、3つのインターフェースがそれぞれ異なる範囲をもつことになり、いじわるな警告をつけるはめになってしまいました。

全ての記事

~ JIRA で関連記事を検索
   CHANGED_TEXTURE is not triggered when texture is changed via script
   CHANGED_TEXTURE is not triggered when texture is changed via script
   We need PRIM_ALPHA_MODE_DEFAULT to revert alpha to old "if the texture has an alpha mask, use alpha. If not, don't" behavior.
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)