Hi @dale ,
I followed your sample Showing Objects Transforming Dynamically to have a getter that draws dynamic transformations on objects.
The problem is that the object is not dynamically shown when display mode is Rendered. All other modes (Shaded, Wireframe) work well.
Do you know how to display the object also in Rendered mode? It’s not important if it’s drawn as wireframe or shaded or with its default material.
I attach here the sample I used (I noticed the code in your link is a bit outdated). It lets the user select an object and define two points to translate it.
cmdSampleTranslate.cpp (5.0 KB)
Thank you very much,
Pablo
dale
(Dale Fugier)
April 24, 2020, 7:34pm
2
Hi @Pablo_Garcia-Amorena ,
Try this:
#include "stdafx.h"
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
//
// BEGIN SampleMove command
//
class CRhinoGetTranslationPoint : public CRhinoGetXform
{
public:
CRhinoGetTranslationPoint() = default;
~CRhinoGetTranslationPoint() = default;
BOOL CalculateTransform(CRhinoViewport& vp, const ON_3dPoint& pt, ON_Xform& xform);
};
BOOL CRhinoGetTranslationPoint::CalculateTransform(CRhinoViewport& vp, const ON_3dPoint& pt, ON_Xform& xform)
{
UNREFERENCED_PARAMETER(vp);
ON_3dVector dir = pt - m_basepoint;
This file has been truncated. show original
– Dale
That made the thing! Thank you @dale
Pablo