|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.math.CatmullRomSpline
public class CatmullRomSpline
Encapsulates a catmull rom spline with n control points, n >= 4. For more information on this type of spline see http://www.mvps.org/directx/articles/catmull/.
Constructor Summary | |
---|---|
CatmullRomSpline()
|
Method Summary | |
---|---|
void |
add(Vector3 point)
Adds a new control point |
java.util.List<Vector3> |
getControlPoints()
|
java.util.List<Vector3> |
getPath(int numPoints)
Returns a path, between every two control points numPoints are generated and the control points themselves are added too. |
void |
getPath(Vector3[] points,
int numPoints)
Returns a path, between every two control points numPoints are generated and the control points themselves are added too. |
java.util.List<Vector3> |
getTangentNormals(int numPoints,
java.util.List<Vector3> up)
|
java.util.List<Vector3> |
getTangentNormals(int numPoints,
Vector3 up)
Returns the tangent's normals using the tangent and provided up vector doing a cross product. |
java.util.List<Vector3> |
getTangentNormals2D(int numPoints)
Returns all tangent's normals in 2D space for the points in a path. |
java.util.List<Vector3> |
getTangents(int numPoints)
Returns all tangents for the points in a path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CatmullRomSpline()
Method Detail |
---|
public void add(Vector3 point)
point
- the pointpublic java.util.List<Vector3> getControlPoints()
public java.util.List<Vector3> getPath(int numPoints)
numPoints
- number of points returned for a segment
public void getPath(Vector3[] points, int numPoints)
points
- the array of Vector3 instances to store the path innumPoints
- number of points returned for a segmentpublic java.util.List<Vector3> getTangents(int numPoints)
numPoints
- number of points returned for a segment
public java.util.List<Vector3> getTangentNormals2D(int numPoints)
numPoints
- number of points returned for a segment
public java.util.List<Vector3> getTangentNormals(int numPoints, Vector3 up)
numPoints
- number of points per segmentup
- up vector
public java.util.List<Vector3> getTangentNormals(int numPoints, java.util.List<Vector3> up)
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |