/**
 *
 */
package de.rico.editor.datamodel;

import de.rico.engine.enums.BoundingVolume;
import de.rico.engine.geometry.Point3D;

/**
 * This class represents a mesh in the editor|s data model.
 *
 * @author Frank Bruns
 */
public class MeshData
{
	private String filePath = null;

	private Point3D position = null;

	private Point3D rotation = null;

	private String name = null;

	private String tex = null;

	private boolean texRotate = false;

	private boolean texFlip = false;

	private boolean smooth = false;

	private boolean castShadow = false;

	private BoundingVolume volume = null;

	public MeshData(String path, String name, String tex, Point3D pos, Point3D rot,
			boolean rotate, boolean flip, boolean smooth, boolean shadow, BoundingVolume vol)
	{
		this.filePath = path;
		this.position = pos;
		this.name = name;
		this.tex = tex;
		this.texRotate = rotate;
		this.texFlip = flip;
		this.smooth = smooth;
		this.castShadow = shadow;
		this.volume = vol;
	}

	/**
	 * Returns the file path of the mesh file.
	 *
	 * @return file path to mesh file
	 */
	public String getFilePath()
	{
		return this.filePath;
	}

	/**
	 * Returns the name of the mesh
	 *
	 * @return name of the mesh
	 */
	public String getName()
	{
		return this.name;
	}

	/**
	 * Returns the path to the texture file
	 *
	 * @return path to the texture file
	 */
	public String getTexPath()
	{
		return this.tex;
	}

	/**
	 * Determines whether or not the texture needs to be rotated.
	 *
	 * @return texture needs to be rotated? --> true=yes, false=no
	 */
	public boolean getTexRot()
	{
		return this.texRotate;
	}

	/**
	 * Determines whether or not the texture needs to be flipped.
	 *
	 * @return texture needs to be flipped? --> true=yes, false=no
	 */
	public boolean getTexFlip()
	{
		return this.texFlip;
	}

	/**
	 * Returns the position of the mesh
	 *
	 * @return position of the mesh
	 */
	public Point3D getPosition()
	{
		return this.position;
	}

	/**
	 * Returns a tuple containing the three rotation values.
	 *
	 * @return a tuple of rotation values
	 */
	public Point3D getRotation()
	{
		return this.rotation;
	}

	/**
	 * Determines whether or not the mesh needs to be smoothed.
	 *
	 * @return mesh needs to be smoothed? --> true=yes, false=no
	 */
	public boolean getSmooth()
	{
		return this.smooth;
	}

	/**
	 * Determines whether or not the mesh is a shadow caster.
	 * @return mesh casts a shadow? --> true=yes, false=no
	 */
	public boolean isShadowCaster()
	{
		return this.castShadow;
	}

	/**
	 * Returns the type of the bounding volume of the mesh.
	 * @return bounding volume type
	 */
	public BoundingVolume getBoundingVolumeType()
	{
		return this.volume;
	}
}
