SDLPP: add function that returns absolute position
This commit is contained in:
@@ -46,6 +46,9 @@ void RenderObject::setPos( const Vec2D< double > &vec ) {
|
||||
Vec2D< double > RenderObject::getPos() const {
|
||||
return original;
|
||||
}
|
||||
Vec2D< double > RenderObject::getAbsolutePos() const {
|
||||
return current;
|
||||
}
|
||||
std::vector< uint64_t >
|
||||
RenderObject::colidesWith( const RenderObject &other ) const {
|
||||
if ( !hasCollisions() || !other.hasCollisions() || getHidden() ||
|
||||
@@ -289,7 +292,8 @@ void RenderObject::rotateCounterClockwise( int angle ) {
|
||||
rotateClockwise( 360 - ( angle % 360 ) );
|
||||
}
|
||||
Vec2D< double > RenderObject::computeAlignmentAdditions() {
|
||||
double x_addition = 0, y_addition = 0;
|
||||
double x_addition = 0;
|
||||
double y_addition = 0;
|
||||
auto dimensions = renderer->getDoubleDimensions();
|
||||
auto width_diff = dimensions.getX() - 1;
|
||||
auto height_diff = dimensions.getY() - 1;
|
||||
|
||||
Reference in New Issue
Block a user