Hi,
can anybody help me, how to construct a truncated cone shape?
My idea is to use a CylinderShape inside of a TransformableShape.
So when I 'distort' a cylinder by shinking its top, it becomes like a truncated cone (and I figure this way I can create many cool convex shapes).
I know that its possible, since the camera projection matrix does something similar (a kind of not affine transformation).
But the TransformableShape takes a 3x3 matrix.
So hmm, and then which matrix cell do I need to set?
truncated cone
Re: truncated cone
The TransformableShape only supports the nontranslational affine subset of transforms. You can, however, use a WrappedShape built from a couple of thin CylinderShapes to make a truncated cone and many other shapes that can't be expressed by any transform.
Re: truncated cone
oh, okay then.
But the wrapped shape does compute the convex hull points, and uses them? Which means the parts are not perfectly round then? Like when I use a CylinderShape, the surface on the cylinder is smoothly round,
and the wrapped shape is not, right?
What I now do, is just create a ConvexHullShape using my graphical representations vertices for all my convex objects.
I guess the two methods have the same effect (in my version the number of samples matches the graphical representation), right?
But the wrapped shape does compute the convex hull points, and uses them? Which means the parts are not perfectly round then? Like when I use a CylinderShape, the surface on the cylinder is smoothly round,
and the wrapped shape is not, right?
What I now do, is just create a ConvexHullShape using my graphical representations vertices for all my convex objects.
I guess the two methods have the same effect (in my version the number of samples matches the graphical representation), right?
Re: truncated cone
The WrappedShape directly uses the implicit shapes. So, if you built a truncated cone out of two thin cylinders, it would be perfectly rounded around the edges- just like the cylinders are.
You can think of ConvexHullShapes as WrappedShapes over a bunch of individual "PointShapes". Unlike the ConvexHullShape, the WrappedShape can choose any shapes for its constituents.
You can think of ConvexHullShapes as WrappedShapes over a bunch of individual "PointShapes". Unlike the ConvexHullShape, the WrappedShape can choose any shapes for its constituents.