当前位置: 首页>>代码示例>>Java>>正文


Java PLLog类代码示例

本文整理汇总了Java中com.panoramagl.utils.PLLog的典型用法代码示例。如果您正苦于以下问题:Java PLLog类的具体用法?Java PLLog怎么用?Java PLLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PLLog类属于com.panoramagl.utils包,在下文中一共展示了PLLog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: render

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
@Override
public boolean render(GL10 gl, PLIRenderer renderer)
{
	try
	{
		if(mIsVisible && mIsValid)
		{
			mIsRendering = true;
			this.beginRender(gl, renderer);
			this.internalRender(gl, renderer);
			this.endRender(gl, renderer);
			mIsRendering = false;
			return true;
		}
	}
	catch(Throwable e)
	{
		mIsRendering = false;
		PLLog.error("PLRenderableElementBase::render", e);
	}
	return false;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:23,代码来源:PLRenderableElementBase.java

示例2: interpret

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**interpret methods*/

@Override
public boolean interpret(PLIView view, String text)
{
	mView = view;
	try
	{
		PLCommandTokenizer tokenizer = new PLCommandTokenizer();
		tokenizer.tokenize(text);
		this.parseCommands(tokenizer.getTokens(), 0);
	}
	catch(Throwable e)
	{
		PLLog.error("PLCommandInterpreter::interpret", e);
		return false;
	}
	finally
	{
		mView = null;
	}
	return true;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:24,代码来源:PLCommandInterpreter.java

示例3: run

import com.panoramagl.utils.PLLog; //导入依赖的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

示例4: createFrameBuffer

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**buffer methods*/

protected void createFrameBuffer(GL11ExtensionPack gl11ep)
{
	if(mContextSupportsFrameBufferObject)
	{
        gl11ep.glGenFramebuffersOES(1, mDefaultFramebuffer, 0);
        if(mDefaultFramebuffer[0] <= 0)
        	PLLog.error("PLRenderer::createFrameBuffer", "Invalid framebuffer id returned!");
        gl11ep.glGenRenderbuffersOES(1, mColorRenderbuffer, 0);
        if(mColorRenderbuffer[0] <= 0)
        	PLLog.error("PLRenderer::createFrameBuffer", "Invalid renderbuffer id returned!");
        gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, mDefaultFramebuffer[0]);
        gl11ep.glBindRenderbufferOES(GL11ExtensionPack.GL_RENDERBUFFER_OES, mColorRenderbuffer[0]);
	}
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:17,代码来源:PLRenderer.java

示例5: onSurfaceCreated

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**android: GLSurfaceView.Renderer methods*/

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config)
{
	try
	{
		mIsGLContextCreated = false;
		mGLWrapper = (PLOpenGLSupport.isHigherThanOpenGL1(gl) ? new GLWrapper(gl, mView.getGLSurfaceView()) : new MatrixTrackingGL(gl, mView.getGLSurfaceView()));
		//mContextSupportsFrameBufferObject = PLOpenGLSupport.checkIfContextSupportsFrameBufferObject(gl);
		this.start();
		if(mListener != null)
			mListener.rendererCreated(this);
	}
	catch(Throwable e)
	{
		PLLog.error("PLRenderer::onSurfaceCreated", e);
	}
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:20,代码来源:PLRenderer.java

示例6: requestJSON

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**json methods*/

protected void requestJSON(PLFileDownloaderListener listener)
{
	try
	{
		if(mURL != null)
		{
			if(this.isHTTPURL(mURL))
				new PLHTTPFileDownloader(mURL, listener).downloadAsynchronously();
			else
				new PLLocalFileDownloader(mView.getActivity().getApplicationContext(), mURL, listener).downloadAsynchronously();
		}
		else if(mJSONData != null)
			new Thread(new PLDataRunnable(listener, mURL, mJSONData, System.currentTimeMillis())).start();
	    else
	    	listener.didErrorDownload(mURL, "JSON string is empty", -1, null);
	}
	catch(Throwable e)
	{
		PLLog.error("PLJSONLoader::requestJSON", e);
		listener.didErrorDownload(mURL, e.getMessage(), -1, null);
	}
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:25,代码来源:PLJSONLoader.java

示例7: requestJSON

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**json methods*/

protected void requestJSON(PLFileDownloaderListener listener)
{
	try
	{
		if(mURL != null)
		{
			if(this.isHTTPURL(mURL))
				new PLHTTPFileDownloader(mURL, listener).downloadAsynchronously();
			else
				new PLLocalFileDownloader(mView.getContext().getApplicationContext(), mURL, listener).downloadAsynchronously();
		}
		else if(mJSONData != null)
			new Thread(new PLDataRunnable(listener, mURL, mJSONData, System.currentTimeMillis())).start();
	    else
	    	listener.didErrorDownload(mURL, "JSON string is empty", -1, null);
	}
	catch(Throwable e)
	{
		PLLog.error("PLJSONLoader::requestJSON", e);
		listener.didErrorDownload(mURL, e.getMessage(), -1, null);
	}
}
 
开发者ID:marianmoldovan,项目名称:panoramagl,代码行数:25,代码来源:PLJSONLoader.java

示例8: setPreviewImage

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
@Override
public void setPreviewImage(PLIImage image)
{
	if(image != null)
	{
		synchronized(mPreviewTextures)
		{
			this.removeAllPreviewTextures(true);
			int width = image.getWidth();
			int height = image.getHeight();
			if(PLMath.isPowerOfTwo(width) && (height % width == 0 || width % height == 0))
			{
				int[] previewTilesOrder = this.getPreviewTilesOrder();
				int w, h, tilesLength = this.getPreviewTilesNumber();
				if(tilesLength == 1)
				{
					w = width;
					h = height;
				}
				else
					w = h = (width > height ? height : width);
				for(int i = 0; i < tilesLength; i++)
				{
					try
					{
						PLIImage subImage = new PLImage(image.getSubImage(0, previewTilesOrder[i] * w, w, h));
						mPreviewTextures[i] = new PLTexture(subImage);
					}
					catch(Throwable e)
					{
						this.removeAllPreviewTextures(true);
						PLLog.error("PLPanoramaBase::setPreviewTexture", "setPreviewTexture fails: %s", e);
						break;
					}
				}
			}
		}
	}
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:40,代码来源:PLPanoramaBase.java

示例9: bindTextureByIndex

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
protected boolean bindTextureByIndex(GL10 gl, int index)
{
	boolean result = false;
	try
	{
		PLITexture texture = this.getTextures()[index];
		if(texture != null && texture.getTextureId(gl) != 0)
		{
			gl.glBindTexture(GL10.GL_TEXTURE_2D, texture.getTextureId(gl));
			result = true;
            if(this.getPreviewTextures()[index] != null)
            	this.removePreviewTextureAtIndex(index, true);
		}
		else
		{
			texture = this.getPreviewTextures()[index];
			if(texture != null && texture.getTextureId(gl) != 0)
			{
				gl.glBindTexture(GL10.GL_TEXTURE_2D, texture.getTextureId(gl));
				result = true;
			}
		}
	}
	catch(Throwable e)
	{
		PLLog.error("PLCubicPanorama::bindTextureByIndex", e);
	}
	return result;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:30,代码来源:PLCubicPanorama.java

示例10: didError

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
protected void didError(final Throwable e)
{
	mView.getActivity().runOnUiThread
	(
		new Runnable()
		{
			@Override
			public void run()
			{
				didError(e.toString());
		        PLLog.error("PLJSONLoader", e);
			}
		}
	);
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:16,代码来源:PLJSONLoader.java

示例11: activateAccelerometer

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**accelerometer methods*/
   
protected boolean activateAccelerometer()
{
	if(mSensorManager != null && mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), (int)(mAccelerometerInterval * 1000.0f)))
		return true;
	PLLog.debug("PLView::activateAccelerometer", "Accelerometer sensor is not available on the device!");
	return false;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:10,代码来源:PLView.java

示例12: startSensorialRotation

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**sensorial rotation methods*/

@Override
public boolean startSensorialRotation()
{
    if(!mIsValidForSensorialRotation)
    {
   		if(this.activateGyroscope())
    	{
   			mHasFirstGyroscopePitch = false;
    		mGyroscopeLastTime = 0;
    		mGyroscopeRotationX = mGyroscopeRotationY = 0.0f;
    		mSensorialRotationType = PLSensorialRotationType.PLSensorialRotationTypeGyroscope;
    		mIsValidForSensorialRotation = true;
    	}
   		else
   		{
   			PLLog.debug("PLView::startSensorialRotation", "Gyroscope sensor is not available on device!");
   			if(mSensorManager != null && mSensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER).size() > 0 && mSensorManager.getSensorList(Sensor.TYPE_MAGNETIC_FIELD).size() > 0)
   			{
   				mSensorialRotationThresholdTimestamp = 0;
   				mSensorialRotationThresholdFlag = false;
   				mSensorialRotationAccelerometerData = new float[3];
   				mSensorialRotationRotationMatrix = new float[16];
   				mSensorialRotationOrientationData = new float[3];
   				mHasFirstAccelerometerPitch = mHasFirstMagneticHeading = false;
   				mFirstAccelerometerPitch = mLastAccelerometerPitch = mAccelerometerPitch = 0.0f;
   				mFirstMagneticHeading = mLastMagneticHeading = mMagneticHeading = 0.0f;
                mSensorialRotationType = PLSensorialRotationType.PLSensorialRotationTypeAccelerometerAndMagnetometer;
                mIsValidForSensorialRotation = true;
                this.activateMagnetometer();
            }
            else
            	PLLog.debug("PLView::startSensorialRotation", "Accelerometer or/and magnetometer sensor/s is/are not available on device!");
   		}
   		return mIsValidForSensorialRotation;
    }
    return false;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:40,代码来源:PLView.java

示例13: activateOrientation

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**orientation methods*/

@SuppressWarnings("deprecation")
protected boolean activateOrientation()
{
	if(mSensorManager != null && mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME))
		return true;
	PLLog.debug("PLView::activateOrientation", "Orientation sensor is not available on the device!");
	return false;
}
 
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:11,代码来源:PLView.java

示例14: activateAccelerometer

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**accelerometer methods*/
   
protected boolean activateAccelerometer() {
	if(mSensorManager != null && mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), (int)(mAccelerometerInterval * 1000.0f)))
		return true;
	PLLog.debug("PLView::activateAccelerometer", "Accelerometer sensor is not available on the device!");
	return false;
}
 
开发者ID:marianmoldovan,项目名称:panoramagl,代码行数:9,代码来源:PLManager.java

示例15: startSensorialRotation

import com.panoramagl.utils.PLLog; //导入依赖的package包/类
/**sensorial rotation methods*/

@Override
public boolean startSensorialRotation() {
    if(!mIsValidForSensorialRotation)
    {
   		if(this.activateGyroscope())
    	{
   			mHasFirstGyroscopePitch = false;
    		mGyroscopeLastTime = 0;
    		mGyroscopeRotationX = mGyroscopeRotationY = 0.0f;
    		mSensorialRotationType = PLSensorialRotationType.PLSensorialRotationTypeGyroscope;
    		mIsValidForSensorialRotation = true;
    	}
   		else
   		{
   			PLLog.debug("PLView::startSensorialRotation", "Gyroscope sensor is not available on device!");
   			if(mSensorManager != null && mSensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER).size() > 0 && mSensorManager.getSensorList(Sensor.TYPE_MAGNETIC_FIELD).size() > 0)
   			{
   				mSensorialRotationThresholdTimestamp = 0;
   				mSensorialRotationThresholdFlag = false;
   				mSensorialRotationAccelerometerData = new float[3];
   				mSensorialRotationRotationMatrix = new float[16];
   				mSensorialRotationOrientationData = new float[3];
   				mHasFirstAccelerometerPitch = mHasFirstMagneticHeading = false;
   				mFirstAccelerometerPitch = mLastAccelerometerPitch = mAccelerometerPitch = 0.0f;
   				mFirstMagneticHeading = mLastMagneticHeading = mMagneticHeading = 0.0f;
                mSensorialRotationType = PLSensorialRotationType.PLSensorialRotationTypeAccelerometerAndMagnetometer;
                mIsValidForSensorialRotation = true;
                this.activateMagnetometer();
            }
            else
            	PLLog.debug("PLView::startSensorialRotation", "Accelerometer or/and magnetometer sensor/s is/are not available on device!");
   		}
   		return mIsValidForSensorialRotation;
    }
    return false;
}
 
开发者ID:marianmoldovan,项目名称:panoramagl,代码行数:39,代码来源:PLManager.java


注:本文中的com.panoramagl.utils.PLLog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。