Package quicktime.vr

Source Code of quicktime.vr.QTVRHotSpotInfo

/*     */ package quicktime.vr;
/*     */
/*     */ import java.io.IOException;
/*     */ import java.io.ObjectInputStream;
/*     */ import java.io.ObjectOutputStream;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTRuntimeException;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.qd.QDPoint;
/*     */ import quicktime.qd.QDRect;
/*     */ import quicktime.util.EndianDescriptor;
/*     */ import quicktime.util.EndianFlipSpec;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class QTVRHotSpotInfo extends QTVRAtom
/*     */ {
/*  56 */   private static boolean apriori = QTSession.apriori();
/*     */   private static final int kNativeSize = 68;
/*     */   static final long serialVersionUID = -7062349173192562621L;
/*     */   private static EndianDescriptor ed;
/*     */
/*     */   public QTVRHotSpotInfo()
/*     */   {
/*  67 */     super(68);
/*     */   }
/*     */
/*     */   public QTVRHotSpotInfo(byte[] paramArrayOfByte)
/*     */     throws QTException
/*     */   {
/*  75 */     super(paramArrayOfByte, 68);
/*     */   }
/*     */
/*     */   protected int getNativeSize() {
/*  79 */     return 68;
/*     */   }
/*     */
/*     */   protected void readObject(ObjectInputStream paramObjectInputStream)
/*     */     throws IOException
/*     */   {
/*  85 */     this.bytes = new byte[68];
/*  86 */     QTVRHotSpotInfo localQTVRHotSpotInfo = new QTVRHotSpotInfo();
/*  87 */     paramObjectInputStream.read(localQTVRHotSpotInfo.getBytes());
/*  88 */     System.arraycopy(localQTVRHotSpotInfo.getBytes(), 0, getBytes(), 0, this.bytes.length);
/*     */   }
/*     */
/*     */   protected void writeObject(ObjectOutputStream paramObjectOutputStream) throws IOException {
/*  92 */     QTVRHotSpotInfo localQTVRHotSpotInfo = (QTVRHotSpotInfo)clone();
/*  93 */     paramObjectOutputStream.write(localQTVRHotSpotInfo.getBytes());
/*     */   }
/*     */
/*     */   public Object clone()
/*     */   {
/*     */     try {
/*  99 */       return new QTVRHotSpotInfo(this.bytes);
/*     */     } catch (QTException localQTException) {
/* 101 */       throw new QTRuntimeException(localQTException);
/*     */     }
/*     */   }
/*     */
/*     */   protected static EndianDescriptor makeED()
/*     */   {
/* 107 */     EndianDescriptor localEndianDescriptor = new EndianDescriptor(0);
/*     */
/* 109 */     EndianFlipSpec localEndianFlipSpec1 = new EndianFlipSpec(0, 2, 2);
/* 110 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec1);
/*     */
/* 112 */     EndianFlipSpec localEndianFlipSpec2 = new EndianFlipSpec(4, 4, 16);
/* 113 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec2);
/* 114 */     return localEndianDescriptor;
/*     */   }
/*     */
/*     */   public static EndianDescriptor getEndianDescriptor() {
/* 118 */     if (ed == null)
/* 119 */       ed = makeED();
/* 120 */     return ed;
/*     */   }
/*     */
/*     */   public int getHotSpotType()
/*     */   {
/* 128 */     return getIntAt(4);
/*     */   }
/*     */
/*     */   public void setHotSpotType(int paramInt)
/*     */   {
/* 135 */     setIntAt(4, paramInt);
/*     */   }
/*     */
/*     */   public void setHotSpotType(String paramString)
/*     */   {
/* 143 */     setIntAt(4, QTUtils.toOSType(paramString));
/*     */   }
/*     */
/*     */   public int getNameAtomID()
/*     */   {
/* 148 */     return getIntAt(8);
/*     */   }
/*     */
/*     */   public void setNameAtomID(int paramInt)
/*     */   {
/* 156 */     setIntAt(8, paramInt);
/*     */   }
/*     */
/*     */   public int getCommentAtomID()
/*     */   {
/* 161 */     return getIntAt(12);
/*     */   }
/*     */
/*     */   public void setCommentAtomID(int paramInt)
/*     */   {
/* 169 */     setIntAt(12, paramInt);
/*     */   }
/*     */
/*     */   public int getMouseOverCursorID()
/*     */   {
/* 174 */     return getIntAt(16);
/*     */   }
/*     */
/*     */   public void setMouseOverCursorID(int paramInt)
/*     */   {
/* 179 */     setIntAt(16, paramInt);
/*     */   }
/*     */
/*     */   public int getMouseDownCursorID()
/*     */   {
/* 184 */     return getIntAt(20);
/*     */   }
/*     */
/*     */   public void setMouseDownCursorID(int paramInt)
/*     */   {
/* 189 */     setIntAt(20, paramInt);
/*     */   }
/*     */
/*     */   public int getMouseUpCursorID()
/*     */   {
/* 194 */     return getIntAt(24);
/*     */   }
/*     */
/*     */   public void setMouseUpCursorID(int paramInt)
/*     */   {
/* 199 */     setIntAt(24, paramInt);
/*     */   }
/*     */
/*     */   public float getBestPan()
/*     */   {
/* 204 */     return getFloatAt(28);
/*     */   }
/*     */
/*     */   public void setBestPan(float paramFloat)
/*     */   {
/* 209 */     setFloatAt(28, paramFloat);
/*     */   }
/*     */
/*     */   public float getBestTilt()
/*     */   {
/* 214 */     return getFloatAt(32);
/*     */   }
/*     */
/*     */   public void setBestTilt(float paramFloat)
/*     */   {
/* 219 */     setFloatAt(32, paramFloat);
/*     */   }
/*     */
/*     */   public float getBestFOV()
/*     */   {
/* 224 */     return getFloatAt(36);
/*     */   }
/*     */
/*     */   public void setBestFOV(float paramFloat)
/*     */   {
/* 229 */     setFloatAt(36, paramFloat);
/*     */   }
/*     */
/*     */   public QDPoint getBestViewCenter()
/*     */   {
/* 234 */     return new QDPoint(getFloatAt(40), getFloatAt(44));
/*     */   }
/*     */
/*     */   public void setBestViewCenter(QDPoint paramQDPoint)
/*     */   {
/* 239 */     setFloatAt(40, paramQDPoint.getXF());
/* 240 */     setFloatAt(44, paramQDPoint.getYF());
/*     */   }
/*     */
/*     */   public QDRect getHotSpotRect()
/*     */   {
/* 245 */     return new QDRect(getIntAt(50), getIntAt(48), getIntAt(54) - getIntAt(50), getIntAt(52) - getIntAt(48));
/*     */   }
/*     */
/*     */   public void setHotSpotRect(QDRect paramQDRect)
/*     */   {
/* 254 */     setIntAt(48, paramQDRect.getY());
/* 255 */     setIntAt(50, paramQDRect.getX());
/* 256 */     setIntAt(52, paramQDRect.getY() + paramQDRect.getHeight());
/* 257 */     setIntAt(54, paramQDRect.getX() + paramQDRect.getWidth());
/*     */   }
/*     */
/*     */   public int getFlags()
/*     */   {
/* 262 */     return getIntAt(56);
/*     */   }
/*     */
/*     */   public void setFlags(int paramInt)
/*     */   {
/* 267 */     setIntAt(56, paramInt);
/*     */   }
/*     */
/*     */   public void setReserved1(int paramInt)
/*     */   {
/* 272 */     setIntAt(60, paramInt);
/*     */   }
/*     */
/*     */   public int getReserved1()
/*     */   {
/* 277 */     return getIntAt(60);
/*     */   }
/*     */
/*     */   public void setReserved2(int paramInt)
/*     */   {
/* 282 */     setIntAt(64, paramInt);
/*     */   }
/*     */
/*     */   public int getReserved2()
/*     */   {
/* 287 */     return getIntAt(64);
/*     */   }
/*     */
/*     */   public String toString()
/*     */   {
/* 294 */     return getClass().getName() + "[hotSpotType=" + QTUtils.fromOSType(getHotSpotType()) + ",nameAtomID=" + getNameAtomID() + ",commentAtomID=" + getCommentAtomID() + ",bestPan" + getBestPan() + ",bestTilt" + getBestTilt() + ",bestFOV" + getBestFOV() + ",bestViewCenter" + getBestViewCenter() + ",hotSpotRect" + getHotSpotRect() + ",flags" + getFlags() + "]";
/*     */   }
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.vr.QTVRHotSpotInfo
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.vr.QTVRHotSpotInfo

TOP
Copyright © 2018 www.massapi.com. 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.