本文整理汇总了Java中com.panoramagl.utils.PLLog.debug方法的典型用法代码示例。如果您正苦于以下问题:Java PLLog.debug方法的具体用法?Java PLLog.debug怎么用?Java PLLog.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.panoramagl.utils.PLLog
的用法示例。
在下文中一共展示了PLLog.debug方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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;
}
示例7: NSTimer
import com.panoramagl.utils.PLLog; //导入方法依赖的package包/类
/**init methods*/
public NSTimer(Date date, float interval, Runnable target, Object[] userInfo, boolean repeats)
{
super();
mIsRunning = true;
mInterval = (long)(interval * 1000.0f);
mTarget = target;
mUserInfo = userInfo;
mRepeats = repeats;
mLastTime = date.getTime();
mThread = new Thread(new java.lang.Runnable()
{
@Override
public void run()
{
while(mIsRunning)
{
mTime = SystemClock.uptimeMillis();
if(mTime - mLastTime >= mInterval)
{
try
{
mTarget.run(NSTimer.this, mUserInfo);
}
catch(Throwable e)
{
PLLog.debug("NSTimer::run", e);
}
if(!mRepeats)
invalidate();
}
mLastTime = mTime;
try
{
Thread.sleep(mInterval);
}
catch(Throwable e)
{
}
}
}
});
mThread.start();
}