public class Capsule extends java.lang.Object implements IVolume<Capsule>
height + 2 * radius.| Constructor and Description |
|---|
Capsule(Vec3 bottom,
float radius,
float height) |
| Modifier and Type | Method and Description |
|---|---|
Capsule |
addScale(Capsule current,
Capsule next,
float t) |
Capsule |
clone() |
float |
closestDistance(Capsule c) |
Capsule |
concatenate(Capsule other)
Concatenate this volume with other in a new
IVolume object |
float |
distanceToPlane(Plane plane,
boolean min) |
static Capsule |
empty() |
Vec3 |
getBottom(Vec3 dst) |
Vec3 |
getCenter(Vec3 dst) |
float |
getHeight() |
float |
getRadius() |
Vec3 |
getTop(Vec3 dst) |
float |
getTotalHeight() |
float |
getVolume() |
boolean |
insideFrustum(Frustum frustum) |
Capsule |
interpolate(Capsule current,
Capsule next,
float t)
Interpolate
current and next and store result in this. |
IntersectTest |
intersectTest(Capsule c)
Collision test for sphere.
|
IntersectTest |
intersectTest(Frustum frustum)
Test the intersection between this
IVolume and the specified Frustum. |
IntersectTest |
intersectTest(Plane plane)
Test the intersection between this
IVolume and the specified Frustum. |
Vec3 |
limitInVolume(Vec3 dst,
Vec3 src)
Limit a point location in this volume.
|
Capsule |
set(Capsule s) |
void |
set(Vec3 center,
float radius,
float height) |
void |
setBottom(Vec3 src) |
void |
setHeight(float height) |
void |
setRadius(float radius) |
Capsule |
subtract(Capsule bv1,
Capsule bv2) |
java.lang.String |
toString() |
Capsule |
transform(Capsule bc,
Mat4x4 matrix) |
public Capsule(Vec3 bottom, float radius, float height)
public static Capsule empty()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final Capsule clone()
public final Capsule set(Capsule s)
set in interface IValueCopy<Capsule>public final float getVolume()
public final Capsule concatenate(Capsule other)
IVolumeIVolume objectconcatenate in interface IVolume<Capsule>other - a IVolumeVolumes.concatenate(IVolume, IVolume)public final Vec3 limitInVolume(Vec3 dst, Vec3 src)
limitInVolume in interface IVolume<Capsule>src - source pointdst - destination vector to store the resultpublic IntersectTest intersectTest(Capsule c)
intersectTest in interface IVolume<Capsule>c - a Capsule to test withpublic final float closestDistance(Capsule c)
public final Capsule interpolate(Capsule current, Capsule next, float t)
IInterpolablecurrent and next and store result in this.interpolate in interface IInterpolable<Capsule>interpolate in interface IData<Capsule>interpolate in interface IVolume<Capsule>current - a IVolumenext - a IVolumet - value in range [0;1]public final boolean insideFrustum(Frustum frustum)
insideFrustum in interface IVolume<Capsule>Frustum.public final IntersectTest intersectTest(Frustum frustum)
IVolumeIVolume and the specified Frustum.intersectTest in interface IVolume<Capsule>VolumeIntersection.Intersect if inside and intersect.VolumeIntersection.Inside if inside but not intersect.VolumeIntersection.Outisde if outside.IntersectTest,
IVolume.insideFrustum(Frustum)public final IntersectTest intersectTest(Plane plane)
IVolumeIVolume and the specified Frustum.intersectTest in interface IVolume<Capsule>VolumeIntersection.Intersect if inside and intersect.VolumeIntersection.Inside if inside but not intersect.VolumeIntersection.Outisde if outside.IntersectTest,
IVolume.insideFrustum(Frustum)public final float distanceToPlane(Plane plane, boolean min)
distanceToPlane in interface IVolume<Capsule>plane - a Planemin - true: minimum distancepublic final void set(Vec3 center, float radius, float height)
public final void setBottom(Vec3 src)
public final float getRadius()
public final void setRadius(float radius)
public final float getHeight()
public final void setHeight(float height)
public final float getTotalHeight()
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com