Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Drawable being abstract, how do i use it?  (Read 1962 times)

0 Members and 1 Guest are viewing this topic.

gabinir

  • Newbie
  • *
  • Posts: 2
    • View Profile
Drawable being abstract, how do i use it?
« on: April 09, 2011, 04:45:11 pm »
In the original c++ version of sfml, i used a class called anim that inherit from Drawable.

Now it seems as if i have to implement abstract methods (as Drawable is abstract) such as:
   public abstract Vector2 TransformToGlobal(Vector2 point);
        public abstract Vector2 TransformToLocal(Vector2 point);

How do i use Drawable now, without having to implement those methods?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Drawable being abstract, how do i use it?
« Reply #1 on: April 09, 2011, 06:07:24 pm »
The drawable class is not meant to be derived in SFML.Net. Every function is abstract, I must simulate the original API's polymorphism that was lost in CSFML.
Laurent Gomila - SFML developer

gabinir

  • Newbie
  • *
  • Posts: 2
    • View Profile
Drawable being abstract, how do i use it?
« Reply #2 on: April 09, 2011, 06:59:27 pm »
So how do i draw animations?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Drawable being abstract, how do i use it?
« Reply #3 on: April 09, 2011, 07:03:18 pm »
Do it without inheriting from Drawable ;)
Laurent Gomila - SFML developer