コード例 #1
0
ファイル: ISphere.cs プロジェクト: kwstanths/MRend
    public void SetRadius(float radius)
    {
        /* Set sphere collider radius for ray casting */
        float          scaling  = transform.localScale.x;
        SphereCollider collider = GetComponent <SphereCollider>();

        if (collider != null)
        {
            collider.radius = radius / scaling;
        }

        /* Set material radius */
        material_block_.SetRadius(radius);
    }
コード例 #2
0
ファイル: ISphereBench.cs プロジェクト: kwstanths/MRend
    private void Start()
    {
        MaterialBlockSphere material_block_ = GetComponent <MaterialBlockSphere>();

        material_block_.SetRadius(AtomicRadii.ball_and_stick_radius);
    }