[vtkusers] PLEASE HELP, convert Tcl to C++ code
Rio
rioking13 at gmail.com
Thu Jan 11 08:22:53 EST 2007
Hi, I am a quite newbie to VTK.
I am involving in a project. I consider to write a VTK mouse picking method
in C++ code. I know the sample Tcl code, partially as following:
# Create a text mapper and actor to display the results of picking.
vtkTextMapper textMapper
set tprop [textMapper GetTextProperty]
$tprop SetFontFamilyToArial
$tprop SetFontSize 10
$tprop BoldOn
$tprop ShadowOn
$tprop SetColor 1 0 0
vtkActor2D textActor
textActor VisibilityOff
textActor SetMapper textMapper
in the sample, tprop is created, but what kind of object it is?
vtkTextProperty or vtkProperty? Or i dunt need to specify the type of
object?
Can anybody help me what is the code in C++ ???
vtkTextMapper textMapper
set tprop [textMapper GetTextProperty]
set selPt [picker GetSelectionPoint]
set x [lindex $selPt 0]
set y [lindex $selPt 1]
set pickPos [picker GetPickPosition]
set xp [lindex $pickPos 0]
set yp [lindex $pickPos 1]
set zp [lindex $pickPos 2]
Thanks very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070111/a60055cd/attachment.htm>
More information about the vtkusers
mailing list