Jump to content

  • Log In with Google      Sign In   
  • Create Account


sdaq

Member Since 17 Dec 2008
Offline Last Active Mar 06 2012 11:26 AM

#4917974 How do I get my Java GUI to use a C++ library?

Posted by sdaq on 29 February 2012 - 03:48 PM

thank you swiftcoder!


#4872250 Assimp Models

Posted by sdaq on 13 October 2011 - 11:39 AM

Alright, well I guess I'll give it a shot! With Assimp you only have to make one mesh loader, and then your able to load in any model that Assimp supports without having to modify that code correct?


it's super straight forward, just follow this link: http://assimp.sourceforge.net/lib_html/usage.html

inspect the aiScene object after importing with a debugger... you can see that it has a root node, a transform, and a set of arrays for the meshes, materials, animations, etc... the root node is a scene graph that has children that index into those arrays. basically you just traverse the tree and copy out the information that you need into your own data structures. check out the source, it comes with a very simple opengl demo. good luck!


#4771538 how to model navigation lights on ships at sea

Posted by sdaq on 08 February 2011 - 03:52 PM

update, I found some information related to the opengl function glPointParameter which seems to be relevant:

void glPointParameter{if}(GLenum pname, GLfloat param);
void glPointParameter{if}v(GLenum pname, const TYPE * param);

Sets values related to rendering point primitives.

If pname is GL_POINT_DISTANCE_ATTENUATION, then param is an array of three floating-point values (a,b,c) containing the constant, linear, and quadratic coefficients for deriving the size and brightness of a point, based upon eye-coordinate distance, d:

derivedSize = clamp(size*sqrt(1/(a+b*d+c*(d^2))))

If pname is set to GL_POINT_SIZE_MIN or GL_POINT_SIZE_MAX, param is an absolute limit (either lower or upper bound, respectively) used in the previous equation to clamp the derived point size.

If multisampling is enabled and pname is GL_POINT_FADE_THRESHOLD_SIZE, then param specifies a different lower limit (threshold) for the size of a point. if derivedSize < threshold, then the factor fade is computed to modulate the point's alpha, thus diminishing its brightness:

fade = (derivedSize/threshold)^2


I think I want to use this formula to scale the textured quad and modulate the brightness.


#4764454 Deconstructing the (OpenGL) modelview matrix

Posted by sdaq on 25 January 2011 - 08:34 AM

this link will help you understand how gluLookAt builds the matrices: http://www.manpagez....an/3/gluLookAt/

hope that helps!


#4764406 Deconstructing the (OpenGL) modelview matrix

Posted by sdaq on 25 January 2011 - 06:02 AM

howdy,

correct me if I'm wrong but you are saying that because all you are doing is turning (not changing position) the translation row of the ModelView matrix should be the same as before. notice that if you normalize the position (0.0, -4.82..., -1.32) you get a distance of 5.0... that means you are rotating around a point, not rotating your view. hope that helps!


PARTNERS