Vector and Plane classes?

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Vector and Plane classes?

Postby tenfour04 » Sat Nov 27, 2010 6:34 pm

I'm new to 3D graphics, and I was trying to get ready to implement frustrum culling, using this tutorial: http://www.lighthouse3d.com/opengl/viewfrustum/index.php?gaplanes.

In their implementation, they use some classes for Plane and Vec3, which have methods for calculating the distance between a plane and a point (defined by a Vec3) and for defining the plane either as three clockwise points or as a point and a normal vector. I'm not experienced with C++, so I hope class and method are the right words.

So, do we have access to classes like that already in Android ? Or do I need to brush up on my matrix math and create my own?

Thanks.
tenfour04
Freshman
Freshman
 
Posts: 3
Joined: Fri Nov 26, 2010 5:45 pm

Top

Re: Vector and Plane classes?

Postby jonbonazza » Sat Nov 27, 2010 9:24 pm

You will need to create your own.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Vector and Plane classes?

Postby benny! » Sun Nov 28, 2010 9:59 am

@tenfour4:
You could also have a search on http://code.google.com - I guess nearly every OpenGL ES framework/Android 3d lib already have classes like these.
E.g.:
http://code.google.com/p/apps-for-android/source/browse/trunk/HeightMapProfiler/src/com/android/heightmapprofiler/Vector3.java

So, you might not have to re-invent the wheel twice - though it might be a good learning experience to create them for your own,
User avatar
benny!
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Tue Nov 27, 2007 3:36 pm
Location: end of www

Re: Vector and Plane classes?

Postby jonbonazza » Sun Nov 28, 2010 4:11 pm

http://code.google.com/p/libgdx/

That engine has the classes you want.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: Google [Bot] and 3 guests