Examples of applyMatrix()


Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        }

        {
            currMatrix.push();
            currMatrix.translate( camTarget );
            currMatrix.applyMatrix( Glm.matCast( orientation ) );
            currMatrix.rotateX( -90.0f );

            // Set the base color for this object.
            glUniform4f( baseColorUnif, 1.0f, 1.0f, 1.0f, 1.0f );
            glUniformMatrix4( modelToCameraMatrixUnif, false, currMatrix.top().fillAndFlipBuffer( mat4Buffer ) );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        glClearDepth( 1.0f );
        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

        MatrixStack currMatrix = new MatrixStack();
        currMatrix.translate( 0.0f, 0.0f, -200.0f );
        currMatrix.applyMatrix( Glm.matCast( orientation ) );

        glUseProgram( theProgram );

        currMatrix.scale( 3.0f, 3.0f, 3.0f );
        currMatrix.rotateX( -90.0f );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        glClearDepth( 1.0f );
        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

        MatrixStack currMatrix = new MatrixStack();
        currMatrix.translate( 0.0f, 0.0f, -200.0f );
        currMatrix.applyMatrix( Glm.matCast( orient.getOrient() ) );

        glUseProgram( theProgram );

        currMatrix.scale( 3.0f, 3.0f, 3.0f );
        currMatrix.rotateX( -90.0f );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        glClearColor( 0.8f, 0.8f, 0.8f, 1.0f );
        glClearDepth( 1.0f );
        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

        MatrixStack modelMatrix = new MatrixStack();
        modelMatrix.applyMatrix( viewPole.calcMatrix() );

        buildLights( modelMatrix.top() );

        nodes.get( 0 ).nodeSetOrient( Glm.rotate( new Quaternion( 1.0f ), 360.0f * timer.getAlpha(),
                new Vec3( 0.0f, 1.0f, 0.0f ) ) );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

            modelMatrix.pop();
        }

        {
            MatrixStack persMatrix = new MatrixStack();
            persMatrix.applyMatrix( new Mat4( new Mat3( persViewPole.calcMatrix() ) ) );
            persMatrix.perspective( 60.0f, displaySize.x / displaySize.y, zNear, zFar );

            ProjectionBlock projData = new ProjectionBlock();
            projData.cameraToClipMatrix = persMatrix.top();
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

            glBindBufferRange( GL_UNIFORM_BUFFER, materialBlockIndex, materialUniformBuffer,
                    currMaterial * materialOffset, MaterialBlock.SIZE );

            modelMatrix.push();

            modelMatrix.applyMatrix( objtPole.calcMatrix() );
            modelMatrix.scale( useInfinity ? 2.0f : 4.0f );

            Mat3 normMatrix = new Mat3( modelMatrix.top() );
            normMatrix = Glm.transpose( Glm.inverse( normMatrix ) );

View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        MatrixStack modelMatrix = new MatrixStack();

        final Mat4 worldToCamMat = Glm.lookAt( new Vec3( hOffset, 1.0f, -64.0f ),
                new Vec3( hOffset, -5.0f + vOffset, -44.0f ), new Vec3( 0.0f, 1.0f, 0.0f ) );

        modelMatrix.applyMatrix( worldToCamMat );

        glUseProgram( program.theProgram );
        glUniformMatrix4( program.modelToCameraMatrixUnif, false, modelMatrix.top().fillAndFlipBuffer( mat4Buffer ) );

        glActiveTexture( GL_TEXTURE0 + colorTexUnit );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

            // Render the Cylinder
            {
                modelMatrix.push();

                modelMatrix.applyMatrix( objtPole.calcMatrix() );

                if ( drawColoredCyl ) {
                    glUseProgram( vertexDiffuseColor.theProgram );
                    glUniformMatrix4( vertexDiffuseColor.modelToCameraMatrixUnif, false,
                            modelMatrix.top().fillAndFlipBuffer( mat4Buffer ) );
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

            // Render the Cylinder
            {
                modelMatrix.push();

                modelMatrix.applyMatrix( objtPole.calcMatrix() );

                if ( scaleCyl ) {
                    modelMatrix.scale( 1.0f, 1.0f, 0.2f );
                }
View Full Code Here

Examples of fcagnin.jglsdk.glutil.MatrixStack.applyMatrix()

        final Mat4 cameraMatrix = viewPole.calcMatrix();
        final Mat4 lightView = lightViewPole.calcMatrix();

        MatrixStack modelMatrix = new MatrixStack();
        modelMatrix.applyMatrix( cameraMatrix );

        buildLights( cameraMatrix );

        nodes.get( 0 ).nodeSetOrient( Glm.rotate( new Quaternion( 1.0f ), 360.0f * timer.getAlpha(),
                new Vec3( 0.0f, 1.0f, 0.0f ) ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.