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,DebugRendererSimple
Visualization for debugging purposes.
-
Method Summary
Modifier and TypeMethodDescriptioncreateTriangleBatch(FloatBuffer vertexBuffer, ConstIndexedTriangleNoMaterial[] triangles) Construct a batch of triangles that can be rendered efficiently.voiddrawArrow(RVec3Arg from, RVec3Arg to, ConstColor color, float size) Draw the specified 3-D arrow.voiddrawBox(ConstAaBox box, ConstColor color) Draw the specified axis-aligned 3-D box.voiddrawBox(ConstAaBox box, ConstColor color, ECastShadow castShadow) Draw the specified axis-aligned 3-D box.voiddrawBox(ConstAaBox box, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified axis-aligned 3-D box.voiddrawBox(RMat44Arg transform, ConstAaBox box, ConstColor color) Draw the specified 3-D box.voiddrawBox(RMat44Arg transform, ConstAaBox box, ConstColor color, ECastShadow castShadow) Draw the specified 3-D box.voiddrawBox(RMat44Arg transform, ConstAaBox box, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified 3-D box.voiddrawCapsule(RMat44Arg transform, float halfHeight, float radius, ConstColor color) Draw the specified capsule.voiddrawCapsule(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified capsule.voiddrawCapsule(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified capsule.voiddrawCoordinateSystem(RMat44Arg transform) Draw the specified 3-D coordinate axes.voiddrawCoordinateSystem(RMat44Arg transform, float size) Draw the specified 3-D coordinate axes.voiddrawCylinder(RMat44Arg transform, float halfHeight, float radius, ConstColor color) Draw the specified cylinder.voiddrawCylinder(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow) Draw the specified cylinder.voiddrawCylinder(RMat44Arg transform, float halfHeight, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified cylinder.voiddrawGeometry(RMat44Arg transform, ConstAaBox worldSpaceBounds, float lodScaleSq, ConstColor modelColor, GeometryRef geometry, ECullMode cullMode, ECastShadow castShadow, EDrawMode drawMode) Draw the specified geometry with the specified bounds and scaling.voiddrawGeometry(RMat44Arg transform, ConstColor modelColor, GeometryRef geometry, ECullMode cullMode, ECastShadow castShadow, EDrawMode drawMode) Draw the specified geometry.voiddrawLine(RVec3Arg from, RVec3Arg to, ConstColor color) Draw the specified 3-D line.voiddrawMarker(RVec3Arg location, ConstColor color, float size) Draw a marker at the specified location.voiddrawOpenCone(RVec3Arg top, Vec3Arg axis, Vec3Arg perpendicular, float halfAngle, float length, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified open cone.voiddrawPie(RVec3Arg center, float radius, Vec3Arg normal, Vec3Arg axis, float minAngle, float maxAngle, ConstColor color, ECastShadow castShadow) Draw the specified sector of a circle.voiddrawPlane(RVec3Arg location, Vec3Arg normal, ConstColor color, float size) Draw the specified plane.voiddrawSphere(RVec3Arg location, float radius, ConstColor color) Draw the specified sphere.voiddrawSphere(RVec3Arg location, float radius, ConstColor color, ECastShadow castShadow) Draw the specified sphere.voiddrawSphere(RVec3Arg location, float radius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified sphere.voiddrawSwingConeLimits(RMat44Arg transform, float swingYHalfAngle, float swingZHalfAngle, float edgeLength, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the rotation-limits cone of aSwingTwistConstraintPart.voiddrawSwingPyramidLimits(RMat44Arg transform, float minSwingYAngle, float maxSwingYAngle, float minSwingZAngle, float maxSwingZAngle, float edgeLength, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the rotation-limits pyramid of aSwingTwistConstraintPart.voiddrawTaperedCylinder(RMat44Arg transform, float top, float bottom, float topRadius, float bottomRadius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified tapered cylinder.voiddrawText3D(RVec3Arg location, String text) Draw the specified 3-D text.voiddrawText3D(RVec3Arg location, String text, ConstColor color) Draw the specified 3-D text.voiddrawText3D(RVec3Arg location, String text, ConstColor color, float height) Draw the specified 3-D text.voiddrawTriangle(RVec3Arg v1, RVec3Arg v2, RVec3Arg v3, ConstColor color) Draw the specified 3-D triangle.voiddrawUnitSphere(RMat44Arg transform, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified unit sphere.voiddrawWireBox(ConstAaBox box, ConstColor color) Draw a wire-frame of the specified axis-aligned box.voiddrawWireBox(ConstOrientedBox box, ConstColor color) Draw a wire-frame of the specified 3-D box.voiddrawWireBox(RMat44Arg transform, ConstAaBox box, ConstColor color) Draw a wire frame of the specified 3-D box.voiddrawWirePolygon(RMat44Arg transform, VertexArray face, ConstColor color) Draw the outline of the specified polygon.voiddrawWirePolygon(RMat44Arg transform, VertexArray face, ConstColor color, float arrowSize) Draw the outline of the specified polygon.voiddrawWireSphere(RVec3Arg location, float radius, ConstColor color) Draw a wire frame of the specified sphere.voiddrawWireSphere(RVec3Arg location, float radius, ConstColor color, int level) Draw a wire frame of the specified sphere.voiddrawWireTriangle(RVec3Arg v1, RVec3Arg v2, RVec3Arg v3, ConstColor color) Draw a wire frame of the specified 3-D triangle.voiddrawWireUnitSphere(RMat44Arg transform, ConstColor color) Draw a wire frame of the specified unit sphere.voiddrawWireUnitSphere(RMat44Arg transform, ConstColor color, int level) Draw a wire frame of the specified unit sphere.voidNotify that the current frame is complete.static DebugRendererAccess the instance from static contexts.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Method Details
-
createTriangleBatch
public Batch createTriangleBatch(FloatBuffer vertexBuffer, ConstIndexedTriangleNoMaterial[] triangles) Construct a batch of triangles that can be rendered efficiently.- Parameters:
vertexBuffer- the vertex positions (notnull, unaffected)triangles- the vertex indices of each triangle (notnull, unaffected)- Returns:
- a new JVM object with a new native object assigned
-
drawArrow
Draw the specified 3-D arrow.- Parameters:
from- the desired starting point (notnull, unaffected)to- the desired ending point (notnull, unaffected)color- the desired color (notnull, unaffected)size- the desired size
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)
-
drawBox
Draw the specified axis-aligned 3-D box.- Parameters:
box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawBox
Draw the specified 3-D box.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawBox
Draw the specified 3-D box.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, 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 (notnull, unaffected)box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawCapsule
Draw the specified capsule.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)halfHeight- half the desired height of the cylindrical portionradius- the desired radius of the capsulecolor- the desired color (notnull, 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 (notnull, unaffected)halfHeight- half the desired height of the cylindrical portionradius- the desired radius of the capsulecolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, 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 (notnull, unaffected)halfHeight- half the desired height of the cylindrical portionradius- the desired radius of the capsulecolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawCoordinateSystem
Draw the specified 3-D coordinate axes.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)
-
drawCoordinateSystem
Draw the specified 3-D coordinate axes.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)size- the desired size (default=1)
-
drawCylinder
Draw the specified cylinder.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)halfHeight- half of the desired heightradius- the desired radiuscolor- the desired color (notnull, 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 (notnull, unaffected)halfHeight- half of the desired heightradius- the desired radiuscolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, 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 (notnull, unaffected)halfHeight- half of the desired heightradius- the desired radiuscolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawGeometry
public void drawGeometry(RMat44Arg transform, ConstColor modelColor, GeometryRef geometry, ECullMode cullMode, ECastShadow castShadow, EDrawMode drawMode) Draw the specified geometry.- Parameters:
transform- to transform the geometry to world space (notnull, unaffected)modelColor- the desired color (notnull, unaffected)geometry- the geometry to draw (notnull, unaffected)cullMode- the desired culling mode for polygons (notnull)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawGeometry
public void drawGeometry(RMat44Arg transform, ConstAaBox worldSpaceBounds, float lodScaleSq, ConstColor modelColor, GeometryRef geometry, ECullMode cullMode, ECastShadow castShadow, EDrawMode drawMode) Draw the specified geometry with the specified bounds and scaling.- Parameters:
transform- to transform the geometry to world space (notnull, unaffected)worldSpaceBounds- the bounds of the region to render (notnull, unaffected)lodScaleSq- the square of the level-of-detail scalemodelColor- the desired color (notnull, unaffected)geometry- the geometry to draw (notnull, unaffected)cullMode- the desired culling mode for polygons (notnull)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawLine
Draw the specified 3-D line.- Parameters:
from- the desired first endpoint (notnull, unaffected)to- the desired 2nd endpoint (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawMarker
Draw a marker at the specified location.- Parameters:
location- the desired location (notnull, unaffected)color- the desired color (notnull, unaffected)size- the desired size
-
drawOpenCone
public void drawOpenCone(RVec3Arg top, Vec3Arg axis, Vec3Arg perpendicular, float halfAngle, float length, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified open cone.- Parameters:
top- the desired location of the cone's vertex (notnull, unaffected)axis- the desired offset of the center of the base, relative to the vertex (notnull, unaffected)perpendicular- a vector perpendicular toaxis(notnull, unaffected)halfAngle- the desired angle between the axis and the surface of the code (in radians)length- the desired length of the cone (in meters)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawPie
public void drawPie(RVec3Arg center, float radius, Vec3Arg normal, Vec3Arg axis, float minAngle, float maxAngle, ConstColor color, ECastShadow castShadow) Draw the specified sector of a circle.- Parameters:
center- the desired location of the circle's center (notnull, unaffected)radius- the desired radius of the circle (in meters)normal- a normal to the plane that contains the desired circle (not null, unaffected)axis- the desired zero-angle direction (notnull, unaffected)minAngle- the desired angle where the sector begins (in radians)maxAngle- the desired angle where the sector ends (in radians)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)
-
drawPlane
Draw the specified plane.- Parameters:
location- the location of a point through which the plane passes (notnull, unaffected)normal- a direction normal to the plane's surface (notnull, unaffected)color- the desired color (notnull, unaffected)size- the desired size
-
drawSphere
Draw the specified sphere.- Parameters:
location- the location of the sphere's center (notnull, unaffected)radius- the desired radiuscolor- the desired color (notnull, unaffected)
-
drawSphere
Draw the specified sphere.- Parameters:
location- the location of the sphere's center (notnull, unaffected)radius- the desired radiuscolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, 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 (notnull, unaffected)radius- the desired radiuscolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawSwingConeLimits
public void drawSwingConeLimits(RMat44Arg transform, float swingYHalfAngle, float swingZHalfAngle, float edgeLength, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the rotation-limits cone of aSwingTwistConstraintPart.- Parameters:
transform- the desired transform from constraint coordinates to system coordinates (notnull, unaffected)swingYHalfAngle- half the desired Y-axis swing-angle limit (in radians)swingZHalfAngle- half the desired Z-axis swing-angle limit (in radians)edgeLength- the desired length of the edges of the conecolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawSwingPyramidLimits
public void drawSwingPyramidLimits(RMat44Arg transform, float minSwingYAngle, float maxSwingYAngle, float minSwingZAngle, float maxSwingZAngle, float edgeLength, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the rotation-limits pyramid of aSwingTwistConstraintPart.- Parameters:
transform- the desired transform from constraint coordinates to system coordinates (notnull, unaffected)minSwingYAngle- the desired Y-axis swing-angle lower limit (in radians)maxSwingYAngle- the desired Y-axis swing-angle upper limit (in radians)minSwingZAngle- the desired Z-axis swing-angle lower limit (in radians)maxSwingZAngle- the desired Z-axis swing-angle upper limit (in radians)edgeLength- the desired length of the edges of the pyramidcolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawTaperedCylinder
public void drawTaperedCylinder(RMat44Arg transform, float top, float bottom, float topRadius, float bottomRadius, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified tapered cylinder.- Parameters:
transform- the desired transform from local coordinates to system coordinates (notnull, unaffected)top- the local Y coordinate of the center of the topbottom- the local Y coordinate of the center of the bottomtopRadius- the radius of the topbottomRadius- the radius of the bottomcolor- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawText3D
Draw the specified 3-D text. (native function: DrawText3D)- Parameters:
location- the location of the text (notnull, unaffected)text- the text to display (notnull)
-
drawText3D
Draw the specified 3-D text. (native function: DrawText3D)- Parameters:
location- the location of the text (notnull, unaffected)text- the text to display (notnull)color- the desired text color (notnull, unaffected, default=sWhite)
-
drawText3D
Draw the specified 3-D text. (native function: DrawText3D)- Parameters:
location- the location of the text (notnull, unaffected)text- the text to display (notnull)color- the desired text color (notnull, 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 (notnull, unaffected)v2- the location of the 2nd vertex (notnull, unaffected)v3- the location of the 3rd vertex (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawUnitSphere
public void drawUnitSphere(RMat44Arg transform, ConstColor color, ECastShadow castShadow, EDrawMode drawMode) Draw the specified unit sphere.- Parameters:
transform- the desired transform from local to system coordinates (notnull, unaffected)color- the desired color (notnull, unaffected)castShadow- the desired shadow mode (notnull, default=On)drawMode- the desired draw mode (notnull, default=Solid)
-
drawWireBox
Draw a wire-frame of the specified axis-aligned box.- Parameters:
box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawWireBox
Draw a wire-frame of the specified 3-D box.- Parameters:
box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawWireBox
Draw a wire frame of the specified 3-D box.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)box- the desired geometric properties (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawWirePolygon
Draw the outline of the specified polygon.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)face- the vertex coordinates (notnull, unaffected)color- the desired color (notnull, 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 (notnull, unaffected)face- the vertex coordinates (notnull, unaffected)color- the desired color (notnull, 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 (notnull, unaffected)radius- the desired radiuscolor- the desired color (notnull, unaffected)
-
drawWireSphere
Draw a wire frame of the specified sphere.- Parameters:
location- the location of the sphere's center (notnull, unaffected)radius- the desired radiuscolor- the desired color (notnull, 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 (notnull, unaffected)v2- the location of the 2nd vertex (notnull, unaffected)v3- the location of the 3rd vertex (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawWireUnitSphere
Draw a wire frame of the specified unit sphere.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)color- the desired color (notnull, unaffected)
-
drawWireUnitSphere
Draw a wire frame of the specified unit sphere.- Parameters:
transform- the desired coordinate transform (notnull, unaffected)color- the desired color (notnull, 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 static contexts.- Returns:
- the pre-existing instance
-