View Full Version : Accessing the corner points of a 3D object
03-05-2011, 04:16 PM
I hope that someone here can help. I am trying to produce a simple 3D game using WebGL, but I have one major issue. I have not been able to come up with a good boundary checking method. Unlike in a 2D space where it is relatively easy to calculate where all of the relevant points are, in the 3D space I have to worry about perspective altering the relative location of all of the points of my object. So the question that I am asking is, is there either a good way of accessing the precalculated values of the points of let us say a cubeís corners or is there a good way of calculating these points myself? Any help I can receive on this would be much appreciated, I am actually writing this for a class, and itís due soon. Thanks
03-05-2011, 05:29 PM
I am sorry about double posting, but I figured out a way to make what I am asking a bit clearer. What I am specifically trying to do is access the values stored in a WebGLBuffer as if they were stored in an array. The reason for this is that I know that the data that I want is in the buffer, I wrote the original data into it, and rather then calculating the data separately I would rather just read the data back out of the buffer after is has been altered appropriately. That said, I have been looking all through the WebGL spec and the OpenGL ES spec, and can only find functions which write to a buffer, nothing that can read back from one. If anyone has some creative ideas for how to do this, I would love to hear them.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.