Package org.dyn4j.geometry
The main focus of this package are Convex
Shape
s.
The classes implementing the Convex
interface can be used in collision
detection.
Current supported convex shapes:
Circle
Polygon
an arbitrary convex polygonRectangle
Triangle
Slice
a piece of a circleEllipse
HalfEllipse
Segment
special case shape; take care when using this class
Shape
s, particularly Ellipse
and
HalfEllipse
are not compatible with all collision detection algorithms.
To create more Shape
types extend the AbstractShape
class
and implement the Convex
interface to allow participation in collision detection.
All shapes can be constructed using their respective constructors or via the Geometry
class. The Shape
constructors do not duplicate the input information whereas the
Geometry
class methods do. The Geometry
class methods can
also place the newly created shape at the origin for easier manipulation.
While the Shape
classes allow for some manipulation, but it's not recommend to do so
after creation, except for the rotate and translate methods.
Vectors, points and vertices are all represented by the Vector2
class.
- Since:
- 1.0.0
- Version:
- 3.2.0
- Author:
- William Bittle
-
Interface Summary Interface Description Convex Rotatable Interface representing an object that can be rotated.Shape Represents a geometricShape
.Shiftable Represents an object that can be shifted in the x and y plane.Transformable Represents an object that is bothRotatable
andTranslatable
.Translatable Represents an object that can be translated or moved in the x-y plane.Wound Represents a shape that is defined by vertices with line segment connections with counter-clockwise winding. -
Class Summary Class Description AABB Implementation of an Axis-Align Bounding Box.AbstractShape Base implementation of theShape
interface.Capsule Circle EdgeFeature Ellipse Feature Represents an indexed feature of aShape
.Geometry Contains static methods to perform standard geometric operations.HalfEllipse Interval Represents a one dimensional numericInterval
.Link This class is a specialization of theSegment
class that provides smooth sliding across a chain of line segments.Mass RepresentsMass
data for an object about a given point.Matrix22 Represents a 2x2 Matrix.Matrix33 Represents a 3x3 Matrix.PointFeature Polygon Ray Implementation of a ray.Rectangle RobustGeometry This class provides geometric routines that have guarantees about some properties of their floating point results and operations.Rotation This class represents a rotation (in 2D space).Segment Slice Transform Represents a transformation matrix.Triangle Vector2 This class represents a vector or point in 2D space.Vector3 This class represents a vector or point in 3D space. -
Enum Summary Enum Description MassType Enumeration for specialMass
types.