Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue #62 #90

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed android/BeyondAR_Examples/libs/beyondar-v0.9.2.jar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class SimpleCameraWithMaxFarMinAwayActivity extends FragmentActivity impl
private BeyondarFragmentSupport mBeyondarFragment;
private World mWorld;

private SeekBar mSeekBarMax, mSeekBarMin, mSeekBarArViewDst, mSeekBarZfar;
private SeekBar mSeekBarPullCloserDistance, mSeekBarPushAwayDistance, mSeekBarMaxDistanceToRender, mSeekBarDistanceFactor;
private TextView mMaxFarText, mMinFarText, mArViewDistanceText, mZfarText;
private TextView mTextValues;

Expand All @@ -51,30 +51,30 @@ public void onCreate(Bundle savedInstanceState) {
mMinFarText = (TextView) findViewById(R.id.textBarMin);
mArViewDistanceText = (TextView) findViewById(R.id.textBarArViewDistance);
mZfarText= (TextView) findViewById(R.id.textBarZFar);
mMaxFarText.setText("Max far:");
mMinFarText.setText("Min far:");
mArViewDistanceText.setText("Ar view dst:");
mZfarText.setText("Z far:");
mMaxFarText.setText("Pull closer:");
mMinFarText.setText("Push away:");
mArViewDistanceText.setText("Max dst render:");
mZfarText.setText("Dst factor:");

mSeekBarMax = (SeekBar) findViewById(R.id.seekBarMax);
mSeekBarMin = (SeekBar) findViewById(R.id.seekBarMin);
mSeekBarArViewDst = (SeekBar) findViewById(R.id.seekBarArViewDistance);
mSeekBarZfar = (SeekBar) findViewById(R.id.seekBarZFar);
mSeekBarMax.setMax(1000);
mSeekBarMin.setMax(1000);
mSeekBarArViewDst.setMax(20000); // 20 km
mSeekBarZfar.setMax(50000);
mSeekBarPullCloserDistance = (SeekBar) findViewById(R.id.seekBarMax);
mSeekBarPushAwayDistance = (SeekBar) findViewById(R.id.seekBarMin);
mSeekBarMaxDistanceToRender = (SeekBar) findViewById(R.id.seekBarArViewDistance);
mSeekBarDistanceFactor = (SeekBar) findViewById(R.id.seekBarZFar);
mSeekBarPullCloserDistance.setMax(1000);
mSeekBarPushAwayDistance.setMax(1000);
mSeekBarMaxDistanceToRender.setMax(20000); // 20 km
mSeekBarDistanceFactor.setMax(50000);

mSeekBarMax.setOnSeekBarChangeListener(this);
mSeekBarMin.setOnSeekBarChangeListener(this);
mSeekBarArViewDst.setOnSeekBarChangeListener(this);
mSeekBarZfar.setOnSeekBarChangeListener(this);
mSeekBarPullCloserDistance.setOnSeekBarChangeListener(this);
mSeekBarPushAwayDistance.setOnSeekBarChangeListener(this);
mSeekBarMaxDistanceToRender.setOnSeekBarChangeListener(this);
mSeekBarDistanceFactor.setOnSeekBarChangeListener(this);

updateTextValues();

mSeekBarMin.setProgress(115);
mSeekBarArViewDst.setProgress(20000);
mSeekBarZfar.setProgress(50000);
mSeekBarPushAwayDistance.setProgress(115);
mSeekBarMaxDistanceToRender.setProgress(20000);
mSeekBarDistanceFactor.setProgress(50000);

// We create the world and fill it ...
mWorld = CustomWorldHelper.generateObjects(this);
Expand All @@ -84,13 +84,13 @@ public void onCreate(Bundle savedInstanceState) {

@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (seekBar == mSeekBarMax) {
if (seekBar == mSeekBarPullCloserDistance) {
mBeyondarFragment.setPullCloserDistance(progress);
} else if (seekBar == mSeekBarMin) {
} else if (seekBar == mSeekBarPushAwayDistance) {
mBeyondarFragment.setPushAwayDistance(progress);
} else if (seekBar == mSeekBarArViewDst) {
} else if (seekBar == mSeekBarMaxDistanceToRender) {
mBeyondarFragment.setMaxDistanceToRender(progress);
} else if (seekBar == mSeekBarZfar) {
} else if (seekBar == mSeekBarDistanceFactor) {
mBeyondarFragment.setDistanceFactor(progress);
}
updateTextValues();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public class Version {
/**
* Version number of BeyondAR framework.
*/
public static final int VERSION_NUMBER = 0x000902;
public static final int VERSION_NUMBER = 0x000903;

/**
* Version name of BeyondAR framework.
*/
public static final String VERSION_NAME = "0.9.2";
public static final String VERSION_NAME = "0.9.3";

}
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
return;
}
stopPreviewCamera();


configureCameraOrientation();

startPreviewCamera();
}

private void configureCameraOrientation(){
Camera.Parameters parameters = mCamera.getParameters();

int orientation = 0;
Expand All @@ -267,9 +273,8 @@ public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
{
parameters.setPreviewFpsRange(30000, 30000);
}

mCamera.setParameters(parameters);
startPreviewCamera();
}

@TargetApi(Build.VERSION_CODES.GINGERBREAD)
Expand Down Expand Up @@ -399,6 +404,8 @@ private boolean openCamera() {
while (!acquiredCam && timePassed < MAX_TIME_WAIT_FOR_CAMERA) {
try {
mCamera = Camera.open();
//TODO: TEST
configureCameraOrientation();
Logger.v(TAG, "acquired the camera");
acquiredCam = true;
return true;
Expand Down
4 changes: 2 additions & 2 deletions android/doc/doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation.
# The default value is: NO.

EXTRACT_STATIC = NO
EXTRACT_STATIC = YES

# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO
Expand Down Expand Up @@ -1352,7 +1352,7 @@ DISABLE_INDEX = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_TREEVIEW = NO
GENERATE_TREEVIEW = YES

# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
# doxygen will group on one line in the generated HTML documentation.
Expand Down
Binary file added android/libs/beyondar-v0.9.3.jar
Binary file not shown.
Binary file added android/libs/beyondar-v0.9.4.jar
Binary file not shown.