當前位置: 首頁>>代碼示例>>Java>>正文


Java PLConstants類代碼示例

本文整理匯總了Java中com.panoramagl.PLConstants的典型用法代碼示例。如果您正苦於以下問題:Java PLConstants類的具體用法?Java PLConstants怎麽用?Java PLConstants使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PLConstants類屬於com.panoramagl包,在下文中一共展示了PLConstants類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initializeValues

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
protected void initializeValues()
{
	super.initializeValues();
	mVertexs = new float[12];
	this.setWidth(PLConstants.kDefaultHotspotSize);
	this.setHeight(PLConstants.kDefaultHotspotSize);
	mAtv = mAth = 0.0f;
	this.setYZAxisInverseRotation(true);
	this.setZ(PLConstants.kDefaultHotspotZPosition);
	mOnClick = null;
	this.setAlpha(PLConstants.kDefaultHotspotAlpha);
	this.setDefaultAlpha(PLConstants.kDefaultHotspotAlpha);
	mOverAlpha = mDefaultOverAlpha = PLConstants.kDefaultHotspotOverAlpha;
	hasChangedCoordProperty = true;
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:17,代碼來源:PLHotspot.java

示例2: run

import com.panoramagl.PLConstants; //導入依賴的package包/類
/**Runnable methods*/

		@Override
		public void run()
		{
			try
			{
				if(mTokenInfo.getName().equals("load"))
				{
					PLITokenInfo transitionTokenInfo = (mTokenInfo.hasValue(2) ? mTokenInfo.getTokenInfo(2) : null);
					if(transitionTokenInfo != null && transitionTokenInfo.getName().equals("null"))
						transitionTokenInfo = null;
					mView.load(new PLJSONLoader(mTokenInfo.getString(0)), mTokenInfo.hasValue(1) ? mTokenInfo.getBoolean(1) : false, transitionTokenInfo != null ? new PLTransitionBlend(transitionTokenInfo.getFloat(0), transitionTokenInfo.hasValue(1) ? transitionTokenInfo.getFloat(1) : -1.0f) : null, mTokenInfo.hasValue(3) ? mTokenInfo.getFloat(3) : PLConstants.kFloatUndefinedValue, mTokenInfo.hasValue(4) ? mTokenInfo.getFloat(4) : PLConstants.kFloatUndefinedValue);
				}
			}
			catch(Throwable e)
			{
				PLLog.error("PLCommandRunnable::run", e);
			}
		}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:21,代碼來源:PLCommandInterpreter.java

示例3: setWidth

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
public void setWidth(float width)
{
	if(width >= 0.0f && width <= 1.0f && this.getWidth() != width)
	{
		mWidth = width * PLConstants.kPanoramaRadius * 2.0f;
		hasChangedCoordProperty = true;
	}
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:10,代碼來源:PLHotspot.java

示例4: setHeight

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
public void setHeight(float height)
{
	if(height >= 0.0f && height <= 1.0f && this.getHeight() != height)
	{
		mHeight = height * PLConstants.kPanoramaRadius * 2.0f;
		hasChangedCoordProperty = true;
	}
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:10,代碼來源:PLHotspot.java

示例5: convertPitchAndYawToPosition

import com.panoramagl.PLConstants; //導入依賴的package包/類
/**calculate methods*/

protected PLPosition convertPitchAndYawToPosition(float pitch, float yaw)
{
	float r = this.getZ(), pr = (90.0f - pitch) * PLConstants.kToRadians, yr = -yaw * PLConstants.kToRadians;
	float x = r * FloatMath.sin(pr) * FloatMath.cos(yr);
	float y = r * FloatMath.sin(pr) * FloatMath.sin(yr);
	float z = r * FloatMath.cos(pr);
	return PLPosition.PLPositionMake(y, z, x);
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:11,代碼來源:PLHotspot.java

示例6: calculatePoints

import com.panoramagl.PLConstants; //導入依賴的package包/類
protected List<PLPosition> calculatePoints(GL10 gl)
{
	List<PLPosition> result = new ArrayList<PLPosition>(4);
	//1
	PLPosition pos = this.convertPitchAndYawToPosition(mAtv, mAth), pos1 = this.convertPitchAndYawToPosition(mAtv + 0.0001f, mAth);
	//2 and 3
	PLVector3 p1 = new PLVector3(pos.x, pos.y, pos.z),
			  p2p1 = new PLVector3(0.0f, 0.0f, 0.0f).sub(p1),
			  r = p2p1.crossProduct(new PLVector3(pos1.x, pos1.y, pos1.z).sub(p1)),
			  s = p2p1.crossProduct(r);
	//4
	r.normalize();
	s.normalize();
	//5.1
	float w = mWidth * PLConstants.kPanoramaRadius, h = mHeight * PLConstants.kPanoramaRadius;
	float radius = FloatMath.sqrt((w * w) + (h * h));
	//5.2
	float angle = (float)Math.asin(h / radius);
	//5.3
	PLVector3 n = new PLVector3(0.0f, 0.0f, 0.0f);
	for(float theta : new float[]{ PLConstants.kPI - angle, angle, PLConstants.kPI + angle, 2 * PLConstants.kPI - angle})
	{
		n.x = p1.x + (radius * FloatMath.cos(theta) * r.x) + (radius * FloatMath.sin(theta) * s.x);
		n.y = p1.y + (radius * FloatMath.cos(theta) * r.y) + (radius * FloatMath.sin(theta) * s.y);
		n.z = p1.z + (radius * FloatMath.cos(theta) * r.z) + (radius * FloatMath.sin(theta) * s.z);
		n.normalize();
		result.add(PLPosition.PLPositionMake(n.x, n.y, n.z));
	}
	return result;
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:31,代碼來源:PLHotspot.java

示例7: convertFromSphericalToCartesian

import com.panoramagl.PLConstants; //導入依賴的package包/類
public static void convertFromSphericalToCartesian(float radius, float pitch, float yaw, float picthOffset, float yawOffset, PLPosition result)
{
	if(result != null)
	{
		float pr = (pitch + picthOffset) * PLConstants.kToRadians, yr = (yaw + yawOffset) * PLConstants.kToRadians;
		result.setValues((radius * FloatMath.sin(pr) * FloatMath.cos(yr)), (radius * FloatMath.sin(pr) * FloatMath.sin(yr)), (radius * FloatMath.cos(pr)));
	}
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:9,代碼來源:PLMath.java

示例8: initializeValues

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
protected void initializeValues()
{
	mTimer = null;
	mInterval = PLConstants.kDefaultTransitionInterval;
	mProgressPercentage = 0;
	mView = null;
	mCurrentPanorama = mNewPanorama = null;
	mCurrentPanoramaCamera = mNewPanoramaCamera = null;
	mIsPanoramaLocked = mIsRunning = mIsValid = false;
	mInternalListener = null;
	mListeners = new PLTransitionListenerManager();
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:14,代碼來源:PLTransitionBase.java

示例9: initializeValues

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
protected void initializeValues()
{
	super.initializeValues();
	mView = null;
	mTransition = null;
	mInitialPitch = mInitialYaw = PLConstants.kFloatUndefinedValue;
	mJSONData = null;
	mURL = null;
	mJSON = null;
	mIsPreloadingImages = true;
	mKeepParameters = null;
	mHotspotTextures = new HashMap<String, PLITexture>();
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:15,代碼來源:PLJSONLoader.java

示例10: convertPitchAndYawToPosition

import com.panoramagl.PLConstants; //導入依賴的package包/類
/**calculate methods*/

protected PLPosition convertPitchAndYawToPosition(float pitch, float yaw)
{
	float r = this.getZ(), pr = (90.0f - pitch) * PLConstants.kToRadians, yr = -yaw * PLConstants.kToRadians;
	float x = r * (float)Math.sin(pr) * (float)Math.cos(yr);
	float y = r * (float)Math.sin(pr) * (float)Math.sin(yr);
	float z = r * (float)Math.cos(pr);
	return PLPosition.PLPositionMake(y, z, x);
}
 
開發者ID:marianmoldovan,項目名稱:panoramagl,代碼行數:11,代碼來源:PLHotspot.java

示例11: calculatePoints

import com.panoramagl.PLConstants; //導入依賴的package包/類
protected List<PLPosition> calculatePoints(GL10 gl)
{
	List<PLPosition> result = new ArrayList<PLPosition>(4);
	//1
	PLPosition pos = this.convertPitchAndYawToPosition(mAtv, mAth), pos1 = this.convertPitchAndYawToPosition(mAtv + 0.0001f, mAth);
	//2 and 3
	PLVector3 p1 = new PLVector3(pos.x, pos.y, pos.z),
			  p2p1 = new PLVector3(0.0f, 0.0f, 0.0f).sub(p1),
			  r = p2p1.crossProduct(new PLVector3(pos1.x, pos1.y, pos1.z).sub(p1)),
			  s = p2p1.crossProduct(r);
	//4
	r.normalize();
	s.normalize();
	//5.1
	float w = mWidth * PLConstants.kPanoramaRadius, h = mHeight * PLConstants.kPanoramaRadius;
	float radius = (float)Math.sqrt((w * w) + (h * h));
	//5.2
	float angle = (float)Math.asin(h / radius);
	//5.3
	PLVector3 n = new PLVector3(0.0f, 0.0f, 0.0f);
	for(float theta : new float[]{ PLConstants.kPI - angle, angle, PLConstants.kPI + angle, 2 * PLConstants.kPI - angle})
	{
		n.x = p1.x + (radius * (float)Math.cos(theta) * r.x) + (radius * (float)Math.sin(theta) * s.x);
		n.y = p1.y + (radius * (float)Math.cos(theta) * r.y) + (radius * (float)Math.sin(theta) * s.y);
		n.z = p1.z + (radius * (float)Math.cos(theta) * r.z) + (radius * (float)Math.sin(theta) * s.z);
		n.normalize();
		result.add(PLPosition.PLPositionMake(n.x, n.y, n.z));
	}
	return result;
}
 
開發者ID:marianmoldovan,項目名稱:panoramagl,代碼行數:31,代碼來源:PLHotspot.java

示例12: convertFromSphericalToCartesian

import com.panoramagl.PLConstants; //導入依賴的package包/類
public static void convertFromSphericalToCartesian(float radius, float pitch, float yaw, float picthOffset, float yawOffset, PLPosition result)
{
	if(result != null)
	{
		float pr = (pitch + picthOffset) * PLConstants.kToRadians, yr = (yaw + yawOffset) * PLConstants.kToRadians;
		result.setValues((radius * (float)Math.sin(pr) * (float)Math.cos(yr)), (radius * (float)Math.sin(pr) * (float)Math.sin(yr)), (radius * (float)Math.cos(pr)));
	}
}
 
開發者ID:marianmoldovan,項目名稱:panoramagl,代碼行數:9,代碼來源:PLMath.java

示例13: getWidth

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
public float getWidth()
{
	return (mWidth / (PLConstants.kPanoramaRadius * 2.0f));
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:6,代碼來源:PLHotspot.java

示例14: getHeight

import com.panoramagl.PLConstants; //導入依賴的package包/類
@Override
public float getHeight()
{
	return (mHeight / (PLConstants.kPanoramaRadius * 2.0f));
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:6,代碼來源:PLHotspot.java

示例15: iterationsPerSecond

import com.panoramagl.PLConstants; //導入依賴的package包/類
/**control methods*/

protected int iterationsPerSecond()
{
	return PLConstants.kDefaultTransitionIterationsPerSecond;
}
 
開發者ID:codedavid,項目名稱:PanoramaGL,代碼行數:7,代碼來源:PLTransitionBase.java


注:本文中的com.panoramagl.PLConstants類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。