Class AnimationRegion
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.animation.AnimationRegion
Represents a region of animated blocks.
The region is created by creating a cuboid around the animated blocks, and then creating a marker block for each animated block. The marker blocks do not exist in the world and are only used to update the region during the animation.
-
Constructor Summary
ConstructorsConstructorDescriptionAnimationRegion(List<IAnimatedBlock> blocks, TriFunction<Integer, Integer, Integer, Float> radiusSupplier, TriFunction<Integer, Integer, Integer, RotatedPosition> finalPositionSupplier) Creates a new animation region. -
Method Summary
Modifier and TypeMethodDescriptionThe 8 marker blocks that represent the region of animated blocks as an unmodifiable list.Calculates the current region of the animation.The cuboid that represents the region of animated blocks at the start of the animation.
-
Constructor Details
-
AnimationRegion
public AnimationRegion(List<IAnimatedBlock> blocks, TriFunction<Integer, Integer, Integer, Float> radiusSupplier, TriFunction<Integer, Integer, Integer, RotatedPosition> finalPositionSupplier) Creates a new animation region.- Parameters:
blocks- The animated blocks that are part of the region. The marker blocks will be created by creating a cuboid around these blocks.radiusSupplier- The radius supplier. This is used to determine the radius of the marker blocks.finalPositionSupplier- The final position supplier. This is used to determine the final position of the marker blocks.
-
-
Method Details
-
getRegion
Calculates the current region of the animation.- Returns:
- The cuboid that represents the current region of the animation.
-
getMarkerBlocks
The 8 marker blocks that represent the region of animated blocks as an unmodifiable list.These blocks are simplified versions of the animated blocks, and are used to update the region during the animation. They have limited functionality.
-
getStartCuboid
The cuboid that represents the region of animated blocks at the start of the animation.
-