private static void DrawPointGizmos(htArcInfo i_object, GizmoType i_gizmoType) { if (i_object.Length <= 0.0f) { return; } Transform transform = i_object.transform; Vector3 pos = transform.position + Vector3.up * 0.01f; // 0.01fは地面と高さだと見づらいので調整用。 Quaternion rot = transform.rotation; Vector3 scale = Vector3.one * i_object.Length; // InnerAngle if (i_object.InnerAngle > 0.0f) { Gizmos.color = INNER_MESH_COLOR; Mesh fanMesh = CreateFanMesh(i_object.InnerAngle, TRIANGLE_COUNT); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(90.0f, Vector3.forward), scale); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(270.0f, Vector3.forward), scale); } if (i_object.InnerAngle > 0.0f) { Gizmos.color = INNER_MESH_COLOR; Mesh fanMesh = CreateFanMesh(i_object.InnerAngle, TRIANGLE_COUNT); Gizmos.DrawMesh(fanMesh, pos, rot, scale); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(180.0f, Vector3.forward), scale); } // OuterAngle if (i_object.OuterAngle > 0.0f) { Gizmos.color = OUTER_MESH_COLOR; Mesh fanMesh = CreateFanMesh(i_object.OuterAngle, TRIANGLE_COUNT); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(90.0f, Vector3.forward), scale); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(270.0f, Vector3.forward), scale); } if (i_object.OuterAngle > 0.0f) { Gizmos.color = OUTER_MESH_COLOR; Mesh fanMesh = CreateFanMesh(i_object.OuterAngle, TRIANGLE_COUNT); Gizmos.DrawMesh(fanMesh, pos, rot, scale); Gizmos.DrawMesh(fanMesh, pos, rot * Quaternion.AngleAxis(180.0f, Vector3.forward), scale); } }
// Use this for initialization void Start() { SpeakerPtr = htaSpeakerCreateName(path, testname); bool clear = Formatflag(SpeakerPtr); Debug.Log(clear); Play(SpeakerPtr); arcinfo = gameObject.AddComponent <htArcInfo>(); arcinfo.Length = 3; }