DistortedCylinderShape

public class DistortedCylinderShape extends AbstractDistortedExtrusion

Class DistortedCylinderShape. Provides distortedcylindershape functionality for the Hytale server.

java.lang.Object > AbstractDistortedExtrusion > DistortedCylinderShape

Field Summary

x

final double x

Field x.

y

final double y

Field y.

z

final double z

Field z.

radiusY

final double radiusY

Field radiusY.

radiusXZ

final double radiusXZ

Field radiusXZ.

ny

final double ny

Field ny.

pitch

final double pitch

Field pitch.

comp

final double comp

Field comp.

scale

final double scale

Field scale.

Method Detail

DistortedCylinderShape

public public DistortedCylinderShape (@Nonnull final Vector3d o, @Nonnull final Vector3d v, final double startWidth, final double startHeight, final double midWidth, final double midHeight, final double endWidth, final double endHeight, final GeneralNoise.InterpolationFunction interpolation)

Method DistortedCylinderShape.

Parameters:
@Nonnull final Vector3d o
@Nonnull final Vector3d v
final double startWidth
final double startHeight
final double midWidth
final double midHeight
final double endWidth
final double endHeight
final GeneralNoise.InterpolationFunction interpolation

getStart

public Vector3d getStart ()

Method getStart.

getEnd

public Vector3d getEnd ()

Method getEnd.

getAnchor

public Vector3d getAnchor (@Nonnull final Vector3d vector, final double t, final double tv, final double th)

Method getAnchor.

Parameters:
@Nonnull final Vector3d vector
final double t
final double tv
final double th

getProjection

public double getProjection (final double x, final double z)

Method getProjection.

Parameters:
final double x
final double z

isValidProjection

public boolean isValidProjection (final double t)

Method isValidProjection.

Parameters:
final double t

getYAt

public double getYAt (final double t)

Method getYAt.

Parameters:
final double t

getWidthAt

public double getWidthAt (final double t)

Method getWidthAt.

Parameters:
final double t

getHeightAt

public double getHeightAt (final double t)

Method getHeightAt.

Parameters:
final double t

getDistanceSq

public double getDistanceSq (double x, double z, final double t)

Method getDistanceSq.

Parameters:
double x
double z
final double t

if

public else if (t >= 1.0)

Method if.

Parameters:
t >= 1.0

getHeightComponent

public double getHeightComponent (final double width, final double width2, final double dist2)

Method getHeightComponent.

Parameters:
final double width
final double width2
final double dist2

toString

public String toString ()

Method toString.

getCompensationFactor

static double getCompensationFactor (@Nonnull final Vector3d direction)

Method getCompensationFactor.

Parameters:
@Nonnull final Vector3d direction

getHeightCompensation

static double getHeightCompensation (final double factor)

Method getHeightCompensation.

Parameters:
final double factor

create

public DistortedShape create (@Nonnull final Vector3d origin, @Nonnull final Vector3d direction, final double length, final double startWidth, double startHeight, final double midWidth, double midHeight, final double endWidth, double endHeight, final GeneralNoise.InterpolationFunction interpolation)

Method create.

Parameters:
@Nonnull final Vector3d origin
@Nonnull final Vector3d direction
final double length
final double startWidth
double startHeight
final double midWidth
double midHeight
final double endWidth
double endHeight
final GeneralNoise.InterpolationFunction interpolation