Blame |
Last modification |
View Log
| RSS feed
package com.gebauz.bauzoid.math.collisionx;
import com.gebauz.bauzoid.graphics.spritex.Sprite;
import com.gebauz.bauzoid.math.Line2;
import com.gebauz.bauzoid.math.Matrix4;
import com.gebauz.bauzoid.math.Vector2;
public abstract class BaseShapeElement
{
// Constants========================================================================================
// Embedded Types===================================================================================
// Fields===========================================================================================
// Methods==========================================================================================
public BaseShapeElement
()
{
}
public abstract boolean isInside
(float x,
float y
);
/** Returns true if the shape intersects with this shape element.
* @param shape The shape tested against.
* @param transform Transformation matrix that brings this shape element's points into shape's space.
*/
public abstract boolean intersects
(Shape shape, Matrix4 transform
);
/** Returns true if the shape intersects with this shape element. Returns a displacement vector
* that specifies by how much this shape element needs to be displaced in order to become non-colliding.
* @param shape The shape tested against.
* @param transform Transformation matrix that brings this shape element's points into shape's space.
*/
public abstract boolean intersects
(Shape shape, Matrix4 transform, Vector2 displaceResult
);
public abstract boolean intersectsLine
(Line2 line
);
public abstract void debugRender
(Sprite sprite
);
// Getters/Setters==================================================================================
}