public class AniFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
FLOAT |
static int |
HEADER |
protected int |
mFrameSize |
java.util.List<java.lang.String> |
mImageIndex |
protected int |
mNumFrames |
protected int |
mNumParts |
java.util.List<java.lang.String> |
mRequiredImages |
byte[] |
mSkeletonData |
protected float |
mVersion |
static int |
PART_COORDS |
static int |
PART_COORDS_SIZE |
static int |
PART_POINTS |
static int |
PART_TOTAL_SIZE |
static int |
PART_VERTICES |
static int |
PART_VERTICES_SIZE |
static int |
TEXTURE_SIZE |
Constructor and Description |
---|
AniFile() |
AniFile(AssetManager assetManager,
java.lang.String filePath) |
AniFile(XmlResourceParser parser) |
Modifier and Type | Method and Description |
---|---|
int |
getFrameCoordBuffers(int frame,
TextureCoordBuffer[] buffers)
Get the Texture Coordinate Buffers of all the parts in a specific frame
|
boolean |
getFrameVertexBuffers(int frame,
int flips,
VertexBuffer[] buffers,
RectF bounds)
Get the Vertex Buffers of all the parts in a specific frame
|
byte[] |
getSkeletonData() |
Texture |
getTexture(int index) |
protected void |
parse(java.io.InputStream stream) |
protected void |
parse(XmlPullParser xml) |
static void |
readFloats(byte[] data,
int start,
float[] output)
Read the float values from a byte array into a float array
|
static void |
readVertices(byte[] data,
int start,
float[] output,
int flips,
RectF bounds)
Read the float values from a byte array into a float array
|
void |
setSkeletonData(byte[] floatData) |
void |
setTextures(java.util.Map<java.lang.String,Texture> map) |
public static final int TEXTURE_SIZE
public static final int FLOAT
public static final int HEADER
public static final int PART_POINTS
public static final int PART_VERTICES
public static final int PART_VERTICES_SIZE
public static final int PART_COORDS
public static final int PART_COORDS_SIZE
public static final int PART_TOTAL_SIZE
public byte[] mSkeletonData
public java.util.List<java.lang.String> mImageIndex
public java.util.List<java.lang.String> mRequiredImages
protected float mVersion
protected int mNumParts
protected int mNumFrames
protected int mFrameSize
public AniFile()
public AniFile(AssetManager assetManager, java.lang.String filePath)
public AniFile(XmlResourceParser parser)
protected void parse(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
protected void parse(XmlPullParser xml) throws java.lang.Exception
java.lang.Exception
public boolean getFrameVertexBuffers(int frame, int flips, VertexBuffer[] buffers, RectF bounds)
frame
- buffers
- public int getFrameCoordBuffers(int frame, TextureCoordBuffer[] buffers)
frame
- buffers
- public byte[] getSkeletonData()
public void setSkeletonData(byte[] floatData)
public void setTextures(java.util.Map<java.lang.String,Texture> map)
public Texture getTexture(int index)
public static void readVertices(byte[] data, int start, float[] output, int flips, RectF bounds)
data
- start
- output
- public static void readFloats(byte[] data, int start, float[] output)
data
- start
- output
-