[vtkusers] Deforming mesh.
Rodrigo Pinheiro
rodrigo_pinheiro at hotmail.com
Mon Feb 24 08:59:04 EST 2003
Dear Nark,
I know it can sound strange, but if you go to the source code, you will
get a good insight on how to implement that.
I have been working with VTK for non-linear transient finite element
results visualisation. I am using vtk 3.2, so my codes are out-of-date, but
the concept should remains the same.
For the dataset, I have two possibilities:
- No adaptivity. The polygons and points datasets are constant, only the
coords should be updated. There are functions you can use for doing that,
but depends on yous data structure. I don´t use the vtk pipeline for that,
the idea is to have the coord vector for each state already loaded into the
memory, and just replace the pointer whenever you need. It is faster, but
requires more memory (but you can work arround and optimize the memory
using). Another way can be reading the coords from file as necessary. I am
using HDF5 as file standard, and doing so I can easily control the dataset
being read from the file.
- With adaptivity. The polygons and points datasets are always changing
from step to step. In this case, I have an actor for each state, which I
turn on and of as necessary.
Another problem is the timer. Depending the platform you are working,
the implementation will be different. With windows and VC++, you can set a
timer and answer to a "timer" message with a specific function that will
prepare the necessary changes for you and call the renderer update.
Please, if you can send me more information, I will be gald to inform
more details about the code.
Regards,
Rodrigo
>From: Mark Foskey <mark_foskey at unc.edu>
>To: vtkusers at public.kitware.com
>Subject: [vtkusers] Deforming mesh.
>Date: Sun, 23 Feb 2003 18:55:20 -0500
>
>Is there a standard way to render a polygonal mesh that is being
>deformed over time? I envision grabbing the point data by something
>like GetPoint() or GetPointData() and then modifying it. But it's not
>clear from the documentation that I get pointers to the actual data rather
>than a copy.
>
>I'm also thinking I will want to subclass an InteractorStyle and use a
>Timer, but I can't find documentation for how frequently Timer events go
>off, or for what the significance of creating and destroying a timer is.
>Perhaps the documentation for CreateTimer() should be written on a more
>elementary level, even maybe with more background. The same applies to the
>comment for vtkInteractorStyle::OnTimer() -- why does it only run when the
>mouse button is down, for instance? (There' also is a small typo -- it
>should read "Rotate, Spin, etc", not "Rotate, Rotate, etc", right?)
>
>Thanks for any help,
>Mark
>
>--
>Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab
>mark_foskey at unc.edu Department of Radiology, CB 7515, UNC
>http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515
>
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
More information about the vtkusers
mailing list