The Game Engine  1
SpriteFrame Struct Reference

Represents a Frame of animation of a Sprite. More...

#include <SpriteFrame.h>

+ Collaboration diagram for SpriteFrame:

Public Attributes

Texture tex
 Image Texture. More...
 
unsigned int pause
 Tells the amount of time to pause between this frame and the next. More...
 
int width
 Base width of the frame's image. More...
 
int height
 Base height of the frame's image. More...
 
vector< Point2DhotSpots
 Hot spots that can be used for locating objects on the sprite default is tagged to center of the sprite. More...
 
Point2D animationPeg
 The offeset from position to place the image. More...
 
vector< CollisionObject * > collisionData
 The collision data for this sprite. More...
 

Detailed Description

Represents a Frame of animation of a Sprite.

This class is tasked with the following:

  • Providing detalis about a frame of animation
    • Storing the amount of time between frames
    • Storing a frame's hotspots
    • Storing the AnimationPeg
    • Storing a Frame's Collision Data
    • Storing the GL Name of a texture
Todo:

make this handle frame being part of a larger texture (top left pos)

maybe also store the name of the texture so we can load them again?

Definition at line 24 of file SpriteFrame.h.

Member Data Documentation

Point2D SpriteFrame::animationPeg

The offeset from position to place the image.

Defaults to (0,0) This is so that the same location on two frames look like the same point between frames

Definition at line 30 of file SpriteFrame.h.

vector<CollisionObject*> SpriteFrame::collisionData

The collision data for this sprite.

Definition at line 31 of file SpriteFrame.h.

int SpriteFrame::height

Base height of the frame's image.

(set at loading)

Definition at line 28 of file SpriteFrame.h.

vector<Point2D> SpriteFrame::hotSpots

Hot spots that can be used for locating objects on the sprite default is tagged to center of the sprite.

Todo:
implement default

Definition at line 29 of file SpriteFrame.h.

unsigned int SpriteFrame::pause

Tells the amount of time to pause between this frame and the next.

Definition at line 26 of file SpriteFrame.h.

Texture SpriteFrame::tex

Image Texture.

Definition at line 25 of file SpriteFrame.h.

int SpriteFrame::width

Base width of the frame's image.

(set at loading)

Definition at line 27 of file SpriteFrame.h.


The documentation for this struct was generated from the following file: