java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.DebugRenderer
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
DebugRendererRecorder
Visualization for debugging purposes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
drawArrow
(RVec3Arg from, RVec3Arg to, ConstColor color, float size) Draw the specified 3-D arrow.void
drawBox
(ConstAaBox box, ConstColor color) Draw the specified axis-aligned 3-D box.void
drawBox
(ConstAaBox box, ConstColor color, ECastShadow castShadow) Draw the specified axis-aligned 3-D box.void
drawBox
(ConstAaBox box, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified axis-aligned 3-D box.void
drawBox
(RMat44Arg transform, ConstAaBox box, ConstColor color) Draw the specified 3-D box.void
drawBox
(RMat44Arg transform, ConstAaBox box, ConstColor color, ECastShadow castShadow) Draw the specified 3-D box.void
drawBox
(RMat44Arg transform, ConstAaBox box, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified 3-D box.void
drawCapsule
(RMat44Arg transform, float halfHeight, float radius, ConstColor color) Draw the specified capsule.void
drawCapsule
(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified capsule.void
drawCapsule
(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified capsule.void
drawCoordinateSystem
(RMat44Arg transform) Draw the specified 3-D coordinate axes.void
drawCoordinateSystem
(RMat44Arg transform, float size) Draw the specified 3-D coordinate axes.void
drawCylinder
(RMat44Arg transform, float halfHeight, float radius, ConstColor color) Draw the specified cylinder.void
drawCylinder
(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified cylinder.void
drawCylinder
(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified cylinder.void
drawLine
(RVec3Arg from, RVec3Arg to, ConstColor color) Draw the specified 3-D line.void
drawMarker
(RVec3Arg location, ConstColor color, float size) Draw a marker at the specified location.void
drawPlane
(RVec3Arg location, Vec3Arg normal, ConstColor color, float size) Draw the specified plane.void
drawSphere
(RVec3Arg location, float radius, ConstColor color) Draw the specified sphere.void
drawSphere
(RVec3Arg location, float radius, ConstColor color, ECastShadow castShadow) Draw the specified sphere.void
drawSphere
(RVec3Arg location, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified sphere.void
drawText3D
(RVec3Arg location, String text) Draw the specified 3-D text.void
drawText3D
(RVec3Arg location, String text, ConstColor color) Draw the specified 3-D text.void
drawText3D
(RVec3Arg location, String text, ConstColor color, float height) Draw the specified 3-D text.void
drawTriangle
(RVec3Arg v1, RVec3Arg v2, RVec3Arg v3, ConstColor color) Draw the specified 3-D triangle.void
drawWireBox
(ConstAaBox box, ConstColor color) Draw a wire-frame of the specified axis-aligned box.void
drawWireBox
(ConstOrientedBox box, ConstColor color) Draw a wire-frame of the specified 3-D box.void
drawWireBox
(RMat44Arg transform, ConstAaBox box, ConstColor color) Draw a wire frame of the specified 3-D box.void
drawWirePolygon
(RMat44Arg transform, VertexArray face, ConstColor color) Draw the outline of the specified polygon.void
drawWirePolygon
(RMat44Arg transform, VertexArray face, ConstColor color, float arrowSize) Draw the outline of the specified polygon.void
drawWireSphere
(RVec3Arg location, float radius, ConstColor color) Draw a wire frame of the specified sphere.void
drawWireSphere
(RVec3Arg location, float radius, ConstColor color, int level) Draw a wire frame of the specified sphere.void
drawWireTriangle
(RVec3Arg v1, RVec3Arg v2, RVec3Arg v3, ConstColor color) Draw a wire frame of the specified 3-D triangle.void
drawWireUnitSphere
(RMat44Arg transform, ConstColor color) Draw a wire frame of the specified unit sphere.void
drawWireUnitSphere
(RMat44Arg transform, ConstColor color, int level) Draw a wire frame of the specified unit sphere.void
Notify that the current frame is complete.static DebugRenderer
Access the instance from a static context.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
drawArrow
Draw the specified 3-D arrow.- Parameters:
from
- the desired starting point (not null, unaffected)to
- the desired ending point (not null, unaffected)color
- the desired color (not null, unaffected)size
- the desired size
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)drawMode
- the desired draw mode (not null, default=Solid)
-
drawBox
Draw the specified 3-D box.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawBox
Draw the specified 3-D box.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)
-
drawBox
public void drawBox(RMat44Arg transform, ConstAaBox box, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified 3-D box.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)drawMode
- the desired draw mode (not null, default=Solid)
-
drawCapsule
Draw the specified capsule.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half the desired height of the cylindrical portionradius
- the desired radius of the capsulecolor
- the desired color (not null, unaffected)
-
drawCapsule
public void drawCapsule(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified capsule.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half the desired height of the cylindrical portionradius
- the desired radius of the capsulecolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)
-
drawCapsule
public void drawCapsule(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified capsule.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half the desired height of the cylindrical portionradius
- the desired radius of the capsulecolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)drawMode
- the desired draw mode (not null, default=Solid)
-
drawCoordinateSystem
Draw the specified 3-D coordinate axes.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)
-
drawCoordinateSystem
Draw the specified 3-D coordinate axes.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)size
- the desired size (default=1)
-
drawCylinder
Draw the specified cylinder.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half of the desired heightradius
- the desired radiuscolor
- the desired color (not null, unaffected)
-
drawCylinder
public void drawCylinder(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified cylinder.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half of the desired heightradius
- the desired radiuscolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)
-
drawCylinder
public void drawCylinder(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified cylinder.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)halfHeight
- half of the desired heightradius
- the desired radiuscolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)drawMode
- the desired draw mode (not null, default=Solid)
-
drawLine
Draw the specified 3-D line.- Parameters:
from
- the desired first endpoint (not null, unaffected)to
- the desired 2nd endpoint (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawMarker
Draw a marker at the specified location.- Parameters:
location
- the desired location (not null, unaffected)color
- the desired color (not null, unaffected)size
- the desired size
-
drawPlane
Draw the specified plane.- Parameters:
location
- the location of a point through which the plane passes (not null, unaffected)normal
- a direction normal to the plane's surface (not null, unaffected)color
- the desired color (not null, unaffected)size
- the desired size
-
drawSphere
Draw the specified sphere.- Parameters:
location
- the location of the sphere's center (not null, unaffected)radius
- the desired radiuscolor
- the desired color (not null, unaffected)
-
drawSphere
Draw the specified sphere.- Parameters:
location
- the location of the sphere's center (not null, unaffected)radius
- the desired radiuscolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)
-
drawSphere
public void drawSphere(RVec3Arg location, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified sphere.- Parameters:
location
- the location of the sphere's center (not null, unaffected)radius
- the desired radiuscolor
- the desired color (not null, unaffected)castShadow
- the desired shadow mode (not null, default=On)drawMode
- the desired draw mode (not null, default=Solid)
-
drawText3D
Draw the specified 3-D text.- Parameters:
location
- the location of the text (not null, unaffected)text
- the text to display (not null)
-
drawText3D
Draw the specified 3-D text.- Parameters:
location
- the location of the text (not null, unaffected)text
- the text to display (not null)color
- the desired text color (not null, unaffected, default=sWhite)
-
drawText3D
Draw the specified 3-D text.- Parameters:
location
- the location of the text (not null, unaffected)text
- the text to display (not null)color
- the desired text color (not null, unaffected, default=sWhite)height
- the desired text height (default=0.5)
-
drawTriangle
Draw the specified 3-D triangle.- Parameters:
v1
- the location of the first vertex (not null, unaffected)v2
- the location of the 2nd vertex (not null, unaffected)v3
- the location of the 3rd vertex (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWireBox
Draw a wire-frame of the specified axis-aligned box.- Parameters:
box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWireBox
Draw a wire-frame of the specified 3-D box.- Parameters:
box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWireBox
Draw a wire frame of the specified 3-D box.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)box
- the desired geometric properties (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWirePolygon
Draw the outline of the specified polygon.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)face
- the vertex coordinates (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWirePolygon
public void drawWirePolygon(RMat44Arg transform, VertexArray face, ConstColor color, float arrowSize) Draw the outline of the specified polygon.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)face
- the vertex coordinates (not null, unaffected)color
- the desired color (not null, unaffected)arrowSize
- the desired size for arrows (default=0)
-
drawWireSphere
Draw a wire frame of the specified sphere.- Parameters:
location
- the location of the sphere's center (not null, unaffected)radius
- the desired radiuscolor
- the desired color (not null, unaffected)
-
drawWireSphere
Draw a wire frame of the specified sphere.- Parameters:
location
- the location of the sphere's center (not null, unaffected)radius
- the desired radiuscolor
- the desired color (not null, unaffected)level
- the desired level of detail (default=3)
-
drawWireTriangle
Draw a wire frame of the specified 3-D triangle.- Parameters:
v1
- the location of the first vertex (not null, unaffected)v2
- the location of the 2nd vertex (not null, unaffected)v3
- the location of the 3rd vertex (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWireUnitSphere
Draw a wire frame of the specified unit sphere.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)color
- the desired color (not null, unaffected)
-
drawWireUnitSphere
Draw a wire frame of the specified unit sphere.- Parameters:
transform
- the desired coordinate transform (not null, unaffected)color
- the desired color (not null, unaffected)level
- the desired level of detail (default=3)
-
nextFrame
public void nextFrame()Notify that the current frame is complete. -
sInstance
Access the instance from a static context.- Returns:
- the pre-existing instance
-