コード例 #1
0
    public static void DrawBounds(Transform transform)
    {
        Bounds     bounds     = transform.GetBounds(true, false, true);
        Vector3    lossyScale = transform.get_lossyScale();
        Quaternion rotation   = transform.get_rotation();
        Vector3    pos        = Vector3.op_Addition(transform.get_position(), Quaternion.op_Multiply(rotation, Vector3.Scale(lossyScale, ((Bounds) ref bounds).get_center())));
        Vector3    size       = Vector3.Scale(lossyScale, ((Bounds) ref bounds).get_size());

        GizmosUtil.DrawCube(pos, size, rotation);
        GizmosUtil.DrawWireCube(pos, size, rotation);
    }
コード例 #2
0
    public static void DrawBounds(Transform transform)
    {
        Bounds     bounds     = transform.GetBounds(true, false, true);
        Vector3    vector3    = transform.lossyScale;
        Quaternion quaternion = transform.rotation;
        Vector3    vector31   = transform.position + (quaternion * Vector3.Scale(vector3, bounds.center));
        Vector3    vector32   = Vector3.Scale(vector3, bounds.size);

        GizmosUtil.DrawCube(vector31, vector32, quaternion);
        GizmosUtil.DrawWireCube(vector31, vector32, quaternion);
    }
コード例 #3
0
    private void DrawGizmos()
    {
        Vector3    vector3    = base.transform.lossyScale;
        Quaternion quaternion = base.transform.rotation;
        Vector3    vector31   = base.transform.position + (quaternion * Vector3.Scale(vector3, this.Center));
        Vector3    vector32   = Vector3.Scale(vector3, this.Size);

        Gizmos.color = new Color(0.5f, 0.5f, 0.5f, 0.5f);
        GizmosUtil.DrawCube(vector31, vector32, quaternion);
        GizmosUtil.DrawWireCube(vector31, vector32, quaternion);
    }
コード例 #4
0
    private void DrawGizmos()
    {
        Vector3    lossyScale = ((Component)this).get_transform().get_lossyScale();
        Quaternion rotation   = ((Component)this).get_transform().get_rotation();
        Vector3    pos        = Vector3.op_Addition(((Component)this).get_transform().get_position(), Quaternion.op_Multiply(rotation, Vector3.Scale(lossyScale, this.Center)));
        Vector3    size       = Vector3.Scale(lossyScale, this.Size);

        Gizmos.set_color(new Color(0.5f, 0.5f, 0.5f, 0.5f));
        GizmosUtil.DrawCube(pos, size, rotation);
        GizmosUtil.DrawWireCube(pos, size, rotation);
    }
コード例 #5
0
 public override void DrawGizmos()
 {
     GizmosUtil.DrawCube(this.position, this.rotation, new Vector3(this.ColliderData.x_extents,
                                                                   this.ColliderData.y_extents,
                                                                   this.ColliderData.z_extents), Color.green, new Color());
 }