1
\$\begingroup\$

With all other shapes in bullet, you can easily get the transform from the MotionState which holds the origin, the scale, and the rotation. There seems to be no way to get the same information about a btStaticPlaneShape. How can I get this information, so that I can build a rectangle with 4 vertices that will act as a representation in OpenGL?

\$\endgroup\$
  • \$\begingroup\$ Edited to clarify the question being asked. Please amend further if it's changed the meaning in any way. \$\endgroup\$ – MrCranky Feb 11 '14 at 15:03
1
\$\begingroup\$

Looks like btStaticPlaneShape is an infinite plane, so you could pick an arbitrary point and just draw a really big plane centered on that that point using the normal stored in btStaticPlaneshape

\$\endgroup\$
  • 1
    \$\begingroup\$ Seems sensible to me. I'd add the small refinement that you'd probably want the rectangle centre to be pretty close to the camera that's rendering it. It should be fairly easy to calculate the closest point on the infinite plane to the camera, then project out 4 vertices, one on each cardinal axis, some large distance from that point. However the original asker should be aware that super-large polygons can sometimes have clipping issues, not to mention the issue of UV mapping and texture resolution. Depending on how/if you need to texture, you might be better making a grid of smaller triangles \$\endgroup\$ – MrCranky Feb 11 '14 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.