[vtkusers] Cannot create vtkAxesActor

Mathieu P mtp.vtk at gmail.com
Wed Mar 3 08:05:40 EST 2010


Well guys,

self answer :

When using vtkHybrid and vtkRendering libs, you need to use vtkfreetype.lib
and vtkftgl.lib


Now it's working.


For information, here a code snipplet for 3D axes attached to the left
bottom corner :

There is, you can use the vtkAxesActor and
vtkOrientationMarkerWidget. Here's a snippet; look at the docs to see
the available options.

   vtkAxesActor* axesActor = vtkAxesActor::New();
   axesActor->AxisLabelsOn();
   axesActor->SetShaftTypeToLine();
   axesActor->SetTipTypeToCone();
   axesActor->GetXAxisCaptionActor2D()->GetCaptionTextProperty()-
 >ShadowOff();
   axesActor->GetYAxisCaptionActor2D()->GetCaptionTextProperty()-
 >ShadowOff();
   axesActor->GetZAxisCaptionActor2D()->GetCaptionTextProperty()-
 >ShadowOff();
   _axes = vtkOrientationMarkerWidget::New();
   _axes->SetOrientationMarker(axesActor);
   _axes->SetInteractor(GetInteractor());
   _axes->EnabledOn();
   _axes->InteractiveOff();



from Michel Rice @ http://marc.info/?l=vtkusers&m=119419720362846&w=2


Cordialement,

Mathieu PICCIN
-----------------------
09.80.00.30.57
mathieu.piccin at gmail.com



On Wed, Mar 3, 2010 at 1:54 PM, Mathieu P <mtp.vtk at gmail.com> wrote:

> Hi
>
> Thanks for the answer,
>
> i have set the lib in my project settings,
>
> But when i add vtkHybrid.lib (for vtkAxesActor), or vtkWidgets.lib (for
> vtkOrientationMarkerWidget), i got link error with vtkRenderer.lib.
>
> Without adding these two, i dont have any error with vtkRenderer.lib
>
> That's very incredible !
>
>
> Cordialement,
>
> Mathieu PICCIN
> -----------------------
> 09.80.00.30.57
> mathieu.piccin at gmail.com
>
>
>
> On Wed, Mar 3, 2010 at 12:14 PM, Giancarlo Amati <
> ilferraresebono at hotmail.it> wrote:
>
>>  Hi Mat,
>>
>> you likely have forgot to set the .lib files in the project settings
>> ->linker.
>>
>> Hope this helps.
>> Giancarlo
>>
>> ------------------------------
>> Date: Wed, 3 Mar 2010 11:18:38 +0100
>> From: mtp.vtk at gmail.com
>> To: vtkusers at vtk.org
>> Subject: [vtkusers] Cannot create vtkAxesActor
>>
>>
>> Hi,
>>
>> I have tried to create some 3D axes using vtkAxesActor class, but i always
>> get a linker problem !
>>
>> error LNK2019: unresolved external symbol "public: static class
>> vtkAxesActor * __cdecl vtkAxesActor::New(void)"
>>
>> The code :
>>
>> vtkAxesActor *axes; in my header
>>
>> and
>>
>> axes = vtkAxesActor::New(); in my source
>>
>> Do you know where that come from ?
>> I am developping in C++ using visual Studio, and i have include
>> vtkAxesActor in my files...
>>
>> Note that i have the same problem with vtkOrientationMarkerWidget, cannot
>> create it by using vtkOrientationMarkerWidget::New() !!!
>>
>>
>>
>> Cordialement,
>>
>> Mathieu PICCIN
>> -----------------------
>> 09.80.00.30.57
>> mathieu.piccin at gmail.com
>>
>>
>> ------------------------------
>> Chiacchiera con i tuoi amici via Webcam su Messenger. Videochiamali!<http://www.messenger.it/videoconversazioni.aspx>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100303/281bffb6/attachment.htm>


More information about the vtkusers mailing list