/** * @param height * The height to set. */ public void setHeight(final double height) { this.height = height; recreateBuffers(); }
/** * @param height * The height to set. */ public void setHeight(final double height) { this.height = height; recreateBuffers(); }
/** * Creates a new Cylinder. By default its center is the origin. Usually, a higher sample number creates a better * looking cylinder, but at the cost of more vertex information. <br> * If the cylinder is closed the texture is split into axisSamples parts: top most and bottom most part is used for * top and bottom of the cylinder, rest of the texture for the cylinder wall. The middle of the top is mapped to * texture coordinates (0.5, 1), bottom to (0.5, 0). Thus you need a suited distorted texture. * * @param name * The name of this Cylinder. * @param axisSamples * Number of triangle samples along the axis. * @param radialSamples * Number of triangle samples along the radial. * @param radius * The radius of the cylinder. * @param height * The cylinder's height. */ public Capsule(final String name, final int axisSamples, final int radialSamples, final int sphereSamples, final double radius, final double height) { super(name); this.axisSamples = axisSamples; this.sphereSamples = sphereSamples; this.radialSamples = radialSamples; this.radius = radius; this.height = height; recreateBuffers(); }
/** * Creates a new Cylinder. By default its center is the origin. Usually, a higher sample number creates a better * looking cylinder, but at the cost of more vertex information. <br> * If the cylinder is closed the texture is split into axisSamples parts: top most and bottom most part is used for * top and bottom of the cylinder, rest of the texture for the cylinder wall. The middle of the top is mapped to * texture coordinates (0.5, 1), bottom to (0.5, 0). Thus you need a suited distorted texture. * * @param name * The name of this Cylinder. * @param axisSamples * Number of triangle samples along the axis. * @param radialSamples * Number of triangle samples along the radial. * @param radius * The radius of the cylinder. * @param height * The cylinder's height. */ public Capsule(final String name, final int axisSamples, final int radialSamples, final int sphereSamples, final double radius, final double height) { super(name); this.axisSamples = axisSamples; this.sphereSamples = sphereSamples; this.radialSamples = radialSamples; this.radius = radius; this.height = height; recreateBuffers(); }