OSDN Git Service

!T - Adds Javadocs for generic maps, layers and objects
authorsiondream <david.saltares@gmail.com>
Tue, 12 Feb 2013 23:35:05 +0000 (23:35 +0000)
committersiondream <david.saltares@gmail.com>
Tue, 12 Feb 2013 23:35:05 +0000 (23:35 +0000)
!T - Improves Javadocs for Gleed module

13 files changed:
gdx/src/com/badlogic/gdx/maps/Map.java
gdx/src/com/badlogic/gdx/maps/MapLayer.java
gdx/src/com/badlogic/gdx/maps/MapLayers.java
gdx/src/com/badlogic/gdx/maps/MapObject.java
gdx/src/com/badlogic/gdx/maps/MapObjects.java
gdx/src/com/badlogic/gdx/maps/MapProperties.java
gdx/src/com/badlogic/gdx/maps/MapRenderer.java
gdx/src/com/badlogic/gdx/maps/gleed/GleedMapRenderer.java
gdx/src/com/badlogic/gdx/maps/objects/CircleMapObject.java
gdx/src/com/badlogic/gdx/maps/objects/PolygonMapObject.java
gdx/src/com/badlogic/gdx/maps/objects/PolylineMapObject.java
gdx/src/com/badlogic/gdx/maps/objects/RectangleMapObject.java
gdx/src/com/badlogic/gdx/maps/objects/TextureMapObject.java

index aa0ae7c..8cb34e1 100644 (file)
@@ -1,18 +1,47 @@
 package com.badlogic.gdx.maps;
 
+/**
+ * @brief Generic map
+ * 
+ * A Map instance contains the following data
+ * 
+ * <ul>
+ * <li> MapLayers<ul>
+ *     <li>MapLayer<ul>
+ *             <li>MapObjects<ul>
+ *                     <li>MapObject<ul>
+ *                             <li>Can be: TextureMapObject, CircleMapObject, RectangleMapObject, PolygonMapObject or PolylineMapObject</li>
+ *                             <li>MapProperties</li>
+ *                     </ul></li>
+ *             </ul></li>
+ *             <li>MapProperties</li>  
+ *     </ul></li>
+ * </ul></li>
+ * <li> MapProperties
+ * </ul>
+ */
 public class Map {
        
        private MapLayers layers = new MapLayers();
        private MapProperties properties = new MapProperties();
        
+       /**
+        * @return map's layers
+        */
        public MapLayers getLayers() {
                return layers;
        }
 
+       /**
+        * @return map's properties set
+        */
        public MapProperties getProperties() {
                return properties;
        }
        
+       /**
+        * Creates empty map
+        */
        public Map() {
                
        }
index b3a586f..fac4aa6 100644 (file)
@@ -1,5 +1,8 @@
 package com.badlogic.gdx.maps;
 
+/**
+ * @brief Map layer containing a set of objects and properties
+ */
 public class MapLayer {
 
        private String name = "";
@@ -8,38 +11,65 @@ public class MapLayer {
        private MapObjects objects = new MapObjects();
        private MapProperties properties = new MapProperties();
 
+       /**
+        * @return layer's name
+        */
        public String getName() {
                return name;
        }
        
+       /**
+        * @param name new name for the layer
+        */
        public void setName(String name) {
                this.name = name;
        }
        
+       /**
+        * @return layer's opacity
+        */
        public float getOpacity() {
                return opacity;
        }
 
+       /**
+        * @param opacity new opacity for the layer
+        */
        public void setOpacity(float opacity) {
                this.opacity = opacity;
        }
        
+       /**
+        * @return collection of objects contained in the layer
+        */
        public MapObjects getObjects() {
                return objects;
        }
        
+       /**
+        * @return whether the layer is visible or not
+        */
        public boolean getVisible() {
                return visible;
        }
 
+       /**
+        * @param visible toggles layer's visibility
+        */
        public void setVisible(boolean visible) {
                this.visible = visible;
        }
 
+       /**
+        * @return layer's set of properties
+        */
        public MapProperties getProperties() {
                return properties;
        }
        
+       /**
+        * Creates empty layer
+        */
        public MapLayer() {
                
        }
index b77aa95..98bc077 100644 (file)
@@ -4,18 +4,32 @@ import java.util.Iterator;
 
 import com.badlogic.gdx.utils.Array;
 
+/**
+ * @brief set of MapLayer instances
+ */
 public class MapLayers implements Iterable<MapLayer> {
        
        private Array<MapLayer> layers = new Array<MapLayer>();
 
+       /**
+        * Creates empty set of layers
+        */
        public MapLayers() {
        
        }
        
+       /**
+        * @param index
+        * @return layer at index
+        */
        public MapLayer getLayer(int index) {
                return layers.get(index);
        }
        
+       /**
+        * @param name
+        * @return matching layer if exists, otherwise, null
+        */
        public MapLayer getLayer(String name) {
                for (MapLayer layer : layers) {
                        if (name.equals(layer.getName())) {
@@ -25,22 +39,41 @@ public class MapLayers implements Iterable<MapLayer> {
                return null;
        }
        
+       /**
+        * @param layer layer to be added to the set
+        */
        public void addLayer(MapLayer layer) {
                this.layers.add(layer);
        }
        
+       /**
+        * @param index removes layer at index
+        */
        public void removeLayer(int index) {
                layers.removeIndex(index);
        }
        
+       /**
+        * @param layer layer to be removed
+        */
        public void removeLayer(MapLayer layer) {
                layers.removeValue(layer, true);
        }
 
+       /**
+        * @param type
+        * @return array with all the layers matching type
+        */
        public <T extends MapLayer> Array<T> getLayersByType(Class<T> type) {
                return getLayersByType(type, new Array<T>());   
        }
        
+       /**
+        * 
+        * @param type
+        * @param fill array to be filled with the matching layers
+        * @return array with all the layers matching type
+        */
        public <T extends MapLayer> Array<T> getLayersByType(Class<T> type, Array<T> fill) {
                fill.clear();
                for (MapLayer layer : layers) {
@@ -51,6 +84,9 @@ public class MapLayers implements Iterable<MapLayer> {
                return fill;
        }
 
+       /**
+        * @return iterator to set of layers
+        */
        @Override
        public Iterator<MapLayer> iterator() {
                return layers.iterator();
index da4bb2f..e0141d2 100644 (file)
@@ -2,6 +2,9 @@ package com.badlogic.gdx.maps;
 
 import com.badlogic.gdx.graphics.Color;
 
+/**
+ * @brief Generic Map entity
+ */
 public class MapObject {
 
        private String name = "";
@@ -10,44 +13,73 @@ public class MapObject {
        private MapProperties properties = new MapProperties();
        private Color color = Color.WHITE.cpy();
        
+       /**
+        * @return object's name
+        */
        public String getName() {
                return name;
        }
        
+       /**
+        * @param name new name for the object
+        */
        public void setName(String name) {
                this.name = name;
        }
        
+       /**
+        * @return object's color
+        */
        public Color getColor() {
                return color;
        }
        
+       /**
+        * @param color new color for the object
+        */
        public void setColor(Color color) {
                this.color = color;
        }
 
+       /**
+        * @return object's opacity
+        */
        public float getOpacity() {
                return opacity;
        }
 
+       /**
+        * @param opacity new opacity value for the object
+        */
        public void setOpacity(float opacity) {
                this.opacity = opacity;
        }
        
+       /**
+        * @return whether the object is visible or not
+        */
        public boolean getVisible() {
                return visible;
        }
 
+       /**
+        * @param visible toggles object's visibility
+        */
        public void setVisible(boolean visible) {
                this.visible = visible;
        }
        
+       /**
+        * @return object's properties set
+        */
        public MapProperties getProperties() {
                return properties;
        }
        
+       /**
+        * Creates empty object 
+        */
        public MapObject() {
                
        }
-       
 }
index 564f2fe..80ecce5 100644 (file)
@@ -4,17 +4,32 @@ import java.util.Iterator;
 
 import com.badlogic.gdx.utils.Array;
 
+/**
+ * @brief Collection of MapObject instances
+ */
 public class MapObjects implements Iterable<MapObject> {
 
        private Array<MapObject> objects;
 
+       /**
+        * Creates and empty set of MapObject instances
+        */
        public MapObjects() {
                objects = new Array<MapObject>();               
        }
+       
+       /**
+        * @param index
+        * @return MapObject at index
+        */
        public MapObject getObject(int index) {
                return objects.get(index);
        }
        
+       /**
+        * @param name
+        * @return name matching object, null if it´s not in the set
+        */
        public MapObject getObject(String name) {
                for (MapObject object : objects) {
                        if (name.equals(object.getName())) {
@@ -24,26 +39,47 @@ public class MapObjects implements Iterable<MapObject> {
                return null;
        }
        
+       /**
+        * @param object instance to be added to the collection
+        */
        public void addObject(MapObject object) {
                this.objects.add(object);
        }
        
+       /**
+        * @param index removes MapObject instance at index
+        */
        public void removeObject(int index) {
                objects.removeIndex(index);
        }
        
+       /**
+        * @param object instance to be removed
+        */
        public void removeObject(MapObject object) {
                objects.removeValue(object, true);
        }
        
+       /**
+        * @return number of objects in the collection
+        */
        public int getNumObjects() {
                return objects.size;
        }
 
+       /**
+        * @param type class of the objects we want to retrieve
+        * @return array filled with all the objects in the collection matching type
+        */
        public <T extends MapObject> Array<T> getObjectsByType(Class<T> type) {
                return getObjectsByType(type, new Array<T>());  
        }
        
+       /**
+        * @param type class of the objects we want to retrieve
+        * @param fill collection to put the returned objects in
+        * @return array filled with all the objects in the collection matching type
+        */
        public <T extends MapObject> Array<T> getObjectsByType(Class<T> type, Array<T> fill) {
                fill.clear();
                for (MapObject object : objects) {
@@ -54,6 +90,9 @@ public class MapObjects implements Iterable<MapObject> {
                return fill;
        }
 
+       /**
+        * @return iterator for the objects within the collection
+        */
        @Override
        public Iterator<MapObject> iterator() {
                return objects.iterator();
index 2811662..d3c7cf7 100644 (file)
@@ -6,22 +6,41 @@ import com.badlogic.gdx.graphics.Color;
 import com.badlogic.gdx.math.Vector2;
 import com.badlogic.gdx.utils.ObjectMap;
 
+/**
+ * @brief Set of string indexed values representing map elements' properties, allowing
+ * to retrieve, modify and add properties to the set.
+ */
 public class MapProperties {
 
        private ObjectMap<String, Object> properties;
        
+       /**
+        * Creates an empty properties set
+        */
        public MapProperties() {
                properties = new ObjectMap<String, Object>();
        }
 
+       /**
+        * @param key property name 
+        * @return true if and only if the property exists
+        */
        public boolean has(String key) {
                return properties.containsKey(key);
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists, otherwise, null
+        */
        public Object get(String key) {
                return properties.get(key);
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a boolean, otherwise, null
+        */
        public Boolean getAsBoolean(String key) {
                Object value = properties.get(key);
                try {
@@ -35,6 +54,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a byte, otherwise, null
+        */
        public Byte getAsByte(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -56,6 +79,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a double, otherwise, null
+        */
        public Double getAsDouble(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -77,6 +104,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a float, otherwise, null
+        */
        public Float getAsFloat(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -98,6 +129,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as an integer, otherwise, null
+        */
        public Integer getAsInteger(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -119,6 +154,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a long, otherwise, null
+        */
        public Long getAsLong(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -140,6 +179,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and can be interpreted as a short, otherwise, null
+        */
        public Short getAsShort(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -161,6 +204,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property as a string if it exists, otherwise, null
+        */
        public String getAsString(String key) {
                Object value = properties.get(key);
                if (value != null) {
@@ -170,6 +217,10 @@ public class MapProperties {
                }
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and it's a Vector2, otherwise, null
+        */
        public Vector2 getAsVector2(String key) {
                Object value = properties.get(key);
                
@@ -180,6 +231,10 @@ public class MapProperties {
                return null;
        }
        
+       /**
+        * @param key property name 
+        * @return the value for that property if it exists and it's a Color, otherwise, null
+        */
        public Color getAsColor(String key) {
                Object value = properties.get(key);
                
@@ -190,112 +245,217 @@ public class MapProperties {
                return null;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a boolean, otherwise, defaultValue
+        */
        public Boolean getAsBoolean(String key, Boolean defaultValue) {
                Boolean value = getAsBoolean(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a byte, otherwise, defaultValue
+        */
        public Byte getAsByte(String key, Byte defaultValue) {
                Byte value = getAsByte(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a double, otherwise, defaultValue
+        */
        public Double getAsDouble(String key, Double defaultValue) {
                Double value = getAsDouble(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a float, otherwise, defaultValue
+        */
        public Float getAsFloat(String key, Float defaultValue) {
                Float value = getAsFloat(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's an integer, otherwise, defaultValue
+        */
        public Integer getAsInteger(String key, Integer defaultValue) {
                Integer value = getAsInteger(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a long, otherwise, defaultValue
+        */
        public Long getAsLong(String key, Long defaultValue) {
                Long value = getAsLong(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a short, otherwise, defaultValue
+        */
        public Short getAsShort(String key, Short defaultValue) {
                Short value = getAsShort(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property as a string if it exists, otherwise, defaultValue
+        */
        public String getAsString(String key, String defaultValue) {
                String value = getAsString(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a Vector2, otherwise, defaultValue
+        */
        public Vector2 getAsVector2(String key, Vector2 defaultValue) {
                Vector2 value = getAsVector2(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name 
+        * @param defaultValue value to be returned in case of failure
+        * @return the value for that property if it exists and it's a Color, otherwise, defaultValue
+        */
        public Color getAsColor(String key, Color defaultValue) {
                Color value = getAsColor(key);
                return value == null? defaultValue : value;
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Boolean value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Byte value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Double value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Float value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Integer value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Long value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Short value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, String value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Vector2 value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param key property name
+        * @param value value to be inserted or modified (if it already existed)
+        */
        public void put(String key, Color value) {
                properties.put(key, value);
        }
        
+       /**
+        * @param properties set of properties to be added
+        */
        public void putAll(MapProperties properties) {
                this.properties.putAll(properties.properties);
        }
        
+       /**
+        * @param key property name to be removed
+        */
        public void remove(String key) {
                properties.remove(key);
        }
        
+       /**
+        * Removes all properties
+        */
        public void clear() {
                properties.clear();
        }
        
+       /**
+        * @return iterator for the property names
+        */
        public Iterator<String> getKeys() {
                return properties.keys();
        }
        
+       /**
+        * @return iterator to properties' values
+        */
        public Iterator<Object> getValues() {
                return properties.values();
        }
index 2f58114..c0a550a 100644 (file)
@@ -2,7 +2,9 @@ package com.badlogic.gdx.maps;
 
 import com.badlogic.gdx.math.Matrix4;
 
-
+/**
+ * @brief models a common way of rendering Map objects
+ */
 public interface MapRenderer {
 
        public void setProjectionMatrix(Matrix4 projectionMatrix);
index e66961f..6adf8ed 100644 (file)
@@ -57,6 +57,8 @@ public class GleedMapRenderer implements MapRenderer, Disposable {
        
        /**
         * @param map map data that will be used to render
+        * 
+        * Uses its own SpriteBatch
         */
        public GleedMapRenderer(Map map) {
                this(map, new SpriteBatch(), 1.0f);
index 86ae2b5..cdc4b71 100644 (file)
@@ -3,18 +3,34 @@ package com.badlogic.gdx.maps.objects;
 import com.badlogic.gdx.maps.MapObject;
 import com.badlogic.gdx.math.Circle;
 
+/**
+ * @brief represents circle shaped map objects
+ */
 public class CircleMapObject extends MapObject {
        
        private Circle circle;
        
+       /**
+        * @return circle shape
+        */
        public Circle getCircle() {
                return circle;
        }
        
+       /**
+        * Creates a circle map object at (0,0) with r=1.0
+        */
        public CircleMapObject() {
                this(0.0f, 0.0f, 1.0f);
        }
        
+       /**
+        * Creates circle map object
+        * 
+        * @param x
+        * @param y
+        * @param radius
+        */
        public CircleMapObject(float x, float y, float radius) {
                super();
                circle = new Circle(x, y, radius);
index 976d57a..e7ec6fb 100644 (file)
@@ -6,22 +6,37 @@ package com.badlogic.gdx.maps.objects;
 import com.badlogic.gdx.maps.MapObject;
 import com.badlogic.gdx.math.Polygon;
 
+/**
+ * @brief represents polygon map objects
+ */
 public class PolygonMapObject extends MapObject {
 
        private Polygon polygon;
        
+       /**
+        * @return polygon shape
+        */
        public Polygon getPolygon() {
                return polygon;
        }
        
+       /**
+        * @param polygon new object's polygon shape
+        */
        public void setPolygon(Polygon polygon) {
                this.polygon = polygon;
        }
        
+       /**
+        * Creates empty polygon map object
+        */
        public PolygonMapObject() {
                this(new float[0]);
        }
        
+       /**
+        * @param vertices polygon defining vertices (at least 3)
+        */
        public PolygonMapObject(float[] vertices) {
                super();
                polygon = new Polygon(vertices);
index 09f2843..816c753 100644 (file)
@@ -3,22 +3,37 @@ package com.badlogic.gdx.maps.objects;
 import com.badlogic.gdx.maps.MapObject;
 import com.badlogic.gdx.math.Polygon;
 
+/**
+ * @brief Represents polyline map objects
+ */
 public class PolylineMapObject extends MapObject {
 
        private Polygon polygon;
        
+       /**
+        * @return polygon shape
+        */
        public Polygon getPolygon() {
                return polygon;
        }
        
+       /**
+        * @param polygon new object's polygon shape
+        */
        public void setPolygon(Polygon polygon) {
                this.polygon = polygon;
        }
        
+       /**
+        * Creates empty polyline 
+        */
        public PolylineMapObject() {
                this(new float[0]);
        }
        
+       /**
+        * @param vertices polyline defining vertices (at least 3 because a polygon is used to represent it)
+        */
        public PolylineMapObject(float[] vertices) {
                super();
                polygon = new Polygon(vertices);
index f7e47d0..6f73e38 100644 (file)
@@ -3,18 +3,33 @@ package com.badlogic.gdx.maps.objects;
 import com.badlogic.gdx.maps.MapObject;
 import com.badlogic.gdx.math.Rectangle;
 
+/**
+ * @brief Represents rectangle shaped map object
+ */
 public class RectangleMapObject extends MapObject {
        
        private Rectangle rectangle;
        
+       /**
+        * @return rectangle shape
+        */
        public Rectangle getRectangle() {
                return rectangle;
        }
        
+       /**
+        * Creates a rectangle object which lower left corner is at (0, 0) with width=1 and height=1
+        */
        public RectangleMapObject() {
                this(0.0f, 0.0f, 1.0f, 1.0f);
        }
        
+       /**
+        * @param x
+        * @param y
+        * @param width
+        * @param height
+        */
        public RectangleMapObject(float x, float y, float width, float height) {
                super();
                rectangle = new Rectangle(x, y, width, height);
index 82b24f9..5f74e90 100644 (file)
@@ -3,6 +3,9 @@ package com.badlogic.gdx.maps.objects;
 import com.badlogic.gdx.graphics.g2d.TextureRegion;
 import com.badlogic.gdx.maps.MapObject;
 
+/**
+ * @brief Represents a map object containing a texture (region)
+ */
 public class TextureMapObject extends MapObject {
        
        private float x = 0.0f;
@@ -14,74 +17,130 @@ public class TextureMapObject extends MapObject {
        private float rotation = 0.0f;
        private TextureRegion textureRegion = null;
 
+       /**
+        * @return x axis coordinate
+        */
        public float getX() {
                return x;
        }
 
+       /**
+        * @param x new x axis coordinate
+        */
        public void setX(float x) {
                this.x = x;
        }
 
+       /**
+        * @return y axis coordinate
+        */
        public float getY() {
                return y;
        }
 
+       /**
+        * @param y new y axis coordinate
+        */
        public void setY(float y) {
                this.y = y;
        }
        
+       /**
+        * @return x axis origin
+        */
        public float getOriginX() {
                return originX;
        }
 
+       /**
+        * @param x new x axis origin
+        */
        public void setOriginX(float x) {
                this.originX = x;
        }
 
+       /**
+        * @return y axis origin
+        */
        public float getOriginY() {
                return originY;
        }
 
+       /**
+        * @param y new axis origin
+        */
        public void setOriginY(float y) {
                this.originY = y;
        }
        
+       /**
+        * @return x axis scale
+        */
        public float getScaleX() {
                return scaleX;
        }
 
+       /**
+        * @param x new x axis scale 
+        */
        public void setScaleX(float x) {
                this.scaleX = x;
        }
 
+       /**
+        * @return y axis scale
+        */
        public float getScaleY() {
                return scaleY;
        }
 
+       /**
+        * @param y new y axis scale
+        */
        public void setScaleY(float y) {
                this.scaleY = y;
        }
        
+       /**
+        * @return texture's rotation in radians
+        */
        public float getRotation() {
                return rotation;
        }
        
+       /**
+        * @param rotation new texture's rotation in radians
+        */
        public void setRotation(float rotation) {
                this.rotation = rotation;
        }
 
+       /**
+        * @return region
+        */
        public TextureRegion getTextureRegion() {
                return textureRegion;
        }
        
+       /**
+        * @param region new texture region
+        */
        public void setTextureRegion(TextureRegion region) {
                textureRegion = region;
        }
        
+       /**
+        * Creates empty texture map object
+        */
        public TextureMapObject() {
                this(null);
        }
        
+       /**
+        * Creates texture map object with the given region
+        * 
+        * @param textureRegion
+        */
        public TextureMapObject(TextureRegion textureRegion) {
                super();
                this.textureRegion = textureRegion;