/* */ package quicktime.vr;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.qd.QDPoint;
/* */ import quicktime.util.QTPointerRef;
/* */ import quicktime.util.QTUtils;
/* */
/* */ public class QTVRInterceptRecord extends QTPointerRef
/* */ {
/* */ private static final int kNativeSize = 44;
/* */
/* */ protected QTVRInterceptRecord(int paramInt, Object paramObject)
/* */ {
/* 44 */ super(paramInt, 44, paramObject);
/* 45 */ if (paramObject == null) throw new RuntimeException("Must have an owner");
/* */ }
/* */
/* */ public final int getSelector()
/* */ {
/* 55 */ return getIntAt(4);
/* */ }
/* */
/* */ public final int getParamCount()
/* */ {
/* 65 */ return getIntAt(16);
/* */ }
/* */
/* */ public float getAngle()
/* */ throws QTException
/* */ {
/* 75 */ int i = getSelector();
/* 76 */ if ((i == 8192) || (i == 8193)) {
/* 77 */ int j = getIntAt(20);
/* 78 */ return getFloatFromPointer(j, 0);
/* */ }
/* 80 */ throw new QTException(-50);
/* */ }
/* */
/* */ public void setAngle(float paramFloat)
/* */ throws QTException
/* */ {
/* 90 */ int i = getSelector();
/* 91 */ if ((i == 8192) || (i == 8193)) {
/* 92 */ int j = getIntAt(20);
/* 93 */ setFloatInPointer(j, 0, paramFloat);
/* */ }
/* 95 */ throw new QTException(-50);
/* */ }
/* */
/* */ public float getFieldOfView()
/* */ throws QTException
/* */ {
/* 105 */ int i = getSelector();
/* 106 */ if (i != 8194)
/* 107 */ throw new QTException(-50);
/* 108 */ int j = getIntAt(20);
/* 109 */ return getFloatFromPointer(j, 0);
/* */ }
/* */
/* */ public void setFieldOfView(float paramFloat)
/* */ throws QTException
/* */ {
/* 119 */ int i = getSelector();
/* 120 */ if (i != 8194)
/* 121 */ throw new QTException(-50);
/* 122 */ int j = getIntAt(20);
/* 123 */ setFloatInPointer(j, 0, paramFloat);
/* */ }
/* */
/* */ public QDPoint getViewCenter()
/* */ throws QTException
/* */ {
/* 133 */ int i = getSelector();
/* 134 */ if (i != 8195)
/* 135 */ throw new QTException(-50);
/* 136 */ int j = getIntAt(20);
/* 137 */ float f1 = getFloatFromPointer(j, 0);
/* 138 */ float f2 = getFloatFromPointer(j, 4);
/* 139 */ return new QDPoint(f1, f2);
/* */ }
/* */
/* */ public void setViewCenter(QDPoint paramQDPoint)
/* */ throws QTException
/* */ {
/* 149 */ int i = getSelector();
/* 150 */ if (i != 8195)
/* 151 */ throw new QTException(-50);
/* 152 */ int j = getIntAt(20);
/* 153 */ setFloatInPointer(j, 0, paramQDPoint.getXF());
/* 154 */ setFloatInPointer(j, 4, paramQDPoint.getYF());
/* */ }
/* */
/* */ public int getHotSpotID()
/* */ throws QTException
/* */ {
/* 164 */ int i = getSelector();
/* 165 */ if ((i == 8202) || (i == 8203)) {
/* 166 */ return getIntAt(20);
/* */ }
/* 168 */ throw new QTException(-50);
/* */ }
/* */
/* */ public void setHotSpotID(int paramInt)
/* */ throws QTException
/* */ {
/* 178 */ int i = getSelector();
/* 179 */ if ((i == 8202) || (i == 8203)) {
/* 180 */ setIntAt(20, paramInt);
/* */ }
/* 182 */ throw new QTException(-50);
/* */ }
/* */
/* */ public int getHotSpotType()
/* */ throws QTException
/* */ {
/* 192 */ if (getSelector() != 8203)
/* 193 */ throw new QTException(-50);
/* 194 */ int i = getIntAt(24);
/* 195 */ return getIntFromPointer(i, 0);
/* */ }
/* */
/* */ public void setHotSpotType(int paramInt)
/* */ throws QTException
/* */ {
/* 205 */ if (getSelector() != 8203)
/* 206 */ throw new QTException(-50);
/* 207 */ int i = getIntAt(24);
/* 208 */ setIntInPointer(i, 0, paramInt);
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 216 */ String str = getClass().getName();
/* */ try {
/* 218 */ str = str + "[selector=0x" + Integer.toHexString(getSelector());
/* 219 */ str = str + ",paramCount=" + getParamCount();
/* 220 */ switch (getSelector()) {
/* */ case 8192:
/* 222 */ str = str + ",pan angle (Radians)=" + getAngle();
/* 223 */ break;
/* */ case 8193:
/* 225 */ str = str + ",tilt angle (Radians)=" + getAngle();
/* 226 */ break;
/* */ case 8194:
/* 228 */ str = str + ",field of view (Radians)=" + getFieldOfView();
/* 229 */ break;
/* */ case 8195:
/* 231 */ str = str + ",view center=" + getViewCenter();
/* 232 */ break;
/* */ case 8202:
/* 234 */ str = str + ",hot spot ID=" + getHotSpotID();
/* 235 */ break;
/* */ case 8203:
/* 237 */ str = str + ",hot spot ID=" + getHotSpotID();
/* 238 */ str = str + ",hotSpotType='" + QTUtils.fromOSType(getHotSpotType()) + "'";
/* */ case 8196:
/* */ case 8197:
/* */ case 8198:
/* */ case 8199:
/* */ case 8200:
/* 243 */ case 8201: } } catch (QTException localQTException) { str = str + "MISMATCHED SELECTOR"; }
/* */
/* 245 */ str = str + "]";
/* 246 */ return str;
/* */ }
/* */
/* */ private static native void setIntInPointer(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ private static native int getIntFromPointer(int paramInt1, int paramInt2);
/* */
/* */ private static native void setFloatInPointer(int paramInt1, int paramInt2, float paramFloat);
/* */
/* */ private static native float getFloatFromPointer(int paramInt1, int paramInt2);
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.vr.QTVRInterceptRecord
* JD-Core Version: 0.6.2
*/