HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 

 transform AABox

Go down 

PostSubject: transform AABox   Thu Aug 26, 2010 12:27 pm

Hello, I have question regarding tranformations. I am using SPARK with SFML and I need to rotate AABox around Z axis. Is it possible? I would like to use AABox as an obstacle and create collisions with my 2D world but I've get stucked with this rotation thing. Please is there any way to do this?
Back to top Go down

Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: transform AABox   Thu Aug 26, 2010 12:47 pm

I think there is no way to rotate an aabox, simply because AA stands for Axis-Aligned, so the AABox class was done following this rule.

But you can write your own Zone, for example name it 'Box', and code it to handle rotation. For that, you can for example use 3 floats to describe dimensions and a Vector3D for the direction of the box.
Back to top Go down
View user profile

PostSubject: Re: transform AABox   Fri Aug 27, 2010 8:14 am

thanks for the reply. I thought it will be possible because of Tranformable parent. I'll try to subclass zone.
Back to top Go down

Messages : 539
Date d'inscription : 2009-07-14
Age : 35

PostSubject: Re: transform AABox   Mon Aug 30, 2010 2:00 pm

Yes you cannot rotate an AABox by definition. You can still subclass Zone to create it if you want. An oriented box will be added to SPARK 2
Back to top Go down
View user profile http://spark.developpez.com
Sponsored content

PostSubject: Re: transform AABox   

Back to top Go down
transform AABox
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: