クラス BD1Manipulator
java.lang.Object
com.github.dabasan.xops.bd1.BD1Manipulator
public class BD1Manipulator extends Object
Manipulates a BD1 file.
- 作成者:
- Daba
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 BD1Manipulator()BD1Manipulator(String bd1_filename) -
メソッドの概要
修飾子とタイプ メソッド 説明 intGetBlockNum()Returns the number of blocks contained in the BD1 file.List<BD1Block>GetBlocks()Returns blocks.StringGetTextureFilename(int texture_id)Returns the texture filename associated with the texture ID.Map<Integer,String>GetTextureFilenames()Returns the texture filenames.voidInvertZ()Inverts z-axis.
This method is used to make a mirrored map.voidRescale(com.github.dabasan.basis.vector.Vector scale)Rescales every block.voidRotate(com.github.dabasan.basis.vector.Vector rotate)Rotates every block.voidSetBlocks(List<BD1Block> blocks)Sets blocks.voidSetMatrix(com.github.dabasan.basis.matrix.Matrix m)Transforms every block with a matrix.intSetTextureFilename(int texture_id, String texture_filename)Sets the texture filename associated with the texture ID.intSetTextureFilenames(Map<Integer,String> texture_filenames_map)Sets the texture filenames.voidTranslate(com.github.dabasan.basis.vector.Vector translate)Translates every block.intWriteAsBD1(String bd1_filename)Writes out data in a BD1 file.intWriteAsOBJ(String obj_filename)Writes out data in an OBJ file.
-
コンストラクタの詳細
-
BD1Manipulator
- パラメータ:
bd1_filename- BD1 filename to load- 例外:
IOException
-
BD1Manipulator
public BD1Manipulator()
-
-
メソッドの詳細
-
GetBlocks
Returns blocks.- 戻り値:
- Blocks
-
SetBlocks
Sets blocks.- パラメータ:
blocks- Blocks
-
GetBlockNum
public int GetBlockNum()Returns the number of blocks contained in the BD1 file.- 戻り値:
- Number of blocks
-
GetTextureFilename
Returns the texture filename associated with the texture ID.- パラメータ:
texture_id- Texture ID- 戻り値:
- Texture filename
-
GetTextureFilenames
Returns the texture filenames.- 戻り値:
- Texture filenames
-
SetTextureFilename
Sets the texture filename associated with the texture ID.- パラメータ:
texture_id- Texture IDtexture_filename- Texture filename- 戻り値:
- -1 on error and 0 on success
-
SetTextureFilenames
Sets the texture filenames.- パラメータ:
texture_filenames_map- Texture filenames- 戻り値:
- -1 on error and 0 on success
-
Translate
public void Translate(com.github.dabasan.basis.vector.Vector translate)Translates every block.- パラメータ:
translate- Translation vector
-
Rotate
public void Rotate(com.github.dabasan.basis.vector.Vector rotate)Rotates every block.- パラメータ:
rotate- Angles of rotation (radian)
-
Rescale
public void Rescale(com.github.dabasan.basis.vector.Vector scale)Rescales every block.- パラメータ:
scale- Scaling vector
-
SetMatrix
public void SetMatrix(com.github.dabasan.basis.matrix.Matrix m)Transforms every block with a matrix.- パラメータ:
m- Transformation matrix
-
InvertZ
public void InvertZ()Inverts z-axis.
This method is used to make a mirrored map. -
WriteAsBD1
Writes out data in a BD1 file.- パラメータ:
bd1_filename- Filename- 戻り値:
- -1 on error and 0 on success
-
WriteAsOBJ
Writes out data in an OBJ file.- パラメータ:
obj_filename- Filename- 戻り値:
- -1 on error and 0 on success
-