/** * @return The position at the center of the region */ public Vector3f center() { Vector3f result = min.toVector3f(); Vector3f halfSize = size.toVector3f(); halfSize.scale(0.5f); result.add(halfSize); return result; }
protected boolean checkDistance(Vector3f soundPosition) { Vector3f distance = new Vector3f(soundPosition); distance.sub(listenerPosition); return distance.lengthSquared() < MAX_DISTANCE_SQUARED; }
@Override public Vector2i copy(Vector2i value) { return new Vector2i(value); } }
/** * The default constructor will set the location to calculate the * distances from to {0, 0, 0}. */ public DistanceComparator() { origin = new Vector3f(); }
public MouseWheelEvent(Vector2i mousePosition, int wheelTurns, float delta) { super(delta); this.wheelTurns = wheelTurns; this.mousePosition.set(mousePosition); }
public BoneWeight(Vector3f position, float bias, int boneIndex) { this.position.set(position); this.bias = bias; this.boneIndex = boneIndex; }
/** * @return The smallest vector in the region */ public Vector3i min() { return new Vector3i(min); }
public CharacterStateEvent(CharacterStateEvent previous) { this.time = previous.time; this.position.set(previous.position); this.rotation.set(previous.rotation); this.mode = previous.mode; this.grounded = previous.grounded; this.velocity.set(previous.velocity); this.sequenceNumber = previous.sequenceNumber + 1; this.pitch = previous.pitch; this.yaw = previous.yaw; this.footstepDelta = previous.footstepDelta; this.climbDirection = previous.climbDirection; }
public EntryEvent(ChunkMonitorDisplay display, Vector3i pos, ChunkMonitorEntry entry) { super(display); this.entry = entry; this.pos = pos == null ? null : new Vector3i(pos); } }