Class BigDoor
java.lang.Object
nl.pim16aap2.animatedarchitecture.structures.bigdoor.BigDoor
- All Implemented Interfaces:
IStructureComponent
Represents a Big Door structure component.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.IStructureComponent
IStructureComponent.LogHolder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateAnimationCycleDistance(IStructureConst structure) Calculate the animation cycle distance for this structure.static RectanglecalculateAnimationRange(double maxRadius, Cuboid cuboid) Calculates the animation range of a big door.calculateAnimationRange(IStructureConst structure) Calculate the animation range for this structure.protected booleanconstructAnimationComponent(IStructureConst structure, AnimationRequestData data) Creates a newIAnimationComponentfor the provided structure and data for this structure component.booleangetCycledOpenDirection(IStructureConst structure) Cycle the toggle direction.static doublegetMaxRadius(Cuboid cuboid, Vector3Di rotationPoint) Calculates the longest possible radius from the rotation point of a big door to another point that is still part of the big door.getPotentialNewCoordinates(IStructureConst structure) Finds the new minimum and maximum coordinates (represented by aCuboid) of this structure that would be the result of toggling it.inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.IStructureComponent
calculateAnimationTime, canMovePerpetually, canSkipAnimation, getCurrentToggleDirection, isNorthSouthAnimated
-
Constructor Details
-
BigDoor
public BigDoor()
-
-
Method Details
-
getCycledOpenDirection
Description copied from interface:IStructureComponentCycle the toggle direction.See
Structure.getCycledOpenDirection()for more information.- Specified by:
getCycledOpenDirectionin interfaceIStructureComponent- Parameters:
structure- The structure to get the cycled open direction for.- Returns:
- The 'next' toggle direction.
-
getPotentialNewCoordinates
Description copied from interface:IStructureComponentFinds the new minimum and maximum coordinates (represented by aCuboid) of this structure that would be the result of toggling it.- Specified by:
getPotentialNewCoordinatesin interfaceIStructureComponent- Parameters:
structure- The structure to calculate the animation range for.- Returns:
- The
Cuboidthat would represent the structure if it was toggled right now.
-
calculateAnimationCycleDistance
Description copied from interface:IStructureComponentCalculate the animation cycle distance for this structure.This method should not be called directly. Instead, use
Structure.getAnimationCycleDistance(). See the documentation for that method for more information.- Specified by:
calculateAnimationCycleDistancein interfaceIStructureComponent- Parameters:
structure- The structure to calculate the animation cycle distance for.- Returns:
- The distance traveled per animation cycle by the block that travels the furthest.
-
calculateAnimationRange
Description copied from interface:IStructureComponentCalculate the animation range for this structure.This method should not be called directly. Instead, use
Structure.getAnimationRange(). See the documentation for that method for more information.- Specified by:
calculateAnimationRangein interfaceIStructureComponent- Parameters:
structure- The structure to calculate the animation range for.- Returns:
- The animation range for this structure.
-
calculateAnimationRange
Calculates the animation range of a big door.- Parameters:
maxRadius- SeegetMaxRadius(Cuboid, Vector3Di).cuboid- The cuboid that describes this door.- Returns:
- The animation range.
-
getMaxRadius
Calculates the longest possible radius from the rotation point of a big door to another point that is still part of the big door.- Parameters:
cuboid- The cuboid that describes this door.rotationPoint- The rotation point of the door.- Returns:
- The radius between the rotation point of the door and the animated block furthest from it.
-
constructAnimationComponent
public IAnimationComponent constructAnimationComponent(IStructureConst structure, AnimationRequestData data) Description copied from interface:IStructureComponentCreates a newIAnimationComponentfor the provided structure and data for this structure component.- Specified by:
constructAnimationComponentin interfaceIStructureComponent- Parameters:
structure- The structure to calculate the animation range for.data- The data for the toggle request.- Returns:
- A new
Animatorfor this type of structure.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-