Package hm.zelha.particlesfx.shapers
Class ParticleSphere
java.lang.Object
hm.zelha.particlesfx.shapers.parents.RotationHandler
hm.zelha.particlesfx.shapers.parents.ParticleShaper
hm.zelha.particlesfx.shapers.ParticleCircle
hm.zelha.particlesfx.shapers.ParticleSphere
- All Implemented Interfaces:
Shape
- Direct Known Subclasses:
ParticleSphereCSA
This class uses the Sunflower Seed Arrangement
to form a sphere, as opposed to
Using the sunflower seed arrangement uses almost the same processing power, but makes the sphere look much prettier and makes it so you don't have to worry about CircleFrequency.
however, using this makes it much harder to color the sphere with secondary particles, because the points are drawn pretty chaotically.
TLDR: Use this class if you just want a normal sphere or ellipsoid, otherwise use
ParticleSphereCSA which uses surface area and circumference.
Using the sunflower seed arrangement uses almost the same processing power, but makes the sphere look much prettier and makes it so you don't have to worry about CircleFrequency.
however, using this makes it much harder to color the sphere with secondary particles, because the points are drawn pretty chaotically.
TLDR: Use this class if you just want a normal sphere or ellipsoid, otherwise use
ParticleSphereCSA.-
Field Summary
FieldsFields inherited from class hm.zelha.particlesfx.shapers.ParticleCircle
limit, limitInverse, xRadius, zRadiusFields inherited from class hm.zelha.particlesfx.shapers.parents.ParticleShaper
animator, async, currentCount, delay, locationHelper, mechanics, overallCount, particle, particleFrequency, particlesPerDisplay, players, secondaryParticles, vectorHelperFields inherited from class hm.zelha.particlesfx.shapers.parents.RotationHandler
centroid, compounds, lastRotatedAround, locations, originalCentroid, origins, rhLocationHelper, rhRotHelper, rhVectorHelper, rot, rot2, rotHelper -
Constructor Summary
ConstructorsConstructorDescriptionParticleSphere(Particle particle, LocationSafe center, double radius) ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, double pitch, double yaw, double roll, int particleFrequency) ParticleSphere(Particle particle, LocationSafe center, double radius, double pitch, double yaw, double roll, int particleFrequency) ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int particleFrequency) ParticleSphere(Particle particle, LocationSafe center, double radius, int particleFrequency) -
Method Summary
Modifier and TypeMethodDescriptionclone()protected ParticleShapervoiddisplay()doublevoidscale(double x, double y, double z) Rescales this shape such that a shape with the xyz radiuses of 4, 3, 4, resized by 1.25, 1.25, 1.25, would have its radiuses become 5, 3.75, 5.setLimit(double limit) setLimitInverse(boolean limitInverse) voidsetYRadius(double yRadius) Methods inherited from class hm.zelha.particlesfx.shapers.ParticleCircle
getCenter, getLimit, getXRadius, getZRadius, isLimitInverse, setCenter, setXRadius, setZRadiusMethods inherited from class hm.zelha.particlesfx.shapers.parents.ParticleShaper
addMechanic, addParticle, addPlayer, addPlayer, applyMechanics, getCurrentParticle, getDelay, getMechanicAmount, getParticle, getParticleFrequency, getParticlesPerDisplay, getPlayerAmount, getPlayers, getSecondaryParticle, getSecondaryParticleAmount, hasPlayer, isAsync, isRunning, removeMechanic, removeParticle, removePlayer, removePlayer, setAsync, setDelay, setDisplayPosition, setParticle, setParticleFrequency, setParticlesPerDisplay, setWorld, start, stopMethods inherited from class hm.zelha.particlesfx.shapers.parents.RotationHandler
addCompound, calculateCentroid, face, faceAroundLocation, getAroundAxisPitch, getAroundAxisRoll, getAroundAxisYaw, getAroundPitch, getAroundRoll, getAroundRotationOrder, getAroundYaw, getAxisPitch, getAxisRoll, getAxisYaw, getClonedCenter, getDirection, getLocationAmount, getLocations, getLocationsList, getPitch, getRoll, getRotationOrder, getTotalDistance, getWorld, getYaw, move, move, move, recalculateIfNeeded, removeCompound, rotate, rotateAroundLocation, scale, setAroundAxisPitch, setAroundAxisRoll, setAroundAxisRotation, setAroundAxisYaw, setAroundPitch, setAroundRoll, setAroundRotation, setAroundRotationOrder, setAroundYaw, setAxisPitch, setAxisRoll, setAxisRotation, setAxisYaw, setPitch, setRoll, setRotation, setRotationOrder, setYawMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hm.zelha.particlesfx.shapers.parents.Shape
face, faceAroundLocation, getAroundAxisPitch, getAroundAxisRoll, getAroundAxisYaw, getAroundPitch, getAroundRoll, getAroundRotationOrder, getAroundYaw, getAxisPitch, getAxisRoll, getAxisYaw, getClonedCenter, getLocationAmount, getLocations, getPitch, getRoll, getRotationOrder, getTotalDistance, getWorld, getYaw, move, move, move, rotate, rotateAroundLocation, scale, setAroundAxisPitch, setAroundAxisRoll, setAroundAxisRotation, setAroundAxisYaw, setAroundPitch, setAroundRoll, setAroundRotation, setAroundRotationOrder, setAroundYaw, setAxisPitch, setAxisRoll, setAxisRotation, setAxisYaw, setPitch, setRoll, setRotation, setRotationOrder, setYaw
-
Field Details
-
yRadius
protected double yRadius
-
-
Constructor Details
-
ParticleSphere
public ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, double pitch, double yaw, double roll, int particleFrequency) - See Also:
-
ParticleSphere
public ParticleSphere(Particle particle, LocationSafe center, double radius, double pitch, double yaw, double roll, int particleFrequency) - See Also:
-
ParticleSphere
public ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int particleFrequency) - See Also:
-
ParticleSphere
- See Also:
-
ParticleSphere
- See Also:
-
-
Method Details
-
display
public void display()- Specified by:
displayin interfaceShape- Overrides:
displayin classParticleCircle
-
clone
- Specified by:
clonein interfaceShape- Overrides:
clonein classParticleCircle
-
cloneConstructor
- Overrides:
cloneConstructorin classParticleCircle
-
scale
public void scale(double x, double y, double z) Description copied from interface:ShapeRescales this shape such that a shape with the xyz radiuses of 4, 3, 4, resized by 1.25, 1.25, 1.25, would have its radiuses become 5, 3.75, 5.- Specified by:
scalein interfaceShape- Overrides:
scalein classParticleCircle- Parameters:
x- x scaley- y scalez- z scale
-
setLimit
- Overrides:
setLimitin classParticleCircle- Parameters:
limit- percentage of the shape that should generate, such that 0 would be the entire shape and 50 would be half the shape.
-
setLimitInverse
- Overrides:
setLimitInversein classParticleCircle- Parameters:
limitInverse- determines if the limit cuts off at the top or bottom. default false (top)
-
setYRadius
public void setYRadius(double yRadius) -
getYRadius
public double getYRadius()
-