当前位置: 首页>>代码示例>>Java>>正文


Java Matrix类代码示例

本文整理汇总了Java中com.watabou.glwrap.Matrix的典型用法代码示例。如果您正苦于以下问题:Java Matrix类的具体用法?Java Matrix怎么用?Java Matrix使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Matrix类属于com.watabou.glwrap包,在下文中一共展示了Matrix类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Camera

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
public Camera(int x, int y, int width, int height, float zoom) {

		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		this.zoom = zoom;

		screenWidth = (int) (width * zoom);
		screenHeight = (int) (height * zoom);

		scroll = new PointF();

		matrix = new float[16];
		Matrix.setIdentity(matrix);
	}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:17,代码来源:Camera.java

示例2: Camera

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
public Camera( int x, int y, int width, int height, float zoom ) {
	
	this.x = x;
	this.y = y;
	this.width = width;
	this.height = height;
	this.zoom = zoom;
	
	screenWidth = (int)(width * zoom);
	screenHeight = (int)(height * zoom);
	
	scroll = new PointF();
	
	matrix = new float[16];
	Matrix.setIdentity( matrix );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:17,代码来源:Camera.java

示例3: Camera

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
public Camera(int x, int y, int width, int height, float zoom)
{
    this.x = x;
    this.y = y;
    this.width = width;
    this.height = height;
    this.zoom = zoom;

    screenWidth = (int) (width * zoom);
    screenHeight = (int) (height * zoom);

    scroll = new PointF();

    matrix = new float[16];
    Matrix.setIdentity(matrix);
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:17,代码来源:Camera.java

示例4: Camera

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
public Camera(int x, int y, int width, int height, float zoom) {

        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        this.zoom = zoom;

        screenWidth = (int) (width * zoom);
        screenHeight = (int) (height * zoom);

        scroll = new PointF();

        matrix = new float[16];
        Matrix.setIdentity(matrix);
    }
 
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:17,代码来源:Camera.java

示例5: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity(matrix);
	Matrix.translate(matrix, x, y);
	Matrix.scale(matrix, scale.x, scale.y);
	Matrix.rotate(matrix, angle);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:9,代码来源:BitmapText.java

示例6: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix() {
	Matrix.setIdentity(matrix);
	Matrix.translate(matrix, x, y);
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate(matrix, origin.x, origin.y);
	if (angle != 0) {
		Matrix.rotate(matrix, angle);
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale(matrix, scale.x, scale.y);
	}
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate(matrix, -origin.x, -origin.y);
}
 
开发者ID:G2159687,项目名称:ESPD,代码行数:15,代码来源:Visual.java

示例7: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
@Override
protected void updateMatrix() {
	// "origin" field is ignored
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.scale( matrix, scale.x, scale.y );
	Matrix.rotate( matrix, angle );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:9,代码来源:BitmapText.java

示例8: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	if (origin.x != 0 || origin.y != 0)
		Matrix.translate( matrix, -origin.x, -origin.y );
}
 
开发者ID:mango-tree,项目名称:UNIST-pixel-dungeon,代码行数:15,代码来源:Visual.java

示例9: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
@Override
protected void updateMatrix()
{
    // "origin" field is ignored
    Matrix.setIdentity(matrix);
    Matrix.translate(matrix, x, y);
    Matrix.scale(matrix, scale.x, scale.y);
    Matrix.rotate(matrix, angle);
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:10,代码来源:BitmapText.java

示例10: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix()
{
    Matrix.setIdentity(matrix);
    Matrix.translate(matrix, x, y);
    Matrix.translate(matrix, origin.x, origin.y);
    if (angle != 0)
    {
        Matrix.rotate(matrix, angle);
    }
    if (scale.x != 1 || scale.y != 1)
    {
        Matrix.scale(matrix, scale.x, scale.y);
    }
    Matrix.translate(matrix, -origin.x, -origin.y);
}
 
开发者ID:kurtyu,项目名称:PixelDungeonTC,代码行数:16,代码来源:Visual.java

示例11: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	Matrix.translate(matrix, -origin.x, -origin.y);
}
 
开发者ID:ConsideredHamster,项目名称:YetAnotherPixelDungeon,代码行数:13,代码来源:Visual.java

示例12: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix() {
	Matrix.setIdentity( matrix );
	Matrix.translate( matrix, x, y );
	Matrix.translate( matrix, origin.x, origin.y );
	if (angle != 0) {
		Matrix.rotate( matrix, angle );
	}
	if (scale.x != 1 || scale.y != 1) {
		Matrix.scale( matrix, scale.x, scale.y );
	}
	Matrix.translate( matrix, -origin.x, -origin.y );
}
 
开发者ID:Sarius997,项目名称:Multiplayer-PD,代码行数:13,代码来源:Visual.java

示例13: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
@Override
protected void updateMatrix() {
    // "origin" field is ignored
    Matrix.setIdentity(matrix);
    Matrix.translate(matrix, x, y);
    Matrix.scale(matrix, scale.x, scale.y);
    Matrix.rotate(matrix, angle);
}
 
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:9,代码来源:BitmapText.java

示例14: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
protected void updateMatrix() {
    Matrix.setIdentity(matrix);
    Matrix.translate(matrix, x, y);
    Matrix.translate(matrix, origin.x, origin.y);
    if (angle != 0) {
        Matrix.rotate(matrix, angle);
    }
    if (scale.x != 1 || scale.y != 1) {
        Matrix.scale(matrix, scale.x, scale.y);
    }
    Matrix.translate(matrix, -origin.x, -origin.y);
}
 
开发者ID:skynet67,项目名称:pixel-dungeon-rebirth,代码行数:13,代码来源:Visual.java

示例15: updateMatrix

import com.watabou.glwrap.Matrix; //导入依赖的package包/类
@Override
protected void updateMatrix() {
	super.updateMatrix();
	Matrix.copy(matrix, shadowMatrix);
	Matrix.translate(shadowMatrix,
			(width() * (1f - shadowWidth)) / 2f,
			(height() * (1f - shadowHeight)) + shadowOffset);
	Matrix.scale(shadowMatrix, shadowWidth, shadowHeight);
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:10,代码来源:CharSprite.java


注:本文中的com.watabou.glwrap.Matrix类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。