コード例 #1
0
ファイル: 3DUtils.cs プロジェクト: pranaykamat/rs-unity
 public void SetLookAtPoint(Vector3D position, Vector3D target, Vector3D up)
 {
     Vector3D direction = target.clone().Sub(position);
     if (direction != null && up != null && direction.IsNotColinear(up))
     {
         this.location = position;
         this.target = target;
         direction.Normalize();
         up.Normalize();
         this.direction = direction.clone();
         this.up = up.clone();
         CalcRU();
         DeriveMatrix();
     }
 }
コード例 #2
0
ファイル: 3DUtils.cs プロジェクト: pranaykamat/rs-unity
 public void SetLookAt(Vector3D position, Vector3D direction, Vector3D up)
 {
     location = position;
     if (direction != null && up != null && direction.IsNotColinear(up))
     {
         direction.Normalize();
         up.Normalize();
         this.direction = direction.clone();
         this.up = up.clone();
         CalcRU();
         DeriveMatrix();
     }
 }