public class AdditionalSynergyNetUtilities
extends java.lang.Object
Constructor and Description |
---|
AdditionalSynergyNetUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
buildScreenshotItem(java.io.File screenShotFile,
com.jme3.math.Vector2f loc,
IStage stage,
float rot)
Creates a screenshot item from an image file.
|
static IItem |
generateItemFromFile(java.io.File file,
IStage stage,
float deceleration,
float importImageSizeLimit,
com.jme3.math.ColorRGBA borderColour)
Creates item for a file.
|
static IItem |
generateItemFromFile(java.io.File file,
IStage stage,
float deceleration,
float importImageSizeLimit,
com.jme3.math.ColorRGBA borderColour,
float minScale,
float maxScale)
Creates item for a file.
|
static boolean |
inBox(com.jme3.math.Vector2f loc,
com.jme3.math.Vector2f boxLoc,
com.jme3.math.Vector2f dim)
Checks if a location is within a box.
|
static boolean |
inRadius(com.jme3.math.Vector2f loc,
com.jme3.math.Vector2f circleLoc,
float radius)
Checks if a location is within a circle.
|
static void |
log(java.util.logging.Level level,
java.lang.String logMessage,
java.lang.Exception ex)
Produces a log message using the logger.
|
static void |
logInfo(java.lang.String logMessage)
Produces a log message using the logger.
|
static void |
pile(IItem[] items,
float x,
float y,
float angleOffSet,
float positionOffset)
Takes an array of items and stacks them in a pile at various rotations.
|
public static void buildScreenshotItem(java.io.File screenShotFile, com.jme3.math.Vector2f loc, IStage stage, float rot)
screenShotFile
- The image file the item is to display.loc
- The location of the item on screen. ~ @param stage
Environment's stage.rot
- Rotation of the item on screen.displayWidth
- Width of the environment.displayWidth
- Height of the environment.public static IItem generateItemFromFile(java.io.File file, IStage stage, float deceleration, float importImageSizeLimit, com.jme3.math.ColorRGBA borderColour)
file
- The file to potentially create an item from.stage
- Environment stage nodedeceleration
- The rate of the deceleration when flicked. A value of
-1 will make the item unflickable.importImageSizeLimit
- The max width or height of an item.borderColour
- The colour of the border around the item. Can be
invisible.public static IItem generateItemFromFile(java.io.File file, IStage stage, float deceleration, float importImageSizeLimit, com.jme3.math.ColorRGBA borderColour, float minScale, float maxScale)
file
- The file to potentially create an item from.stage
- Environment stage nodedeceleration
- The rate of the deceleration when flicked. A value of
-1 will make the item unflickable.importImageSizeLimit
- The max width or height of an item.borderColour
- The colour of the border around the item. Can be
invisible.minScale
- The minimum scale the item can be scaled it.maxScale
- The maximum scale the item can be scaled it.public static boolean inBox(com.jme3.math.Vector2f loc, com.jme3.math.Vector2f boxLoc, com.jme3.math.Vector2f dim)
loc
- The location to check is inside the box.boxLoc
- The location of the box.dim
- Dimensions of the box.public static boolean inRadius(com.jme3.math.Vector2f loc, com.jme3.math.Vector2f circleLoc, float radius)
loc
- The location to check is inside the circle.circleLoc
- The location of the circle.radius
- Radius of the circle.public static void log(java.util.logging.Level level, java.lang.String logMessage, java.lang.Exception ex)
level
- The level indicating the severity of the log message.logMessage
- The message to be shown in the log.ex
- The exception being logged.public static void logInfo(java.lang.String logMessage)
logMessage
- The message to be shown in the log.public static void pile(IItem[] items, float x, float y, float angleOffSet, float positionOffset)
items
- The items to be stacked.x
- X location at which the pile of items should appear.y
- Y location at which the pile of items should appear.angleOffSet
- The degree to which items in the pile may be rotated.positionOffset
- How far along an axis from the centre of the pile
an item may be positioned.