Results 1 to 3 of 3

Thread: outline.collision test error

  1. #1

    Default outline.collision test error

    I have a character outline and a self made box outline,
    I want to check collision between them with generating collision info like normal and penetration depth.
    the problem is that on outline.collision an assert error is thrown, I've tracked it down and its on penetration depth calculation, it finds uneven points and crash the app when trying to get the line information that is out of vector range.

    the box is calculated like so:
    PHP Code:
    CL_Contour contour;
    contour.get_points().push_backCL_Pointf(150.0f,50.0f) );
    contour.get_points().push_backCL_Pointf(150.0f,150.0f) );
    contour.get_points().push_backCL_Pointf(300.0f,150.0f) );
    contour.get_points().push_backCL_Pointf(300.0f,50.0f) );
    the charoutline is from a png file.
    I'm also using set_aligment and set_translation for charoutline

    Here is the source: ClanLibTest.rar

  2. #2


    Seems to work if I enable metadata
    Last edited by spider853; 12-19-2012 at 09:37 PM.

  3. #3
    ClanLib Developer
    Join Date
    May 2007


    CL_Contour contour; 
    contour.get_points().push_back( CL_Pointf(150.0f,50.0f) );
    That looks like unexpected usage. I have not checked the internals to see if that is safe.

    Ideally contour should contain: contour.add_point(const CL_Pointf &point);
    And the get_points() should only return a const reference.

Similar Threads

  1. HDR Test
    By rombust in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 10-12-2010, 01:03 PM
  2. how to detect the outline of a drawing drawn by CL_Draw?
    By jckhoa in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-16-2010, 09:24 AM
  3. Outline Collision Resolution Mayhem!
    By Dincu in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-24-2009, 11:18 PM
  4. Hecatomb test 2
    By mikael in forum Novashell Game Creation System
    Replies: 1
    Last Post: 06-16-2008, 06:24 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts