Uses of Class
net.risingworld.api.utils.Quaternion
Packages that use Quaternion
Package
Description
-
Uses of Quaternion in net.risingworld.api
Methods in net.risingworld.api that return QuaternionModifier and TypeMethodDescriptionstatic QuaternionServer.getDefaultSpawnRotation()Gets the default spawn rotation.Methods in net.risingworld.api with parameters of type QuaternionModifier 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 voidServer.setDefaultSpawnRotation(Quaternion quaternion) Sets the default spawn rotation.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 Quaternion in net.risingworld.api.definitions
Fields in net.risingworld.api.definitions declared as QuaternionModifier and TypeFieldDescriptionNpcs.NpcDefinition.headrotationDefault head rotation (worldspace).Npcs.NpcDefinition.mouthrotationDefault mouth rotation (worldspace).Constructions.ConstructionDefinition.renderrotationOptional offset rotation when rendering the construction icon (default rotation will be multiplied with this optional rotation)Items.ItemDefinition.renderrotationOptional rotation when rendering the item (e.g as custom icon or for crafting preview)Objects.ObjectDefinition.renderrotationOptional offset rotation when rendering the object icon (default rotation will be multiplied with this optional rotation)Plants.PlantDefinition.renderrotationOptional plant rotation when rendering the plant iconItems.ItemDefinition.rotationItem model rotation when holding in handsNpcs.NpcDefinition.NpcAttachmentInfo.rotationLocal rotation of the attachment prefabObjects.ObjectDefinition.rotationoffsetOptional additional rotation that is applied to the model when placing itObjects.ObjectDefinition.selectorhelperrotationIf there is a helper object, this is the local rotation of it (euler angles)Items.ItemInfo.targetitemrotationOnly for world items: Rotation offset after performing the action -
Uses of Quaternion in net.risingworld.api.events.npc
Methods in net.risingworld.api.events.npc that return QuaternionMethods in net.risingworld.api.events.npc with parameters of type Quaternion -
Uses of Quaternion in net.risingworld.api.events.player
Methods in net.risingworld.api.events.player that return QuaternionModifier and TypeMethodDescriptionPlayerWeaponFireEvent.getFireRotation()PlayerSetSpawnPointEvent.getNewSpawnRotation()PlayerSetSpawnPointEvent.getOldSpawnRotation()Gets the previously set spawn rotation for this type (if any was set).PlayerChangePositionEvent.getRotation()PlayerDropItemEvent.getRotation()Gets the item drop rotation (rotation of the item).PlayerDropItemFromStorageEvent.getRotation()Gets the item drop rotation (rotation of the item).PlayerRespawnEvent.getSpawnRotation()Gets the spawn rotation.PlayerSpawnEvent.getSpawnRotation()Gets the spawn rotation.Methods in net.risingworld.api.events.player with parameters of type QuaternionModifier and TypeMethodDescriptionvoidPlayerWeaponFireEvent.setFireRotation(Quaternion rotation) voidPlayerSetSpawnPointEvent.setNewSpawnRotation(Quaternion rotation) voidPlayerChangePositionEvent.setRotation(Quaternion quaternion) voidPlayerRespawnEvent.setSpawnRotation(Quaternion rotation) Sets the spawn rotation of the player. -
Uses of Quaternion in net.risingworld.api.events.player.world
Methods in net.risingworld.api.events.player.world that return QuaternionModifier and TypeMethodDescriptionPlayerEditConstructionEvent.getNewRotation()Gets the new rotation of the construction element as a Quaternion.PlayerPlaceBlueprintEvent.getRotation()Gets the world rotation of the blueprint.PlayerPlaceObjectEvent.getRotation()Gets the rotation of the object as a Quaternion.Methods in net.risingworld.api.events.player.world with parameters of type QuaternionModifier and TypeMethodDescriptionvoidPlayerPlaceBlueprintEvent.setRotation(Quaternion rotation) Changes the rotation of the blueprint.voidPlayerPlaceConstructionEvent.setRotation(Quaternion rotation) Changes the rotation of the construction element.voidPlayerPlaceObjectEvent.setRotation(Quaternion rotation) Changes the object rotation.voidPlayerPlaceVegetationEvent.setRotation(Quaternion rotation) Changes the plant rotation. -
Uses of Quaternion in net.risingworld.api.events.world
Methods in net.risingworld.api.events.world that return QuaternionModifier and TypeMethodDescriptionPlantGrowthEvent.getPlantRotation()Gets the current rotation of the plant as a Quaternion. -
Uses of Quaternion in net.risingworld.api.objects
Methods in net.risingworld.api.objects that return QuaternionModifier and TypeMethodDescriptionCorpse.getRotation()Npc.getRotation()Gets the current rotation of the npc.Player.getRotation()Gets the current player rotation.Vehicle.getRotation()Gets the rotation of the vehicle.WorldItem.getRotation()Gets a Quaternion containing the current rotation of this item.Player.getSpawnRotation(SpawnPointType spawnPoint) Gets the spawn rotation for this player (i.e where the player would respawn upon death).Methods in net.risingworld.api.objects with parameters of type QuaternionModifier and TypeMethodDescriptionvoidPlayer.respawn(Vector3f position, Quaternion rotation) Respawns the player at the given position.voidCorpse.setPositionAndRotation(Vector3f position, Quaternion rotation) voidWorldItem.setPositionAndRotation(Vector3f position, Quaternion rotation) voidCorpse.setRotation(Quaternion rotation) Sets the rotation of the corpse.voidNpc.setRotation(Quaternion quaternion) Sets the npc rotation.voidPlayer.setRotation(Quaternion quaternion) Sets the player rotation.voidVehicle.setRotation(Quaternion rotation) Sets the rotation of the vehicle.voidWorldItem.setRotation(Quaternion rotation) Sets the rotation of this item.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) -
Uses of Quaternion in net.risingworld.api.objects.world
Methods in net.risingworld.api.objects.world that return QuaternionModifier and TypeMethodDescriptionConstructionElement.getRotation()Gets the rotation of this construction element.ObjectElement.getRotation()Gets the rotation of this object.Plant.getRotation()Gets the rotation of this plant.Methods in net.risingworld.api.objects.world with parameters of type QuaternionModifier and TypeMethodDescriptionvoidConstructionElement.setRotation(Quaternion rotation) Sets the rotation of this construction element.voidObjectElement.setRotation(Quaternion rotation) Sets the rotation of this object.voidPlant.setRotation(Quaternion rotation) Sets the rotation of this plant. -
Uses of Quaternion in net.risingworld.api.utils
Fields in net.risingworld.api.utils declared as QuaternionModifier and TypeFieldDescriptionstatic final QuaternionQuaternion.IDENTITYA quaternion representing no rotationstatic final QuaternionQuaternion.ZEROAn "empty" quaternion.Methods in net.risingworld.api.utils that return QuaternionModifier and TypeMethodDescriptionQuaternion.copy()Creates a copy of this Quaternion.Quaternion.fromAngles(float[] angles) Calculates this quaternion from the given Euler rotation angles (pitch, yaw, roll) aka (attitude, heading, bank) aka (x, y, z).Quaternion.fromAngles(float pitch, float yaw, float roll) Calculates this quaternion from the given Euler rotation angles (pitch, yaw, roll) aka (attitude, heading, bank) aka (x, y, z).Quaternion.fromString(String input) Quaternion.inverse()Gets the inverse of this quaternion as a new quaternion.Quaternion.inverseLocal()Calculates the inverse of this quaternion and stores the result in this quaternion.Quaternion.loadIdentity()Sets this quaternion to 0, 0, 0, 1.Quaternion.lookAt(float directionx, float directiony, float directionz) "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."Looks at" a given direction, i.e the quaternion will be set based on the direction and an up vector.Quaternion.multLocal(float scalar) Multiplies the quaternion by a scalar.Quaternion.multLocal(float qx, float qy, float qz, float qw) Multiplies this quaternion by the provided values.Quaternion.multLocal(Quaternion quaternion) Multiplies this quaternion by the provided quaternion.Quaternion.negateLocal()Negates the values of this quaternion.Quaternion.normalize()Gets the normalized quaternion as a new quaternion.Quaternion.normalizeLocal()Normalizes this quaternion.Quaternion.set(float x, float y, float z, float w) Sets the X, Y, Z and W values of this Quaternion to the provided values.Quaternion.set(Quaternion quaternion) Sets the X, Y, Z and W values of this Quaternion to the values of the provided quaternion.Quaternion.setW(float w) Sets the Z value of this Quaternion.Quaternion.setX(float x) Sets the X value of this Vector3f.Quaternion.setY(float y) Sets the Y value of this Vector3f.Quaternion.setZ(float z) Sets the Z value of this Quaternion.Methods in net.risingworld.api.utils with parameters of type QuaternionModifier and TypeMethodDescriptionfloatQuaternion.angle(Quaternion quaternion) Gets the angle (in degrees) between this quaternion and the other quaternion.floatQuaternion.dot(Quaternion quaternion) Gets the dot product of this quaternion with the provided quaternion.Quaternion.multLocal(Quaternion quaternion) Multiplies this quaternion by the provided quaternion.Quaternion.set(Quaternion quaternion) Sets the X, Y, Z and W values of this Quaternion to the values of the provided quaternion.Constructors in net.risingworld.api.utils with parameters of type Quaternion -
Uses of Quaternion in net.risingworld.api.world.batch
Methods in net.risingworld.api.world.batch with parameters of type QuaternionModifier 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 Quaternion in net.risingworld.api.worldelements
Methods in net.risingworld.api.worldelements that return QuaternionModifier and TypeMethodDescriptionGameObject.getLocalRotation()Gets the rotation of this object, relative to its parent.Methods in net.risingworld.api.worldelements with parameters of type QuaternionModifier and TypeMethodDescriptionvoidGameObject.moveToLocalTransform(Vector3f position, Quaternion rotation, float speed) Smoothly moves and rotates this object to a target local position and rotation.voidGameObject.rotateToLocalRotation(Quaternion rotation, float speed) Smoothly rotates this object to a target local rotation.voidGameObject.setLocalRotation(Quaternion rotation) Sets the rotation of this object, relative to its parent.voidPrefab.setLocalRotation(String path, Quaternion rotation) Sets the rotation of the prefab or a child of this prefab, relative to its parent.Method parameters in net.risingworld.api.worldelements with type arguments of type QuaternionModifier and TypeMethodDescriptionvoidPrefab.readLocalRotation(String path, Player player, Callback<Quaternion> callback) Reads the actual local rotation of the prefab (or a child of this prefab, specified by the path) from a particular player.voidGameObject.readWorldRotation(Player player, Callback<Quaternion> callback) Reads the actual world rotation of the game object from a particular player.voidPrefab.readWorldRotation(String path, Player player, Callback<Quaternion> callback) Reads the actual world rotation of the prefab (or a child of this prefab, specified by the path) from a particular player.