[vtkusers] How can one fully specify orientation of vtkGlyph3D glyphs?
cmbruns at stanford.edu
Thu Jul 7 17:37:19 EDT 2005
Using glyphs is so very very much faster than using thousands of
But I cannot figure out how to fully specify the orientation of the
glyph at each position.
Calling SetVectorModeToUseNormal() certainly has an effect on the glyph
orientation, but leaves one entire degree of freedom unspecified.
For example, suppose each glyph were the shape of a fish. I could
direction from the tail to the head of the fish by setting the normal
each position appropriately. But I cannot figure out how to also
directions toward which the fish's tummy and back and left side and
right side face. There is
one rotational degree of freedom that is not captured by the normal vector
So fish orientations cannot be fully specified in a vtkGlyph3D.
Spheres are OK.
Cones are OK. Cylinders are OK. Anything with an axis of radial
symmetry is OK.
Tacos are not OK. Fish are not OK.
Does anyone have an example of how to fully specify the orientation in
dimensions of each glyph? Alternatively, are there non-glyph tricks for
thousands of identical things rendered without resorting to 22nd century
Thanks in advance.
// This is in Java
vtkGlyph3D lineGlyph = new vtkGlyph3D();
vtkPoints linePoints = new vtkPoints();
vtkFloatArray lineNormals = new vtkFloatArray();
lineGlyph.SetVectorModeToUseNormal(); // Take direction from normal
// Populate the positions and normal vectors for each object...
linePoints.InsertNextPoint(center.getX(), center.getY(), center.getZ());
vtkPolyData lineData = new vtkPolyData();
More information about the vtkusers