Uses of Class
net.risingworld.api.utils.Vector3f
Packages that use Vector3f
Package
Description
-
Uses of Vector3f in net.risingworld.api
Methods in net.risingworld.api that return Vector3fModifier and TypeMethodDescriptionstatic Vector3fServer.getDefaultSpawnPosition()Gets the global default spawn position.Methods in net.risingworld.api with parameters of type Vector3fModifier and TypeMethodDescriptionstatic ConstructionElementWorld.createConstructionElement(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale) Spawns a new construction element (i.e a block) at a given position.static ConstructionElementWorld.createConstructionElement(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale, Vector3f surfaceOffset, Vector3f surfaceScale) Spawns a new construction element (i.e a block) at a given position.static ConstructionElementWorld.createConstructionElement(int shape, int texture, float textureScale, int color, Vector3i chunkPosition, Vector3i blockPosition, Quaternion rotation, Vector3f scale) Spawns a new construction element (i.e a block) at a given position.static ObjectElementWorld.createObject(int typeID, int variant, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale) Spawns a new object (e.g doors, furniture, lamps etc) at a given position.static PlantWorld.createPlant(int typeID, Vector3f worldPosition, Quaternion rotation, Vector3f scale) static WorldItemWorld.findNearestItem(short itemID, Vector3f position) static WorldItemWorld.findNearestItem(Vector3f position) Gets the world item which has the shortest distance to a position.static NpcWorld.findNearestNpc(short typeID, Vector3f position) Gets the npc (with a certain type id) which has the shortest distance to a world position.static NpcWorld.findNearestNpc(Vector3f position) Gets the npc (any npc) which has the shortest distance to a world position.static PlayerServer.findNearestPlayer(Vector3f position) Gets the player who has the shortest distance to a particular world position.static VehicleWorld.findNearestVehicle(short typeID, Vector3f position) Gets the vehicle (with a certain type id) which has the shortest distance to a world position.static VehicleWorld.findNearestVehicle(Vector3f position) Gets the vehicle (any vehicle) which has the shortest distance to a world position.static WorldItem[]World.getAllItemsInRange(Vector3f position, float range) Gets all world items (i.e items that were either spawned through thespawnItem()method or items that have been dropped by players) which are in range to a specific world position.static Npc[]World.getAllNpcsInRange(short typeID, Vector3f position, float range) Gets all npcs with the provided type ID which are in range to a specific world position.static Npc[]World.getAllNpcsInRange(Vector3f position, float range) Gets all npcs which are in range to a specific world position.static Vehicle[]World.getAllVehiclesInRange(Vector3f position, float range) Gets all vehicles which are in range to a specific world position.static voidServer.setDefaultSpawnPosition(Vector3f position) Sets the global default spawn position.static WorldItemWorld.spawnClothingItem(short clothingID, int variant, int stack, int color, long infoID, Vector3f position, Quaternion rotation, boolean physical) Spawns a global clothing item in the world, i.e an item which represents a garment.static WorldItemWorld.spawnConstructionItem(byte constructionID, int texture, int stack, int color, Vector3f position, Quaternion rotation, boolean physical) static WorldItemWorld.spawnItem(short itemID, int texture, int stack, Vector3f position, Quaternion rotation, boolean physical) Spawns an item in the world.static NpcWorld.spawnNpc(short typeID, int variant, Vector3f position, Quaternion rotation) Spawns a new npc in the world.static NpcWorld.spawnNpc(short typeID, int variant, Vector3f position, Quaternion rotation, boolean temporary) Spawns a new npc in the world.static NpcWorld.spawnNpc(short typeID, Vector3f position, Quaternion rotation) Spawns a new npc in the world.static WorldItemWorld.spawnObjectItem(short objectID, int variant, int stack, Vector3f position, Quaternion rotation, boolean physical) Spawns an object item in the world, i.e an item which represents an object.static VehicleWorld.spawnVehicle(short typeID, int constructionStage, int color, Vector3f position, Quaternion rotation) Spawns a new vehicle in the world.static voidWorld.triggerExplosion(Vector3f position, Quaternion rotation, Vector3f scale, float damageFactor) Creates an explosion in the world. -
Uses of Vector3f in net.risingworld.api.assets
Methods in net.risingworld.api.assets that return types with arguments of type Vector3fMethods in net.risingworld.api.assets with parameters of type Vector3fModifier and TypeMethodDescriptionvoidvoidMethod parameters in net.risingworld.api.assets with type arguments of type Vector3fModifier and TypeMethodDescriptionvoidMeshAsset.addNormals(ArrayList<Vector3f> normals) voidMeshAsset.addVertices(ArrayList<Vector3f> vertices) voidMeshAsset.setNormals(ArrayList<Vector3f> normals) voidMeshAsset.setVertices(ArrayList<Vector3f> vertices) -
Uses of Vector3f in net.risingworld.api.collider
Methods in net.risingworld.api.collider that return Vector3f -
Uses of Vector3f in net.risingworld.api.definitions
Fields in net.risingworld.api.definitions declared as Vector3fModifier and TypeFieldDescriptionObjects.ObjectDefinition.boundscaleScale factors which will be applied to the object bounds when placing it.Plants.PlantDefinition.boundscaleScale factors which will be applied to the bounds when placing it.Objects.ObjectDefinition.maxscaleMaximum xyz scale factorObjects.ObjectDefinition.minscaleMinimum xyz scale factorNpcs.NpcDefinition.NpcAttachmentInfo.offsetLocal offset of the attachment prefabItems.ItemDefinition.positionItem model offset when holding in handsItems.ItemDefinition.renderoffsetOptional offset when rendering the item (e.g as custom icon or for crafting preview)Objects.ObjectDefinition.renderoffsetOptional offset of the object when rendering the object iconObjects.ObjectDefinition.rendertransformOptional offset of the camera when rendering the object iconObjects.ObjectDefinition.resizefactorDetermines how much the element should be resized along x, y and z (0-1).Npcs.NpcDefinition.NpcAttachmentInfo.scaleLocal scale of the attachment prefabObjects.ObjectDefinition.selectorhelperoffsetIf there is a helper object, this is the local offset of itConstructions.ConstructionDefinition.startsizeInitial size of this element when first holding it in hands (relevant for selector)Items.ItemInfo.targetitemoffsetOnly for world items: Offset after performing the actionItems.ItemInfo.targetitemscaleOnly for world items: Scale after performing the action. -
Uses of Vector3f in net.risingworld.api.events.npc
Methods in net.risingworld.api.events.npc that return Vector3fModifier and TypeMethodDescriptionNpcDeathEvent.getDeathPosition()Gets the position where the npc died.NpcSpawnEvent.getPosition()Methods in net.risingworld.api.events.npc with parameters of type Vector3f -
Uses of Vector3f in net.risingworld.api.events.player
Methods in net.risingworld.api.events.player that return Vector3fModifier and TypeMethodDescriptionPlayerFishingBiteEvent.getBobberPosition()Gets the the bobber position (where the fish bite).PlayerFishingStartEvent.getBobberPosition()Gets the the bobber position (which should be in water).PlayerDeathEvent.getDeathPosition()Gets the position where the player died.PlayerCreateAreaEvent.getEndPosition()Gets the selected end position for the area.PlayerWeaponFireEvent.getFirePosition()PlayerElementHitEvent.getHitNormal()Deprecated, for removal: This API element is subject to removal in a future version.PlayerGameObjectHitEvent.getHitNormal()Gets the normal, i.e the normal of the surface that was hit (the direction in which the surface points).PlayerElementHitEvent.getHitPosition()Deprecated, for removal: This API element is subject to removal in a future version.PlayerGameObjectHitEvent.getHitPosition()Gets the coordinates where the element was hit exactly.PlayerHitNpcEvent.getHitPosition()Gets the coordinates where the npc was hit exactly.PlayerHitPlayerEvent.getHitPosition()Gets the coordinates where the player was hit exactly.PlayerEnterAreaEvent.getNewPlayerPosition()Gets the new player position (within the area).PlayerEnterChunkEvent.getNewPlayerPosition()Gets the new player position (within the new chunk).PlayerEnterSectorEvent.getNewPlayerPosition()Gets the new player position (within the new sector).PlayerEnterWorldPartEvent.getNewPlayerPosition()Gets the new player position (within the new world part).PlayerLeaveAreaEvent.getNewPlayerPosition()Gets the new player position (outside the area).PlayerSetSpawnPointEvent.getNewSpawnPosition()PlayerEnterAreaEvent.getOldPlayerPosition()Gets the previous player position (still outside the area).PlayerEnterChunkEvent.getOldPlayerPosition()Gets the previous player position (within the previous chunk).PlayerEnterSectorEvent.getOldPlayerPosition()Gets the previous player position (within the previous sector).PlayerEnterWorldPartEvent.getOldPlayerPosition()Gets the previous player position (within the previous world part).PlayerLeaveAreaEvent.getOldPlayerPosition()Gets the previous player position (still inside the area).PlayerSetSpawnPointEvent.getOldSpawnPosition()Gets the previously set spawn position for this type (if any was set).PlayerChangePositionEvent.getPosition()Gets the new position of the player.PlayerCreateBlueprintEvent.getPosition()Gets the target world position of the blueprint, or more precisely, the center position of the affected area.PlayerDropItemEvent.getPosition()Gets the item drop position.PlayerDropItemFromStorageEvent.getPosition()Gets the item drop position.PlayerRespawnEvent.getSpawnPosition()Gets the spawn position.PlayerSpawnEvent.getSpawnPosition()Gets the spawn coordinates (where the player will spawn this time).PlayerCreateAreaEvent.getStartPosition()Gets the selected start position for the area.PlayerTeleportEvent.getTargetPosition()Gets the new position of the player.PlayerDrinkWaterEvent.getWorldPosition()Gets the world position of the water source.Methods in net.risingworld.api.events.player with parameters of type Vector3fModifier and TypeMethodDescriptionvoidPlayerCreateAreaEvent.setEndPosition(Vector3f position) Sets a new end position for the area.voidPlayerWeaponFireEvent.setFirePosition(Vector3f position) voidPlayerHitNpcEvent.setHitPosition(Vector3f position) Sets the coordinates where the npc was hit exactly.voidPlayerHitPlayerEvent.setHitPosition(Vector3f position) Sets the coordinates where the player was hit exactly.voidPlayerSetSpawnPointEvent.setNewSpawnPosition(Vector3f position) voidPlayerChangePositionEvent.setPosition(Vector3f position) voidPlayerRespawnEvent.setSpawnPosition(Vector3f position) Sets the spawn position of the player.voidPlayerCreateAreaEvent.setStartPosition(Vector3f position) Sets a new start position for the area.voidPlayerTeleportEvent.setTargetPosition(Vector3f position) -
Uses of Vector3f in net.risingworld.api.events.player.world
Methods in net.risingworld.api.events.player.world that return Vector3fModifier and TypeMethodDescriptionPlayerHitConstructionEvent.getHitPosition()Gets the world coordinates where the construction element was hit exactly.PlayerHitObjectEvent.getHitPosition()Gets the world coordinates where the object was hit exactly.PlayerHitTerrainEvent.getHitPosition()Gets the world coordinates where the terrain was hit exactly.PlayerHitVegetationEvent.getHitPosition()Gets the world coordinates where the plant was hit exactly.PlayerHitWaterEvent.getHitPosition()Gets the coordinates where the water surface was hit exactly.PlayerEditConstructionEvent.getNewPosition()Gets the new world position of the construction element as a Vector3f.PlayerEditConstructionEvent.getNewSize()Gets the new size (x, y, z) of the construction element as a Vector3f.PlayerEditConstructionEvent.getNewSurfaceOffset()PlayerEditConstructionEvent.getNewSurfaceScale()PlayerPlaceBlueprintEvent.getPosition()Gets the world position of the blueprint center (i.e where the blueprint will be placed).PlayerPlaceObjectEvent.getPosition()Gets the world position of the object as a Vector3f.PlayerPlaceBlueprintEvent.getScale()Gets the scale factor of the blueprint.PlayerPlaceObjectEvent.getScale()Gets the scale factor of the object along the x, y and z axis.Methods in net.risingworld.api.events.player.world with parameters of type Vector3fModifier and TypeMethodDescriptionvoidPlayerPlaceBlueprintEvent.setPosition(Vector3f position) Changes the world position for the blueprint (i.e the position where the blueprint will be placed).voidPlayerPlaceConstructionEvent.setPosition(Vector3f position) Changes the world position of the construction element.voidPlayerPlaceObjectEvent.setPosition(Vector3f position) Changes the object world position.voidPlayerPlaceVegetationEvent.setPosition(Vector3f position) Changes the plant position.voidChanges the scale factor of the blueprint.voidChanges the size of the construction element. -
Uses of Vector3f in net.risingworld.api.events.world
Methods in net.risingworld.api.events.world that return Vector3fModifier and TypeMethodDescriptionProjectileFireEvent.getDirection()Gets the direction of the projectile.ProjectileHitEvent.getHitNormal()Gets the normal of the surface which was hit by the projectile.ProjectileHitEvent.getHitPosition()Gets the world position where the projectile hit the target.ProjectileHitEvent.getHitVelocity()Gets the velocity of the projectile when it hit the target.PlantGrowthEvent.getPlantPosition()Gets the world position of the plant as a Vector3f.ExplosionEvent.getPosition()Gets the global world position of the explosion.FireworkEvent.getPosition()Gets the global world position of the firework.ProjectileFireEvent.getPosition()Gets the global world position where the projectile was launched.FireworkEvent.getSize()Gets the size of the firework.Methods in net.risingworld.api.events.world with parameters of type Vector3fModifier and TypeMethodDescriptionvoidProjectileFireEvent.setDirection(Vector3f direction) Changes the direction of the projectile.voidExplosionEvent.setPosition(Vector3f position) Changes the global world position of the explosion.voidFireworkEvent.setPosition(Vector3f position) Changes the global world position of the firework.voidProjectileFireEvent.setPosition(Vector3f position) Changes the global world position of the projectile.voidSets the size of the firework. -
Uses of Vector3f in net.risingworld.api.objects
Methods in net.risingworld.api.objects that return Vector3fModifier and TypeMethodDescriptionArea.getEndPosition()Gets the end world position of the area.Corpse.getPosition()Npc.getPosition()Gets the current world position of the npc.Player.getPosition()Gets a Vector3f containing the current x, y and z coordinate of the player (world position).Vehicle.getPosition()Gets the world position of the vehicle.WorldItem.getPosition()Gets a Vector3f containing the current global x, y and z coordinate of this item.Player.getPreviousPosition()Gets the previous position of the player (the player had the last frame).Area.getSize()Item.ConstructionItem.getSize()Player.getSpawnPosition(SpawnPointType spawnPoint) Gets the spawn position for this player (i.e where the player would respawn upon death).Area.getStartPosition()Gets the start world position of the area.Npc.getVectorToNearestPlayer()Gets a normalized vector from the npc position to the position of the nearest player.Npc.getViewDirection()Gets the current view direction of the npc as a normalized vector.Player.getViewDirection()Gets the current view direction of the player.Player.getViewPosition()Gets the view position of the player, i.e the world position of the player eyes.MetaObject.getWorldPosition()Gets the world position of the object.Sign.getWorldPosition()Gets the world position of the sign.Methods in net.risingworld.api.objects with parameters of type Vector3fModifier and TypeMethodDescriptionvoidCorpse.applyPhysicalImpulse(Vector3f impulse) Applies a physical impulse to the corpse (applied to the center).voidCorpse.applyPhysicalImpulse(Vector3f offset, Vector3f impulse) Applies a physical impulse to the corpse (applied to the position defined by the local offset).voidWorldItem.applyPhysicalImpulse(Vector3f impulse) Applies a physical impulse to the item (applied to the center).voidWorldItem.applyPhysicalImpulse(Vector3f offset, Vector3f impulse) Applies a physical impulse to the item (applied to the position defined by the local offset).voidPlayer.createScreenshot(Vector3f position, Vector3f direction, int width, int height, float quality, boolean includeUI, Callback<BufferedImage> callback) Creates a screenshot from an arbitrary world position with the desired resolution and converts it into a BufferedImage.booleanArea.isPointInArea(Vector3f point) Gets whether or not the point is inside this area.voidForces the npc to move to the provided position.voidMoves the player (smoothly) to the target position.Player.playSound(SoundAsset sound, boolean loop, float volume, float pitch, float minDistance, float maxDistance, Vector3f position) Plays a custom 3D sound at the given position.Player.playSound(SoundAsset sound, boolean loop, float volume, float pitch, Vector3f position) Plays a custom 3D sound at the given position.Player.playSound(SoundAsset sound, Vector3f position) Plays a custom 3D sound at the given position.voidPlayer.raycast(Vector3f direction, float distance, int layerMask, boolean includeTriggers, Callback<RaycastResult> callback) Performs a raycast from the player view position to the provided direction.voidPlayer.raycastFromWorldPosition(Vector3f position, Vector3f direction, float distance, int layerMask, boolean includeTriggers, Callback<RaycastResult> callback) Performs a raycast from a world position.voidPlayer.respawn(Vector3f position, Quaternion rotation) Respawns the player at the given position.voidSets a new start and end position for this area.voidArea.setEndPosition(Vector3f endPosition) Sets an end position for this area (start and end position determine the area size).voidCorpse.setPosition(Vector3f position) Sets the position of the corpse.voidNpc.setPosition(Vector3f position) Sets the world position of the npc (teleports the npc).voidPlayer.setPosition(Vector3f position) Sets the world position of the player.voidVehicle.setPosition(Vector3f position) Sets the world position of the vehicle.voidWorldItem.setPosition(Vector3f position) Sets the global position of the item.voidCorpse.setPositionAndRotation(Vector3f position, Quaternion rotation) voidWorldItem.setPositionAndRotation(Vector3f position, Quaternion rotation) voidPlayer.setSpawnPoint(SpawnPointType spawnPoint, Vector3f position, Quaternion rotation, String name) voidPlayer.setSpawnPoint(SpawnPointType spawnPoint, Vector3f position, Quaternion rotation, String name, long relatedObjectID, int chunkPosX, int chunkPosY, int chunkPosZ) voidArea.setStartPosition(Vector3f startPosition) Sets a start position for this area (start and end position determine the area size).voidNpc.setViewDirection(Vector3f direction) Sets the view direction of the npc.voidPlayer.setViewDirection(Vector3f direction) Sets the view direction of the player.Constructors in net.risingworld.api.objects with parameters of type Vector3f -
Uses of Vector3f in net.risingworld.api.objects.world
Methods in net.risingworld.api.objects.world that return Vector3fModifier and TypeMethodDescriptionConstructionElement.getScale()Gets the scale (along x, y and z) of this construction element.ObjectElement.getScale()Gets the scale (along x, y and z) of this object.Plant.getScale()Gets the scale (along x, y and z) of this plant.ConstructionElement.getSurfaceOffset()ConstructionElement.getSurfaceScale()ConstructionElement.getWorldPosition()Gets the world position of this element.ObjectElement.getWorldPosition()Gets the world position of this object.Plant.getWorldPosition()Gets the world position of this plant.Methods in net.risingworld.api.objects.world with parameters of type Vector3fModifier and TypeMethodDescriptionvoidSets a new scale for this construction element.voidSets a new scale for this object.voidSets a new scale for this plant.voidConstructionElement.setSurfaceOffset(Vector3f offset) voidConstructionElement.setSurfaceOffsetAndScale(Vector3f offset, Vector3f scale) voidConstructionElement.setSurfaceScale(Vector3f scale) -
Uses of Vector3f in net.risingworld.api.sounds
Methods in net.risingworld.api.sounds with parameters of type Vector3fModifier and TypeMethodDescriptionvoidSound.setDirection(Vector3f direction) voidSound.setPosition(Vector3f position) Changes the world position of a sound.voidSound.setVelocity(Vector3f velocity) -
Uses of Vector3f in net.risingworld.api.utils
Fields in net.risingworld.api.utils declared as Vector3fModifier and TypeFieldDescriptionstatic final Vector3fVector3f.BACKA unit vector along the -Z axis (backward direction)static final Vector3fVector3f.DOWNA unit vector along the -Y axis (down direction)static final Vector3fVector3f.FORWARDA unit vector along the Z axis (forward direction)static final Vector3fVector3f.LEFTA unit vector along the -X axis (left direction)static final Vector3fVector3f.ONEA vector with values 1, 1, 1static final Vector3fVector3f.RIGHTA unit vector along the X axis (right direction)static final Vector3fVector3f.UPA unit vector along the Y axis (up direction)static final Vector3fVector3f.ZEROA vector with values 0, 0, 0Methods in net.risingworld.api.utils that return Vector3fModifier and TypeMethodDescriptionVector3f.add(float addX, float addY, float addZ) Creates a new vector with the same values of this vector and adds the provided values.Creates a new vector with the same values of this vector and adds the values of the provided vector.Vector3f.addLocal(float addX, float addY, float addZ) Adds the provided values to the values of this vector.Adds the values of the provided vector to the values of this vector.Vector3f.copy()Creates a copy of this Vector.Creates a new vector containing the cross product of this vector and another vector.Vector3f.crossLocal(float v2x, float v2y, float v2z) Calculates the cross product of this vector and the provided coordinates.Vector3f.crossLocal(Vector3f other) Calculates the cross product of this vector and another vector.Creates a new vector with the same values of this vector and divides the values of the provided vector.Vector3f.divideLocal(float scalar) Vector3f.divideLocal(Vector3f other) Vector3f.fromString(String input) static Vector3fUtils.VectorUtils.getAlignedDirection(Vector3f direction, Vector3f normal) Gets a direction vector aligned to a normal.static Vector3fUtils.VectorUtils.getAlignedDirection(Vector3f direction, Vector3f normal, Vector3f storeTo) Bounds.getCenter()Gets the bounds center.RaycastResult.getCollisionNormal()Gets the collision normal, i.e the normal of the surface the ray hit.
This normal is already normalized.RaycastResult.getCollisionPoint()Gets the collision point, i.e the position where the ray hit a collider.
Note: If you want to get the world position of the hit object itself instead, seeRaycastResult.getObjectPosition()static Vector3fUtils.VectorUtils.getDirection(Vector3f from, Vector3f to) Gets the direction between two points (from -> to) as a normalized vector (unit vector, i.e length == 1).static Vector3fUtils.VectorUtils.getDirection(Vector3f from, Vector3f to, Vector3f storeTo) Gets the direction between two points (from -> to) as a normalized vector (unit vector, i.e length == 1).AreaSelectionResult.getEndPosition()Gets the end position.static Vector3fUtils.ChunkUtils.getGlobalPosition(Vector3i chunkPosition, Vector3i blockPosition) static Vector3fUtils.ChunkUtils.getGlobalPosition(Vector3i chunkPosition, Vector3i blockPosition, Vector3f storeTo) RaycastResult.getObjectPosition()Gets the world position of the element that was hit by this ray.AreaSelectionResult.getStartPosition()Gets the start position.static Vector3fUtils.VectorUtils.getXYZInFrontOfPlayer(Player player, float distance) Gets the position in front of the player (with the given distance to the player).static Vector3fUtils.VectorUtils.getXYZInFrontOfPlayer(Player player, float distance, Vector3f storeTo) Gets the position in front of the player (with the given distance to the player).static Vector3fUtils.VectorUtils.getXZInFrontOfPlayer(Player player, float distance) static Vector3fUtils.VectorUtils.getXZInFrontOfPlayer(Player player, float distance, Vector3f storeTo) Vector3f.interpolate(Vector3f startVector, Vector3f finalVector, float mu) Creates a new vector containing the interpolated values between the start vector and the final vector.Vector3f.interpolateLocal(Vector3f finalVector, float mu) Interpolates this vector to the provided final vector, e.g if this vector is (0, 5, 10), and the final vector is (-10, 0, 10), the result (by using a mu-value of 0.5f) would be (-5, 2.5f, 10)Vector3f.interpolateLocal(Vector3f startVector, Vector3f finalVector, float mu) Interpolates between the provided start and end vector and stores the result in this vector.Multiplies the quaternion by a Vector3f.Vector3f.mult(float scalar) Creates a new vector with the same values of this vector and multiplies them with the provided scalar.Vector3f.mult(float multX, float multY, float multZ) Creates a new vector with the same values of this vector and multiplies the provided values.Creates a new vector with the same values of this vector and multiplies the values of the provided vector.Multiplies the quaternion by a Vector3f.Vector3f.multLocal(float scalar) Multiplies the values of this vector with the provided scalar.Vector3f.multLocal(float multX, float multY, float multZ) Multiplies the values of this vector with the provided values.Multiplies the values of this vector with the values of the provided vector.Vector3f.negate()Creates a new vector which contains negated values of this vector.Vector3f.negateLocal()Negates all values of this vector.Vector3f.normalize()Creates a new vector containing normalized values of this vector (i.e as a unit vector).Vector3f.normalizeLocal()Normalizes this vector (i.e turn it into a unit vector).Vector3f.set(float x, float y, float z) Sets the x, y and z values of this vector to the provided values.Sets the x, y and z values of this vector to the values of the provided vector.Vector3f.setX(float x) Sets the x value of this vector.Vector3f.setY(float y) Sets the y value of this vector.Vector3f.setZ(float z) Sets the z value of this vector.Vector3f.subtract(float subtractX, float subtractY, float subtractZ) Creates a new vector with the same values of this vector and subtracts the provided values.Creates a new vector with the same values of this vector and subtracts the values of the provided vector.Vector3f.subtractLocal(float subtractX, float subtractY, float subtractZ) Subtracts the provided values from the values of this vector.Vector3f.subtractLocal(Vector3f other) Subtracts the values of the provided vector from the values of this vector.Methods in net.risingworld.api.utils with parameters of type Vector3fModifier and TypeMethodDescriptionCreates a new vector with the same values of this vector and adds the values of the provided vector.Adds the values of the provided vector to the values of this vector.floatVector3f.angleBetween(Vector3f other) Gets the angle between this vector and another vector.Creates a new vector containing the cross product of this vector and another vector.Vector3f.crossLocal(Vector3f other) Calculates the cross product of this vector and another vector.floatGets the distance between this vector and another vector.floatVector3f.distanceSquared(Vector3f other) Gets the squared distance between this vector and another Vector3f.Creates a new vector with the same values of this vector and divides the values of the provided vector.Vector3f.divideLocal(Vector3f other) floatGets the dot product of this vector with the provided vector.static Vector3fUtils.VectorUtils.getAlignedDirection(Vector3f direction, Vector3f normal) Gets a direction vector aligned to a normal.static Vector3fUtils.VectorUtils.getAlignedDirection(Vector3f direction, Vector3f normal, Vector3f storeTo) static Vector3iUtils.ChunkUtils.getBlockPosition(Vector3f globalPosition, Vector3i chunkPosition) Calculates a block position (within the provided chunk position)static voidUtils.ChunkUtils.getChunkAndBlockPosition(Vector3f globalPosition, Vector3i chunkPositionStore, Vector3i blockPositionStore) Calculates a chunk offset and the according block position (within this chunk) from a given global position and stores the results in the providedVector3i's.static Vector3iUtils.ChunkUtils.getChunkPosition(Vector3f globalPosition) Calculates a chunk offset from a given global position and stores the result in aVector3i.static Vector3iUtils.ChunkUtils.getChunkPosition(Vector3f globalPosition, Vector3i storeTo) Calculates a chunk offset from a given global position and stores the result in the providedVector3i.static Vector3fUtils.VectorUtils.getDirection(Vector3f from, Vector3f to) Gets the direction between two points (from -> to) as a normalized vector (unit vector, i.e length == 1).static Vector3fUtils.VectorUtils.getDirection(Vector3f from, Vector3f to, Vector3f storeTo) Gets the direction between two points (from -> to) as a normalized vector (unit vector, i.e length == 1).static Vector3fUtils.ChunkUtils.getGlobalPosition(Vector3i chunkPosition, Vector3i blockPosition, Vector3f storeTo) static Vector3fUtils.VectorUtils.getXYZInFrontOfPlayer(Player player, float distance, Vector3f storeTo) Gets the position in front of the player (with the given distance to the player).static Vector3fUtils.VectorUtils.getXZInFrontOfPlayer(Player player, float distance, Vector3f storeTo) Vector3f.interpolate(Vector3f startVector, Vector3f finalVector, float mu) Creates a new vector containing the interpolated values between the start vector and the final vector.Vector3f.interpolateLocal(Vector3f finalVector, float mu) Interpolates this vector to the provided final vector, e.g if this vector is (0, 5, 10), and the final vector is (-10, 0, 10), the result (by using a mu-value of 0.5f) would be (-5, 2.5f, 10)Vector3f.interpolateLocal(Vector3f startVector, Vector3f finalVector, float mu) Interpolates between the provided start and end vector and stores the result in this vector.booleanVector3f.isOrthogonal(Vector3f other) Checks if this vector is orthogonal to another vector (i.e the angle between both vectors is ~ 90° degree).booleanBounds.isPointInVolume(Vector3f point) Checks if the given point (represented as aVector3f) is inside the bounds."Looks at" a given direction, i.e the quaternion will be set based on the direction."Looks at" a given direction, i.e the quaternion will be set based on the direction and an up vector.Multiplies the quaternion by a Vector3f.Creates a new vector with the same values of this vector and multiplies the values of the provided vector.Multiplies the quaternion by a Vector3f.Multiplies the values of this vector with the values of the provided vector.Sets the x, y and z values of this vector to the values of the provided vector.Creates a new vector with the same values of this vector and subtracts the values of the provided vector.Vector3f.subtractLocal(Vector3f other) Subtracts the values of the provided vector from the values of this vector.static StringUtils.StringUtils.vector3fToString(Vector3f vector3f) Constructors in net.risingworld.api.utils with parameters of type Vector3f -
Uses of Vector3f in net.risingworld.api.world.batch
Methods in net.risingworld.api.world.batch with parameters of type Vector3fModifier and TypeMethodDescriptionvoidConstructionPlaceBatch.add(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale, Vector3f surfaceOffset, Vector3f surfaceScale) voidPlantPlaceBatch.add(int typeID, Vector3f worldPosition, Quaternion rotation, Vector3f scale) -
Uses of Vector3f in net.risingworld.api.worldelements
Methods in net.risingworld.api.worldelements that return Vector3fModifier and TypeMethodDescriptionGameObject.getLocalPosition()Gets the local position of this object, relative to its parent.GameObject.getLocalScale()Gets the current local scale of this game object.Methods in net.risingworld.api.worldelements with parameters of type Vector3fModifier and TypeMethodDescriptionvoidGameObject.moveToLocalPosition(Vector3f position, float speed) Smoothly moves this object to a target local position.voidGameObject.moveToLocalPosition(Vector3f position, float speed, Callback<Consumer<Vector3f>> callback) Smoothly moves this object to a target local position.voidGameObject.moveToLocalTransform(Vector3f position, Quaternion rotation, float speed) Smoothly moves and rotates this object to a target local position and rotation.voidGameObject.setLocalPosition(Vector3f position) Sets the position of this object, relative to its parent.voidPrefab.setLocalPosition(String path, Vector3f position) Sets the position of the prefab or a child of this prefab, relative to its parent.voidGameObject.setLocalScale(Vector3f scale) Sets the local scale of this object, relative to its parent.voidPrefab.setLocalScale(String path, Vector3f scale) Sets the local scale of the prefab or a child of this prefab, relative to its parent.voidPrefab.setMaterialParameter(String path, String parameter, Vector3f value) Sets a material parameter.voidPrefab.setVFXParameter(String path, String parameter, Vector3f value) Changes the parameter/property of a VFX effect (VisualEffect).Method parameters in net.risingworld.api.worldelements with type arguments of type Vector3fModifier and TypeMethodDescriptionvoidGameObject.moveToLocalPosition(float x, float y, float z, float speed, Callback<Consumer<Vector3f>> callback) Smoothly moves this object to a target local position.voidGameObject.moveToLocalPosition(Vector3f position, float speed, Callback<Consumer<Vector3f>> callback) Smoothly moves this object to a target local position.voidPrefab.readLocalPosition(String path, Player player, Callback<Vector3f> callback) Reads the actual local position of the prefab (or a child of this prefab, specified by the path) from a particular player.voidGameObject.readWorldPosition(Player player, Callback<Vector3f> callback) Reads the actual world position of the game object from a particular player.voidPrefab.readWorldPosition(String path, Player player, Callback<Vector3f> callback) Reads the actual world position of the prefab (or a child of this prefab, specified by the path) from a particular player.