Class Skeleton2D
骨格の2D表示
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Skeleton2D
Namespace: TofAr.V0.Tof
Assembly: TofArTofAssembly.dll
Syntax
public class Skeleton2D : MonoBehaviour
Fields
context
同期処理用のContext
Declaration
protected SynchronizationContext context
Field Value
Type |
---|
System.Threading.SynchronizationContext |
depthViewRectTransform
重ねて表示するDepthViewRawImage
Declaration
protected RectTransform depthViewRectTransform
Field Value
Type |
---|
UnityEngine.RectTransform |
parent
Hierarchy上の親オブジェクト
Declaration
protected RectTransform parent
Field Value
Type |
---|
UnityEngine.RectTransform |
settings
現在使用しているカメラの設定
Declaration
protected CalibrationSettingsProperty settings
Field Value
Type |
---|
CalibrationSettingsProperty |
show
骨格表示のオンオフ
Declaration
protected bool show
Field Value
Type |
---|
System.Boolean |
skeletonObjects
表示に使用しているオブジェクトのリスト
Declaration
protected List<Skeleton2D.SkeletonObject> skeletonObjects
Field Value
Type |
---|
System.Collections.Generic.List<Skeleton2D.SkeletonObject> |
sort
Zの値を参考に並び順をソートしたオブジェクト群
Declaration
protected IOrderedEnumerable<Skeleton2D.SkeletonObject> sort
Field Value
Type |
---|
System.Linq.IOrderedEnumerable<Skeleton2D.SkeletonObject> |
Properties
parentName
Hierarchy上の親オブジェクトの名前
Declaration
protected virtual string parentName { get; }
Property Value
Type |
---|
System.String |
Show
骨格表示のオンオフ
Declaration
public bool Show { get; set; }
Property Value
Type |
---|
System.Boolean |
skeletonType
表示する骨格の種類
Declaration
protected virtual SkeletonType skeletonType { get; }
Property Value
Type |
---|
SkeletonType |
SkeletonType
骨格の種類
Declaration
public SkeletonType SkeletonType { get; }
Property Value
Type |
---|
SkeletonType |
Methods
AddEvent()
デリゲートを追加
Declaration
protected virtual void AddEvent()
CalcAnchoredPosition(Vector3)
Canvas上の位置を算出
Declaration
protected Vector2 CalcAnchoredPosition(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | point | 3D骨格座標 |
Returns
Type | Description |
---|---|
UnityEngine.Vector2 | Canvas上の位置 |
CalcSize(Vector3)
オブジェクトの最適なサイズを算出
Declaration
protected int CalcSize(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | point | 3D骨格座標 |
Returns
Type | Description |
---|---|
System.Int32 | オブジェクトのサイズ |
CreateBone(RectTransform)
Boneオブジェクトを生成
Declaration
protected SkeletonBone2D CreateBone(RectTransform parent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.RectTransform | parent | 親オブジェクト |
Returns
Type | Description |
---|---|
SkeletonBone2D | Boneオブジェクト |
CreateJoint(RectTransform)
Jointオブジェクトを生成
Declaration
protected SkeletonJoint2D CreateJoint(RectTransform parent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.RectTransform | parent | 親オブジェクト |
Returns
Type | Description |
---|---|
SkeletonJoint2D | Jointオブジェクト |
HideSkeleton()
オブジェクトを非表示
Declaration
protected void HideSkeleton()
InitSkeleton()
骨格表示用のオブジェクトを生成・初期化
Declaration
protected virtual void InitSkeleton()
OnScreenOrientationUpdated(ScreenOrientation, ScreenOrientation)
端末回転時にコールバック
Declaration
protected virtual void OnScreenOrientationUpdated(ScreenOrientation previousScreenOrientation, ScreenOrientation newScreenOrientation)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.ScreenOrientation | previousScreenOrientation | 変更前のスクリーンの向き |
UnityEngine.ScreenOrientation | newScreenOrientation | 変更後のスクリーンの向き |
RemoveEvent()
デリゲートを削除
Declaration
protected virtual void RemoveEvent()
UpdateBone(SkeletonJoint2D, SkeletonJoint2D, SkeletonBone2D)
Boneオブジェクトを更新
Declaration
protected void UpdateBone(SkeletonJoint2D start, SkeletonJoint2D end, SkeletonBone2D bone)
Parameters
Type | Name | Description |
---|---|---|
SkeletonJoint2D | start | 始点のJointオブジェクト |
SkeletonJoint2D | end | 終点のJointオブジェクト |
SkeletonBone2D | bone | Boneオブジェクト |
UpdateSibling()
オブジェクトの並び順を変更
Declaration
protected void UpdateSibling()