コード例 #1
0
//	-----------------------------------------------------------
static int DoTexRotateLeft(int value)
{
	const auto uvcenter = compute_uv_side_center(Cursegp, Curside);
	//	Create a rotation matrix
	const auto rotmat = create_2d_rotation_matrix(-F1_0/value);

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}
コード例 #2
0
//	-----------------------------------------------------------
int	TexRotate90Degrees()
{
	const auto uvcenter = compute_uv_side_center(Cursegp, Curside);

	//	Create a rotation matrix
	const auto rotmat = create_2d_rotation_matrix(F1_0/4);

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}
コード例 #3
0
ファイル: texture.c プロジェクト: CDarrow/Spectator-JinX
//	-----------------------------------------------------------
int	TexRotate90Degrees()
{
	uvl	uvcenter;
	fix	rotmat[4];

	compute_uv_side_center(&uvcenter, Cursegp, Curside);

	//	Create a rotation matrix
	create_2d_rotation_matrix(rotmat, F1_0/4);

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}
コード例 #4
0
ファイル: texture.c プロジェクト: CDarrow/Spectator-JinX
//	-----------------------------------------------------------
int DoTexRotateLeft(int value)
{
	uvl	uvcenter;
	fix	rotmat[4];

	compute_uv_side_center(&uvcenter, Cursegp, Curside);

	//	Create a rotation matrix
	create_2d_rotation_matrix(rotmat, -F1_0/value);

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}
コード例 #5
0
//	-----------------------------------------------------------
int	TexFlipY()
{
	const auto uvcenter = compute_uv_side_center(Cursegp, Curside);
	array<fix, 4> rotmat;
	//	Create a rotation matrix
	rotmat[0] = 0xffff;
	rotmat[1] = 0;
	rotmat[2] = 0;
	rotmat[3] = -0xffff;

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}
コード例 #6
0
ファイル: texture.c プロジェクト: CDarrow/Spectator-JinX
//	-----------------------------------------------------------
int	TexFlipY()
{
	uvl	uvcenter;
	fix	rotmat[4];

	compute_uv_side_center(&uvcenter, Cursegp, Curside);

	//	Create a rotation matrix
	rotmat[0] = 0xffff;
	rotmat[1] = 0;
	rotmat[2] = 0;
	rotmat[3] = -0xffff;

	rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter);

 	Update_flags |= UF_WORLD_CHANGED;

	return	1;
}