Package com.ngt.jopenmetaverse.shared.types

Examples of com.ngt.jopenmetaverse.shared.types.Vector4


    return new Vector3(v.x, v.y, v.z);
  }

  public static Vector4 OMVVector4(org.lwjgl.util.vector.Vector4f v)
  {
    return new Vector4(v.x, v.y, v.z, v.w);
  }
View Full Code Here


        return vector;
    }

    public  Vector4 asVector4()
    {
        Vector4 vector = Vector4.Zero;

        if (this.count()== 4)
        {
            vector.X = (float)this.get(0).asReal();
            vector.Y = (float)this.get(1).asReal();
View Full Code Here

        search = false;
        switch (i)
        {
        case 76:
          // Collision normal for avatar
          objectupdate.CollisionPlane = new Vector4(block.ObjectData, pos);
          pos += 16;
         
          //Keep on decoding
          i = 60;
          search = true;
          break;
        case 60:
          // Position
          objectupdate.Position = new Vector3(block.ObjectData, pos);
          pos += 12;
          // Velocity
          objectupdate.Velocity = new Vector3(block.ObjectData, pos);
          pos += 12;
          // Acceleration
          objectupdate.Acceleration = new Vector3(block.ObjectData, pos);
          pos += 12;
          // Rotation (theta)
          objectupdate.Rotation = new Quaternion(block.ObjectData, pos, true);
          pos += 12;
          // Angular velocity (omega)
          objectupdate.AngularVelocity = new Vector3(block.ObjectData, pos);
          pos += 12;

          break;
        case 48:
          // Collision normal for avatar
          objectupdate.CollisionPlane = new Vector4(block.ObjectData, pos);
          pos += 16;
         
          //Keep on decoding
          i = 32;
          search = true;
View Full Code Here

        // Avatar boolean
        update.Avatar = (block.Data[pos++] != 0);
        // Collision normal for avatar
        if (update.Avatar)
        {
          update.CollisionPlane = new Vector4(block.Data, pos);
          pos += 16;
        }
        // Position
        update.Position = new Vector3(block.Data, pos);
        pos += 12;
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.types.Vector4

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.