クラス BD1Manipulator

java.lang.Object
com.github.dabasan.xops.bd1.BD1Manipulator

public class BD1Manipulator
extends Object
Manipulates a BD1 file.
作成者:
Daba
  • コンストラクタの詳細

  • メソッドの詳細

    • GetBlocks

      public List<BD1Block> GetBlocks()
      Returns blocks.
      戻り値:
      Blocks
    • SetBlocks

      public void SetBlocks​(List<BD1Block> blocks)
      Sets blocks.
      パラメータ:
      blocks - Blocks
    • GetBlockNum

      public int GetBlockNum()
      Returns the number of blocks contained in the BD1 file.
      戻り値:
      Number of blocks
    • GetTextureFilename

      public String GetTextureFilename​(int texture_id)
      Returns the texture filename associated with the texture ID.
      パラメータ:
      texture_id - Texture ID
      戻り値:
      Texture filename
    • GetTextureFilenames

      public Map<Integer,​String> GetTextureFilenames()
      Returns the texture filenames.
      戻り値:
      Texture filenames
    • SetTextureFilename

      public int SetTextureFilename​(int texture_id, String texture_filename)
      Sets the texture filename associated with the texture ID.
      パラメータ:
      texture_id - Texture ID
      texture_filename - Texture filename
      戻り値:
      -1 on error and 0 on success
    • SetTextureFilenames

      public int SetTextureFilenames​(Map<Integer,​String> texture_filenames_map)
      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

      public int WriteAsBD1​(String bd1_filename)
      Writes out data in a BD1 file.
      パラメータ:
      bd1_filename - Filename
      戻り値:
      -1 on error and 0 on success
    • WriteAsOBJ

      public int WriteAsOBJ​(String obj_filename)
      Writes out data in an OBJ file.
      パラメータ:
      obj_filename - Filename
      戻り値:
      -1 on error and 0 on success