public class VehicleBlock
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASSET_PATH |
static java.lang.String |
TAG |
static java.lang.String |
TOOL_DIR |
static int |
TYPE_FWAC |
static int |
TYPE_HELO |
static int |
TYPE_OTHER |
Modifier and Type | Method and Description |
---|---|
static GeoPointMetaData[] |
buildPolyline(java.lang.String blockName,
GeoPoint center,
double angle) |
static VehicleBlock |
getBlock(java.lang.String name)
Get vehicle block associated with name
|
static java.io.File |
getBlockDir() |
static java.util.List<android.graphics.PointF> |
getBlockPoints(java.lang.String name) |
static double[] |
getBlockRadials(java.lang.String name) |
static java.lang.String[] |
getBlocks()
Get all blocks in the entire directory structure
|
static java.lang.String[] |
getBlocks(java.io.File dir,
boolean incSubDirs)
Return array of block names within default block directory
|
static java.lang.String[] |
getBlocks(java.lang.String group) |
double[] |
getDimensions()
Get vehicle dimensions as array
|
java.io.File |
getFile() |
static java.lang.String[] |
getGroups() |
android.graphics.Bitmap |
getIcon()
Generates an icon for this vehicle block
Icon is fully opaque, white, and at most 128x128 in size
|
java.lang.String |
getName() |
double[] |
getRadials()
Get vehicle radials as array
|
int |
getType() |
static void |
init()
Migrate old vehicle blocks over to new director, scan for any vehicles,
and create the pallet if needed
|
boolean |
isValid()
Vehicle block validity
|
public static final java.lang.String TAG
public static final java.lang.String ASSET_PATH
public static final java.lang.String TOOL_DIR
public static final int TYPE_OTHER
public static final int TYPE_HELO
public static final int TYPE_FWAC
public double[] getDimensions()
public java.lang.String getName()
public java.io.File getFile()
public boolean isValid()
public double[] getRadials()
public int getType()
public android.graphics.Bitmap getIcon()
public static java.io.File getBlockDir()
public static void init()
public static java.lang.String[] getBlocks(java.io.File dir, boolean incSubDirs)
incSubDirs
- True to include sub-directory blocks
False to only include blocks in the immediate dirpublic static java.lang.String[] getBlocks()
public static java.lang.String[] getBlocks(java.lang.String group)
public static java.lang.String[] getGroups()
public static VehicleBlock getBlock(java.lang.String name)
name
- Block namepublic static java.util.List<android.graphics.PointF> getBlockPoints(java.lang.String name)
public static GeoPointMetaData[] buildPolyline(java.lang.String blockName, GeoPoint center, double angle)
public static double[] getBlockRadials(java.lang.String name)