Re: How to preserve objects size when moving camera

David E DeMarle via vtkusers <[email protected]>
Newsgroups gmane.comp.lib.vtk.user
Message-ID <CANjZAi8bsvn-DJMMCZ61pvUKeFeVjwpwHYUih2d-MQvmnVQY4Q@mail.gmail.com>
Will turning off perspective do what you want?
https://www.vtk.org/doc/nightly/html/classvtkCamera.html#a5b0e647798e7f45d358d8039ff41b378
void vtkCamera::SetParallelProjection(vtkTypeBool
<https://www.vtk.org/doc/nightly/html/vtkABI_8h.html#a663dee2c85b2a185fb34cb877d5208da>
 flag)

David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Fri, Dec 14, 2018 at 10:55 AM Andrey Ivanov <[email protected]>
wrote:

> Hello!
>
> I am trying to draw a lot of objects with the same shape for CAD system.
> Let it be stars or circles for example.
> The number of such circles can be about 1000-10000.
> I would like to *preserve their size* when moving the camera, scaling
> frustrum and changing distance to objects.
>
> For now I found two approaches:
>
> 1. Use vtkDistanceToCamera
> An example from
> https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/DistanceToCamera/
> is great
> for low number of objects, however when their numer grows, the interface
> starts to freeze due to
> rescaling of shapes on each interaction with camera.
>
> 2. Use points (squares with width equal to 4 pixels).
> It works fast and points size is fixed, but I would like to have more
> complex shapes, like triangles and circles.
>
>
> Is there another approach to solve this problem? It seems that with pure
> OpenGL this can be implemented rather efficiently,
> so I am looking for a way to do it in VTK.
>
> Best regards,
> Andrey Ivanov
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.