本文整理汇总了Java中com.vuforia.Matrix44F类的典型用法代码示例。如果您正苦于以下问题:Java Matrix44F类的具体用法?Java Matrix44F怎么用?Java Matrix44F使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Matrix44F类属于com.vuforia包,在下文中一共展示了Matrix44F类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Vec3FTransform
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F Vec3FTransform(Vec3F v, Matrix44F m)
{
float lambda;
lambda = m.getData()[12] * v.getData()[0] + m.getData()[13]
* v.getData()[1] + m.getData()[14] * v.getData()[2]
+ m.getData()[15];
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2] + m.getData()[3];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2] + m.getData()[7];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2]
+ m.getData()[11];
temp[0] /= lambda;
temp[1] /= lambda;
temp[2] /= lambda;
return new Vec3F(temp[0], temp[1], temp[2]);
}
示例2: Vec4FTransform
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec4F Vec4FTransform(Vec4F v, Matrix44F m)
{
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2] + m.getData()[3]
* v.getData()[3];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2] + m.getData()[7]
* v.getData()[3];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2]
+ m.getData()[11] * v.getData()[3];
temp[3] = m.getData()[12] * v.getData()[0] + m.getData()[13]
* v.getData()[1] + m.getData()[14] * v.getData()[2]
+ m.getData()[15] * v.getData()[3];
return new Vec4F(temp[0], temp[1], temp[2], temp[3]);
}
示例3: Matrix44FIdentity
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Matrix44F Matrix44FIdentity()
{
Matrix44F r = new Matrix44F();
for (int i = 0; i < 16; i++)
temp[i] = 0.0f;
temp[0] = 1.0f;
temp[5] = 1.0f;
temp[10] = 1.0f;
temp[15] = 1.0f;
r.setData(temp);
return r;
}
示例4: Vec3FTransform
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F Vec3FTransform(Vec3F v, Matrix44F m)
{
float lambda;
lambda = m.getData()[12] * v.getData()[0] + m.getData()[13]
* v.getData()[1] + m.getData()[14] * v.getData()[2]
+ m.getData()[15];
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2] + m.getData()[3];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2] + m.getData()[7];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2]
+ m.getData()[11];
temp[0] /= lambda;
temp[1] /= lambda;
temp[2] /= lambda;
return new Vec3F(temp[0], temp[1], temp[2]);
}
示例5: Vec4FTransform
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec4F Vec4FTransform(Vec4F v, Matrix44F m)
{
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2] + m.getData()[3]
* v.getData()[3];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2] + m.getData()[7]
* v.getData()[3];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2]
+ m.getData()[11] * v.getData()[3];
temp[3] = m.getData()[12] * v.getData()[0] + m.getData()[13]
* v.getData()[1] + m.getData()[14] * v.getData()[2]
+ m.getData()[15] * v.getData()[3];
return new Vec4F(temp[0], temp[1], temp[2], temp[3]);
}
示例6: Matrix44FIdentity
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Matrix44F Matrix44FIdentity()
{
Matrix44F r = new Matrix44F();
for (int i = 0; i < 16; i++)
temp[i] = 0.0f;
temp[0] = 1.0f;
temp[5] = 1.0f;
temp[10] = 1.0f;
temp[15] = 1.0f;
r.setData(temp);
return r;
}
示例7: Vec3FTransformNormal
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F Vec3FTransformNormal(Vec3F v, Matrix44F m)
{
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2];
return new Vec3F(temp[0], temp[1], temp[2]);
}
示例8: Matrix44FTranspose
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Matrix44F Matrix44FTranspose(Matrix44F m)
{
Matrix44F r = new Matrix44F();
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
temp[i * 4 + j] = m.getData()[i + 4 * j];
r.setData(temp);
return r;
}
示例9: Matrix44FDeterminate
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static float Matrix44FDeterminate(Matrix44F m)
{
return m.getData()[12] * m.getData()[9] * m.getData()[6]
* m.getData()[3] - m.getData()[8] * m.getData()[13]
* m.getData()[6] * m.getData()[3] - m.getData()[12]
* m.getData()[5] * m.getData()[10] * m.getData()[3]
+ m.getData()[4] * m.getData()[13] * m.getData()[10]
* m.getData()[3] + m.getData()[8] * m.getData()[5]
* m.getData()[14] * m.getData()[3] - m.getData()[4]
* m.getData()[9] * m.getData()[14] * m.getData()[3]
- m.getData()[12] * m.getData()[9] * m.getData()[2]
* m.getData()[7] + m.getData()[8] * m.getData()[13]
* m.getData()[2] * m.getData()[7] + m.getData()[12]
* m.getData()[1] * m.getData()[10] * m.getData()[7]
- m.getData()[0] * m.getData()[13] * m.getData()[10]
* m.getData()[7] - m.getData()[8] * m.getData()[1]
* m.getData()[14] * m.getData()[7] + m.getData()[0]
* m.getData()[9] * m.getData()[14] * m.getData()[7]
+ m.getData()[12] * m.getData()[5] * m.getData()[2]
* m.getData()[11] - m.getData()[4] * m.getData()[13]
* m.getData()[2] * m.getData()[11] - m.getData()[12]
* m.getData()[1] * m.getData()[6] * m.getData()[11]
+ m.getData()[0] * m.getData()[13] * m.getData()[6]
* m.getData()[11] + m.getData()[4] * m.getData()[1]
* m.getData()[14] * m.getData()[11] - m.getData()[0]
* m.getData()[5] * m.getData()[14] * m.getData()[11]
- m.getData()[8] * m.getData()[5] * m.getData()[2]
* m.getData()[15] + m.getData()[4] * m.getData()[9]
* m.getData()[2] * m.getData()[15] + m.getData()[8]
* m.getData()[1] * m.getData()[6] * m.getData()[15]
- m.getData()[0] * m.getData()[9] * m.getData()[6]
* m.getData()[15] - m.getData()[4] * m.getData()[1]
* m.getData()[10] * m.getData()[15] + m.getData()[0]
* m.getData()[5] * m.getData()[10] * m.getData()[15];
}
示例10: getPointToPlaneIntersection
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F getPointToPlaneIntersection(
Matrix44F inverseProjMatrix, Matrix44F modelViewMatrix,
float screenWidth, float screenHeight, Vec2F point, Vec3F planeCenter,
Vec3F planeNormal)
{
projectScreenPointToPlane(inverseProjMatrix, modelViewMatrix,
screenWidth, screenHeight, point, planeCenter, planeNormal);
return mIntersection;
}
示例11: getPointToPlaneLineStart
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F getPointToPlaneLineStart(Matrix44F inverseProjMatrix,
Matrix44F modelViewMatrix, float screenWidth, float screenHeight,
Vec2F point, Vec3F planeCenter, Vec3F planeNormal)
{
projectScreenPointToPlane(inverseProjMatrix, modelViewMatrix,
screenWidth, screenHeight, point, planeCenter, planeNormal);
return mLineStart;
}
示例12: getPointToPlaneLineEnd
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F getPointToPlaneLineEnd(Matrix44F inverseProjMatrix,
Matrix44F modelViewMatrix, float screenWidth, float screenHeight,
Vec2F point, Vec3F planeCenter, Vec3F planeNormal)
{
projectScreenPointToPlane(inverseProjMatrix, modelViewMatrix,
screenWidth, screenHeight, point, planeCenter, planeNormal);
return mLineEnd;
}
示例13: VideoPlaybackRenderer
import com.vuforia.Matrix44F; //导入依赖的package包/类
public VideoPlaybackRenderer(VideoPlayback activity,
SampleApplicationSession session)
{
mActivity = activity;
vuforiaAppSession = session;
// Create an array of the size of the number of targets we have
mVideoPlayerHelper = new VideoPlayerHelper[VideoPlayback.NUM_TARGETS];
mMovieName = new String[VideoPlayback.NUM_TARGETS];
mCanRequestType = new MEDIA_TYPE[VideoPlayback.NUM_TARGETS];
mSeekPosition = new int[VideoPlayback.NUM_TARGETS];
mShouldPlayImmediately = new boolean[VideoPlayback.NUM_TARGETS];
mLostTrackingSince = new long[VideoPlayback.NUM_TARGETS];
mLoadRequested = new boolean[VideoPlayback.NUM_TARGETS];
mTexCoordTransformationMatrix = new float[VideoPlayback.NUM_TARGETS][16];
// Initialize the arrays to default values
for (int i = 0; i < VideoPlayback.NUM_TARGETS; i++)
{
mVideoPlayerHelper[i] = null;
mMovieName[i] = "";
mCanRequestType[i] = MEDIA_TYPE.ON_TEXTURE_FULLSCREEN;
mSeekPosition[i] = 0;
mShouldPlayImmediately[i] = false;
mLostTrackingSince[i] = -1;
mLoadRequested[i] = false;
}
for (int i = 0; i < VideoPlayback.NUM_TARGETS; i++)
targetPositiveDimensions[i] = new Vec3F();
for (int i = 0; i < VideoPlayback.NUM_TARGETS; i++)
modelViewMatrix[i] = new Matrix44F();
}
示例14: Vec3FTransformNormal
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Vec3F Vec3FTransformNormal(Vec3F v, Matrix44F m)
{
temp[0] = m.getData()[0] * v.getData()[0] + m.getData()[1]
* v.getData()[1] + m.getData()[2] * v.getData()[2];
temp[1] = m.getData()[4] * v.getData()[0] + m.getData()[5]
* v.getData()[1] + m.getData()[6] * v.getData()[2];
temp[2] = m.getData()[8] * v.getData()[0] + m.getData()[9]
* v.getData()[1] + m.getData()[10] * v.getData()[2];
return new Vec3F(temp[0], temp[1], temp[2]);
}
示例15: Matrix44FTranspose
import com.vuforia.Matrix44F; //导入依赖的package包/类
public static Matrix44F Matrix44FTranspose(Matrix44F m)
{
Matrix44F r = new Matrix44F();
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
temp[i * 4 + j] = m.getData()[i + 4 * j];
r.setData(temp);
return r;
}