public class RenderableUtils
extends java.lang.Object
Constructor and Description |
---|
RenderableUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
cloneRenderProps(Renderable r)
Sets the RenderProps of a Renderable object to a copy of its existing
RenderProps.
|
static void |
getBounds(IsRenderable r,
Point3d min,
Point3d max)
Computes the bounds for a Renderable.
|
static double |
getRadius(IsRenderable r)
Returns a "radius" for a Renderable.
|
static double |
getRadiusAndCenter(Point3d center,
IsRenderable r)
Returns a "radius" and a center for a Renderable.
|
static boolean |
isVisible(HasRenderProps renderable)
Returns true if a Renderable is visible.
|
static void |
updateBounds(Vector3d vmin,
Vector3d vmax,
float[] vals) |
static void |
updateFrameBounds(Vector3d vmin,
Vector3d vmax,
RigidTransform3d TFW,
double len)
Update bounds to account for the coordinate frame TFW drawn with length
len.
|
static void |
updateSphereBounds(Vector3d vmin,
Vector3d vmax,
Vector3d center,
double radius)
Update bounds to account for a sphere with a given width and radius.
|
public static boolean isVisible(HasRenderProps renderable)
public static void cloneRenderProps(Renderable r)
getRenderProps
returns null
),
then this method does nothing.
This routine is used to prevent side-effects when the existing RenderProps are shared by more than one object.
r
- Renderable objects whose RenderProps are to be cloned.public static double getRadius(IsRenderable r)
public static double getRadiusAndCenter(Point3d center, IsRenderable r)
public static void getBounds(IsRenderable r, Point3d min, Point3d max)
r
- Renderable to compute bounds formin
- minimum coordinate values (optional)max
- maximum coordinate values (optional)public static void updateSphereBounds(Vector3d vmin, Vector3d vmax, Vector3d center, double radius)
public static void updateFrameBounds(Vector3d vmin, Vector3d vmax, RigidTransform3d TFW, double len)