示例#1
0
 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
 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();
     }
 }