View Full Version : greeting and some questions
ldrrn
01-30-2010, 01:30 AM
Hi everyone, i'm looking for a game library for my 2.5D (2d environment and 3d avatars) game. I have done some research on clanlib, so far it meets my requirement quite well, except for one feature 3d object picking, i checked and get no info from the doc and forum. is this feature available in clanlib 2.1?
rombust
01-30-2010, 10:33 PM
ClanLib does not have direct support in loading 3d Models.
There are numerious methods of handling 3d. A generic method that everyone likes (fast and flexible) is difficult to make.
However, the ClanLib V2.1.1 package examples contain Collada and Lib3ds object import that you may want to look at.
ldrrn
01-31-2010, 04:01 AM
thanks for the reply, what about object picking? such as casting a ray (CL_LineRay3f ?) from mouse cursor into the screen and return all intersecting objects. does clanlib has this functionality build in?
rombust
01-31-2010, 10:55 AM
Ah, I see what you mean! I should have read your post more clearly :whistling:
There is no direct function to do what you ask. (Convert a CL_Pointf into a CL_LineRay3f using the current ModelView and Projection matrix).
I have done it partially succesfully before, but unfortunately I deleted the code.
The GUI3D example does a similar thing, but in an inefficient way.
CL_Mat4f requires a function that contains the mathematics of gluUnProject() http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml
Then see this: http://forums.xna.com/forums/p/46239/276736.aspx
ldrrn
01-31-2010, 02:00 PM
that's what i suspected, hopefully i could roll out one myself and contribute back :)
sphair
01-31-2010, 03:34 PM
There is also some picking code in the DiceWars example.
ldrrn
01-31-2010, 05:04 PM
cool, i'll check it out
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.