當前位置: 首頁>>代碼示例>>Java>>正文


Java Matrix44F類代碼示例

本文整理匯總了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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:22,代碼來源:SampleMath.java

示例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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:18,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:17,代碼來源:SampleMath.java

示例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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:22,代碼來源:SampleMath.java

示例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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:18,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:17,代碼來源:SampleMath.java

示例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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:12,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:11,代碼來源:SampleMath.java

示例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];
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:36,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:10,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:9,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaLibGDX,代碼行數:9,代碼來源:SampleMath.java

示例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();
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:36,代碼來源:VideoPlaybackRenderer.java

示例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]);
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:12,代碼來源:SampleMath.java

示例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;
}
 
開發者ID:daemontus,項目名稱:VuforiaTransparentVideo,代碼行數:11,代碼來源:SampleMath.java


注:本文中的com.vuforia.Matrix44F類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。