Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1051 | chris | 1 | package com.gebauz.bauzoid.math.collision; |
| 2 | |||
| 3 | import java.util.Vector; |
||
| 4 | |||
| 5 | import com.gebauz.bauzoid.graphics.sprite.SpriteTransform; |
||
| 6 | |||
| 7 | /** Collection of shape elements that form a complex shape. */ |
||
| 8 | public class Shape |
||
| 9 | { |
||
| 10 | |||
| 11 | // Constants======================================================================================== |
||
| 12 | |||
| 13 | // Embedded Types=================================================================================== |
||
| 14 | |||
| 15 | // Fields=========================================================================================== |
||
| 16 | |||
| 17 | private Vector<BaseShapeElement> mShapes = new Vector<BaseShapeElement>(); |
||
| 18 | |||
| 19 | public SpriteTransform transform = new SpriteTransform(); |
||
| 20 | |||
| 21 | // Methods========================================================================================== |
||
| 22 | |||
| 23 | public Shape() |
||
| 24 | { |
||
| 25 | |||
| 26 | } |
||
| 27 | |||
| 28 | public void addElement(BaseShapeElement shapeElement) |
||
| 29 | { |
||
| 30 | mShapes.add(shapeElement); |
||
| 31 | } |
||
| 32 | |||
| 33 | // Getters/Setters================================================================================== |
||
| 34 | |||
| 35 | public final BaseShapeElement getShapeElement(int i) |
||
| 36 | { |
||
| 37 | return mShapes.get(i); |
||
| 38 | } |
||
| 39 | |||
| 40 | public final int getShapeElementCount() |
||
| 41 | { |
||
| 42 | return mShapes.size(); |
||
| 43 | } |
||
| 44 | |||
| 45 | } |