// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.npc.movement.steeringforces;

import com.hypixel.hytale.server.npc.movement.Steering;
import javax.annotation.Nonnull;
import com.hypixel.hytale.math.vector.Vector3d;

public abstract class SteeringForceWithTarget implements SteeringForce
{
    protected final Vector3d selfPosition;
    protected final Vector3d targetPosition;
    private Vector3d componentSelector;
    
    public SteeringForceWithTarget() {
        this.selfPosition = new Vector3d();
        this.targetPosition = new Vector3d();
    }
    
    @Nonnull
    public Vector3d getSelfPosition() {
        return this.selfPosition;
    }
    
    public void setSelfPosition(@Nonnull final Vector3d selfPosition) {
        this.selfPosition.assign(selfPosition);
    }
    
    @Nonnull
    public Vector3d getTargetPosition() {
        return this.targetPosition;
    }
    
    public void setTargetPosition(@Nonnull final Vector3d targetPosition) {
        this.targetPosition.assign(targetPosition);
    }
    
    public void setTargetPosition(final double x, final double y, final double z) {
        this.targetPosition.assign(x, y, z);
    }
    
    public void setPositions(@Nonnull final Vector3d self, @Nonnull final Vector3d target) {
        this.setSelfPosition(self);
        this.setTargetPosition(target);
    }
    
    public void setSelfPosition(final double x, final double y, final double z) {
        this.selfPosition.assign(x, y, z);
    }
    
    public void setComponentSelector(final Vector3d componentSelector) {
        this.componentSelector = componentSelector;
    }
    
    @Override
    public boolean compute(final Steering output) {
        this.selfPosition.scale(this.componentSelector);
        this.targetPosition.scale(this.componentSelector);
        return true;
    }
}
