/** * Constructs a sphere. All geometry data buffers are updated automatically. Both zSamples and radialSamples * increase the quality of the generated sphere. * * @param name * Name of the sphere. * @param center * Center of the sphere. * @param zSamples * The number of samples along the Z. * @param radialSamples * The number of samples along the radial. * @param radius * The radius of the sphere. */ public Sphere(final String name, final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius) { super(name); setData(center, zSamples, radialSamples, radius); }
/** * @param textureMode * The textureMode to set. */ public void setTextureMode(final TextureMode textureMode) { _textureMode = textureMode; setGeometryData(); setIndexData(); }
/** * Set the color of the joint object used in skeleton drawing. * * @param color * the new color to use for skeleton joints. */ public static void setJointColor(final ReadOnlyColorRGBA color) { SkeletalDebugger.joint.setSolidColor(color); } }
/** * Draw a single Joint using the given world-space joint transform. * * @param jntTransform * our joint transform * @param scene * @param renderer * the Renderer to draw with. */ private static void drawJoint(final Transform jntTransform, final Spatial scene, final Renderer renderer) { final BoundingVolume vol = scene.getWorldBound(); double size = 1.0; if (vol != null) { SkeletalDebugger.measureSphere.setCenter(vol.getCenter()); SkeletalDebugger.measureSphere.setRadius(0); SkeletalDebugger.measureSphere.mergeLocal(vol); size = SkeletalDebugger.BONE_RATIO * SkeletalDebugger.measureSphere.getRadius(); } scene.getWorldTransform().multiply(jntTransform, SkeletalDebugger.spTransform); SkeletalDebugger.spTransform.getMatrix().scale(new Vector3(size, size, size), SkeletalDebugger.spMatrix); SkeletalDebugger.spTransform.setRotation(SkeletalDebugger.spMatrix); SkeletalDebugger.joint.setWorldTransform(SkeletalDebugger.spTransform); SkeletalDebugger.joint.draw(renderer); }
public static void setBoundsColor(final ReadOnlyColorRGBA color) { boundingBox.setDefaultColor(color); boundingOB.setDefaultColor(color); boundingSphere.setDefaultColor(color); }
/** * Draw a single Joint using the given world-space joint transform. * * @param jntTransform * our joint transform * @param scene * @param renderer * the Renderer to draw with. */ private static void drawJoint(final Transform jntTransform, final Spatial scene, final Renderer renderer) { final BoundingVolume vol = scene.getWorldBound(); double size = 1.0; if (vol != null) { SkeletalDebugger.measureSphere.setCenter(vol.getCenter()); SkeletalDebugger.measureSphere.setRadius(0); SkeletalDebugger.measureSphere.mergeLocal(vol); size = SkeletalDebugger.BONE_RATIO * SkeletalDebugger.measureSphere.getRadius(); } scene.getWorldTransform().multiply(jntTransform, SkeletalDebugger.spTransform); SkeletalDebugger.spTransform.getMatrix().scale(new Vector3(size, size, size), SkeletalDebugger.spMatrix); SkeletalDebugger.spTransform.setRotation(SkeletalDebugger.spMatrix); SkeletalDebugger.joint.setWorldTransform(SkeletalDebugger.spTransform); SkeletalDebugger.joint.draw(renderer); }
public static void setBoundsColor(final ReadOnlyColorRGBA color) { boundingBox.setDefaultColor(color); boundingOB.setDefaultColor(color); boundingSphere.setDefaultColor(color); }
/** * @param textureMode * The textureMode to set. */ public void setTextureMode(final TextureMode textureMode) { _textureMode = textureMode; setGeometryData(); setIndexData(); }
/** * Constructs a sphere. All geometry data buffers are updated automatically. Both zSamples and radialSamples * increase the quality of the generated sphere. * * @param name * Name of the sphere. * @param center * Center of the sphere. * @param zSamples * The number of samples along the Z. * @param radialSamples * The number of samples along the radial. * @param radius * The radius of the sphere. */ public Sphere(final String name, final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius) { super(name); setData(center, zSamples, radialSamples, radius); }
/** * Set the color of the joint object used in skeleton drawing. * * @param color * the new color to use for skeleton joints. */ public static void setJointColor(final ReadOnlyColorRGBA color) { SkeletalDebugger.joint.setSolidColor(color); } }
/** * * @param viewInside * if true, the normals are inverted to point into the sphere so that the face is oriented for a viewer * inside the sphere. Default is false (for outside viewing) */ public void setViewFromInside(final boolean viewInside) { if (viewInside != _viewInside) { _viewInside = viewInside; setGeometryData(); setIndexData(); } }
/** * Constructs a sphere. All geometry data buffers are updated automatically. Both zSamples and radialSamples * increase the quality of the generated sphere. * * @param name * Name of the sphere. * @param center * Center of the sphere. * @param zSamples * The number of samples along the Z. * @param radialSamples * The number of samples along the radial. * @param radius * The radius of the sphere. * @param textureMode * the mode to use when setting uv coordinates for this Sphere. */ public Sphere(final String name, final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius, final TextureMode textureMode) { super(name); _textureMode = textureMode; setData(center, zSamples, radialSamples, radius); }
/** * * @param viewInside * if true, the normals are inverted to point into the sphere so that the face is oriented for a viewer * inside the sphere. Default is false (for outside viewing) */ public void setViewFromInside(final boolean viewInside) { if (viewInside != _viewInside) { _viewInside = viewInside; setGeometryData(); setIndexData(); } }
/** * Constructs a sphere. All geometry data buffers are updated automatically. Both zSamples and radialSamples * increase the quality of the generated sphere. * * @param name * Name of the sphere. * @param center * Center of the sphere. * @param zSamples * The number of samples along the Z. * @param radialSamples * The number of samples along the radial. * @param radius * The radius of the sphere. * @param textureMode * the mode to use when setting uv coordinates for this Sphere. */ public Sphere(final String name, final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius, final TextureMode textureMode) { super(name); _textureMode = textureMode; setData(center, zSamples, radialSamples, radius); }
/** * Changes the information of the sphere into the given values. * * @param center * The new center of the sphere. * @param zSamples * The new number of zSamples of the sphere. * @param radialSamples * The new number of radial samples of the sphere. * @param radius * The new radius of the sphere. */ public void setData(final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius) { _center.set(center); _zSamples = zSamples; _radialSamples = radialSamples; _radius = radius; setGeometryData(); setIndexData(); }
/** * Changes the information of the sphere into the given values. * * @param center * The new center of the sphere. * @param zSamples * The new number of zSamples of the sphere. * @param radialSamples * The new number of radial samples of the sphere. * @param radius * The new radius of the sphere. */ public void setData(final ReadOnlyVector3 center, final int zSamples, final int radialSamples, final double radius) { _center.set(center); _zSamples = zSamples; _radialSamples = radialSamples; _radius = radius; setGeometryData(); setIndexData(); }