Package physics.collision.shape
Class Line
java.lang.Object
physics.collision.shape.PrimitiveShape
physics.collision.shape.Line
The shape implementation of a line.
- Since:
- 19.06.2021
- Author:
- Juyas
-
Field Summary
Fields inherited from class physics.collision.shape.PrimitiveShape
absoluteCentroid, absolutes, boundingSphere, faces, relativeCentroid, relatives, vertices
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector2f
supportPoint
(org.joml.Vector2f v) According to GJKSM this method is supposed to calculate the point of the shape, that is most in direction of v.Methods inherited from class physics.collision.shape.PrimitiveShape
adjust, boundingSphere, centroid, faces, getAbsolutePoints, init, initSphere, position, rotateShape, setPosition, setPosition, type, vertices
-
Constructor Details
-
Line
public Line(org.joml.Vector2f relativeA, org.joml.Vector2f relativeB)
-
-
Method Details
-
supportPoint
public org.joml.Vector2f supportPoint(org.joml.Vector2f v) Description copied from class:PrimitiveShape
According to GJKSM this method is supposed to calculate the point of the shape, that is most in direction of v. The general rule is, the more primitive the shape is, the more efficient this method can be. This method may be described as max{v*x,x element of Shape} for any complex shape.- Overrides:
supportPoint
in classPrimitiveShape
- Parameters:
v
- the direction- Returns:
- the point of the shape that is most in the direction of v
-