public PointCloudData updateAndGetLatestPointCloudRenderBuffer(){
synchronized (PointCloudManager.mPointCloudLock) {
    if (mSwapSignal) {
      FloatBuffer temp=mRenderPointCloudData.floatBuffer;
      int tempCount=mRenderPointCloudData.pointCount;
      mRenderPointCloudData.floatBuffer=mSharedPointCloudData.floatBuffer;
      mRenderPointCloudData.pointCount=mSharedPointCloudData.pointCount;
      mSharedPointCloudData.floatBuffer=temp;
      mSharedPointCloudData.pointCount=tempCount;
      mSwapSignal=false;
    }
  }
  return mRenderPointCloudData;
}

public PointCloudData updateAndGetLatestPointCloudRenderBuffer ( ) { synchronized ( PointCloudManager . mPointCloudLock ) { if ( mSwapSignal ) { FloatBuffer temp = mRenderPointCloudData . floatBuffer ; int tempCount = mRenderPointCloudData . pointCount ; mRenderPointCloudData . floatBuffer = mSharedPointCloudData . floatBuffer ; mRenderPointCloudData . pointCount = mSharedPointCloudData . pointCount ; mSharedPointCloudData . floatBuffer = temp ; mSharedPointCloudData . pointCount = tempCount ; mSwapSignal = false ; } } return mRenderPointCloudData ; }
returns a shallow copy of latest point cloud render buffer . if there is a swap signal available sharedpointcloud buffer is swapped with render buffer and it is returned .
