If that's still distortion you are after, I think that it is your hardware camera distortion parameters that are inadequate. Try to see if Vuforia lets you change it and calibrate your camera.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
camera.setOrientation(_normalVector, _tangentVector);
camera.rotateAxis(_normalVector, _leftRightAngle);
camera.rotateAxis(_tangentVector, _upDownAngle);
World.calcMinDistance(Camera.getPosition(),Camera.getUpVector(), someDistance);
public void collision(final CollisionEvent ce) {
if (ce.getAlgorithm() == CollisionEvent.ALGORITHM_RAY) {
if (ce.getPolygonIDs().length > 0) {
_normalVector.normalize(ce.getTargets()[0].getPolygonManager()
.getTransformedNormal(ce.getPolygonIDs()[0]));
_tangentVector = _normalVector.calcCross(CROSS_PROD_VECTOR);
}
}
}
...
_object.strip();
_object.build();
_object.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS|Object3D.COLLISION_CHECK_SELF);
_object.setCollisionOptimization(true);
public boolean setCameraMatrix(float[] matrix){
if (_camera != null){
_cameraPosition.set(matrix[12],matrix[13],matrix[14]);
matrix[12] = matrix[13] = matrix[14] = 0;
_cameraMatrix.setDump(matrix);
_cameraMatrix = _cameraMatrix.invert();
_camera.setBack(_cameraMat);
_camera.setPosition(_cameraPosition);
return true;
} else {
return false;
}
}
public Object3D pick(int x,int y){
Log.d("jpctEngine", "Picking...");
SimpleVector dir=Interact2D.reproject2D3DWS(_camera, _frameBuffer, x, y).normalize();
Object[] res=_world.calcMinDistanceAndObject3D(_camera.getPosition(), dir, 10000 /*or whatever*/);
if (res[1] != null){
Log.d("Jpct-Engine","Picking réussi.");
return res[1];
}
return null;
}
_cameraMat.setDump(matrix);
_camera.setBack(_cameraMat);
Log.d("JpctEngine", "Valeur camera : " + _camera.getPosition().x + ";" + _camera.getPosition().y +
";" + _camera.getPosition().z);
Log.d("JpctEngine", "Valeur camera : " + _camera.getXAxis().x + ";" + _camera.getYAxis().x +
";" + _camera.getZAxis().x);
float x = matrix[12]; float y = matrix[13]; float z = matrix[14];
matrix[12] = matrix[13] = matrix[14] = 0;
_cameraMat.setDump(matrix);
_camera.setBack(_cameraMat);
_camera.setPosition(x, y, z);
Log.d("JpctEngine", "Valeur camera : " + _camera.getPosition().x + ";" + _camera.getPosition().y +
";" + _camera.getPosition().z);
Log.d("JpctEngine", "Valeur camera : " + _camera.getXAxis().x + ";" + _camera.getYAxis().x +
";" + _camera.getZAxis().x);
Page created in 0.031 seconds with 13 queries.