Package com.ngt.jopenmetaverse.shared.types

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


        return vector;
    }

    public  Vector3d asVector3d()
    {
        Vector3d vector = Vector3d.Zero;

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


                        {
                            if (block.TypeData.length == 56)
                            {
                                UUID sourceAvatar = new UUID(block.TypeData, 0);
                                UUID targetObject = new UUID(block.TypeData, 16);
                                Vector3d targetPos = new Vector3d(block.TypeData, 32);
                                onViewerEffect.raiseEvent(new ViewerEffectEventArgs(type, sourceAvatar, targetObject, targetPos, block.Duration, block.ID));
                            }
                            else
                            {
                                JLogger.warn("Received a " + type.toString() +
                                    " ViewerEffect with an incorrect TypeData size of " +
                                    block.TypeData.length + " bytes");
                            }
                        }
                        break;
                    case LookAt:
                        if (onViewerEffectLookAt != null)
                        {
                            if (block.TypeData.length == 57)
                            {
                                UUID sourceAvatar = new UUID(block.TypeData, 0);
                                UUID targetObject = new UUID(block.TypeData, 16);
                                Vector3d targetPos = new Vector3d(block.TypeData, 32);
                                LookAtType lookAt = LookAtType.get(block.TypeData[56]);

                                onViewerEffectLookAt.raiseEvent(new ViewerEffectLookAtEventArgs(sourceAvatar, targetObject, targetPos, lookAt,
                                    block.Duration, block.ID));
                            }
                            else
                            {
                                JLogger.warn("Received a LookAt ViewerEffect with an incorrect TypeData size of " +
                                    block.TypeData.length + " bytes");
                            }
                        }
                        break;
                    case PointAt:
                        if (onViewerEffectPointAt != null)
                        {
                            if (block.TypeData.length == 57)
                            {
                                UUID sourceAvatar = new UUID(block.TypeData, 0);
                                UUID targetObject = new UUID(block.TypeData, 16);
                                Vector3d targetPos = new Vector3d(block.TypeData, 32);
                                PointAtType pointAt = PointAtType.get(block.TypeData[56]);

                                onViewerEffectPointAt.raiseEvent(new ViewerEffectPointAtEventArgs(e.getSimulator(), sourceAvatar, targetObject, targetPos,
                                    pointAt, block.Duration, block.ID));
                            }
View Full Code Here

      globalX = xy[0];
      globalY = xy[1];
      //                      Utils.LongToUInts(Client.network.getCurrentSim().Handle, out globalX, out globalY);
      Vector3 pos = getSimPosition();

      return new Vector3d(
          (double)globalX + (double)pos.X,
          (double)globalY + (double)pos.Y,
          (double)pos.Z);
    }
    else
View Full Code Here

TOP

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

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.