Class ShooterProjectileType.ProjectileShape
java.lang.Object
com.flarerobotics.lib.control.shooter.data.ShooterProjectileType.ProjectileShape
- Direct Known Subclasses:
ShooterProjectileType.ProjectileShape.CuboidHollowThin
,ShooterProjectileType.ProjectileShape.CuboidSolid
,ShooterProjectileType.ProjectileShape.CylinderHollowThick
,ShooterProjectileType.ProjectileShape.CylinderHollowThin
,ShooterProjectileType.ProjectileShape.CylinderSolid
,ShooterProjectileType.ProjectileShape.Ring
,ShooterProjectileType.ProjectileShape.SphereHollowThick
,ShooterProjectileType.ProjectileShape.SphereHollowThin
,ShooterProjectileType.ProjectileShape.SphereSolid
- Enclosing class:
- ShooterProjectileType
Represents various projectile shapes with moment of inertia calculations. All moments are
calculated about central axes through center of mass.
For clarification and X-Y-Z axes orientation, check out the wikipedia page https://en.wikipedia.org/wiki/List_of_moments_of_inertia.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Thin-walled hollow cuboid.static class
Solid cuboid.static class
Thick-walled hollow cylinder.static class
Thin-walled hollow cylinder.static class
Solid cylinder.static class
Ring (thin circular loop).static class
Thick-walled hollow sphere.static class
Thin-walled hollow sphere.static class
Solid sphere. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProjectileShape
public ProjectileShape()
-
-
Method Details
-
inertiaX
public abstract double inertiaX()Calculates moment of inertia about X-axis.- Returns:
- Moment of inertia about X-axis in kg*m^2.
-
inertiaY
public abstract double inertiaY()Calculates moment of inertia about Y-axis.- Returns:
- Moment of inertia about Y-axis in kg*m^2.
-
inertiaZ
public abstract double inertiaZ()Calculates moment of inertia about Z-axis.- Returns:
- Moment of inertia about Z-axis in kg*m^2.
-