Hello everyone.
I want to draw non-highlighted (non-overlay) in dynamic drawing, what should I do.
SC_DRAWOVERLAY//CRhinoDisplayConduit , DynamicDraw() //CRhinoGetPoint ,It seems to be overlay.
Is it possible?
like this:
In addition:
bool COrientGemsOnSufaceConduit::ExecConduit(CRhinoDisplayPipeline& dp, UINT nActiveChannel, bool& bTerminateChannel)
{
UNREFERENCED_PARAMETER(bTerminateChannel);
if (nActiveChannel == CSupportChannels::SC_CALCBOUNDINGBOX)
{
int i;
for (i = 0; i < m_objects.Count(); i++)
{
const CRhinoObject* obj = m_objects[i];
if (obj)
{
ON_BoundingBox bbox = obj->BoundingBox();
bbox.Transform(m_xform);
m_pChannelAttrs->m_BoundingBox.Union(bbox);
}
}
}
else if (nActiveChannel == CSupportChannels::SC_DRAWOVERLAY)
{ int i, count = m_objects.Count();
if (count > 0)
{
dp.PushModelTransform(m_xform);
for (i = 0; i < count; i++)
{
const CRhinoObject* obj = m_objects[i];
if (obj)
{
const ON_Brep* brep;
ON::object_type type = obj->ObjectType();
if (type == ON::brep_object)
{
brep = ON_Brep::Cast(obj->Geometry());
if (brep)
{
CDisplayPipelineMaterial mat;
dp.SetupDisplayMaterial(mat, RGB(0, 0, 255));
dp.DrawShadedBrep(brep, &mat, nullptr);
}
}
if (dp.InterruptDrawing())
break;
}
}
dp.PopModelTransform();
}
}
return true;
}
Is there any error in this code? The Xform in the code is constantly changing, and the displayed objects will still be trimmed or displayed incompletely.
This code in (DynamicDraw() / / CRhinoGetPoint) has the same effect, and the display is incomplete.
Thank you in advance!