本文整理汇总了C++中IObjParam::GetSubObjectLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ IObjParam::GetSubObjectLevel方法的具体用法?C++ IObjParam::GetSubObjectLevel怎么用?C++ IObjParam::GetSubObjectLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObjParam
的用法示例。
在下文中一共展示了IObjParam::GetSubObjectLevel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Display
int FExtrudeMod::Display(
TimeValue t, INode* inode, ViewExp *vpt,
int flagst, ModContext *mc)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
GraphicsWindow *gw = vpt->getGW();
Point3 pt;
Matrix3 tm = CompMatrix(t,inode,mc);
int savedLimits;
gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
gw->setTransform(tm);
// Draw start point
if (ip && ip->GetSubObjectLevel() == 1) {
//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt,HOLLOW_BOX_MRKR);
gw->setRndLimits(savedLimits);
return 0;
}
示例2: Display
int SymmetryMod::Display (TimeValue t, INode* inode, ViewExp *vpt, int flagst, ModContext *mc) {
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
GraphicsWindow *gw = vpt->getGW();
Point3 pt[4];
Matrix3 tm = CompMatrix(t,inode,mc);
int savedLimits;
gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
gw->setTransform(tm);
if (mp_ip && mp_ip->GetSubObjectLevel() == 1) {
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
DrawLineProc lp(gw);
DrawGizmo (vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);
gw->setRndLimits(savedLimits);
return 0;
}
示例3: Display
int MirrorMod::Display(
TimeValue t, INode* inode, ViewExp *vpt,
int flagst, ModContext *mc)
{
GraphicsWindow *gw = vpt->getGW();
Point3 pt[4];
Matrix3 tm = CompMatrix(t,inode,mc);
int savedLimits;
gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
gw->setTransform(tm);
if (ip && ip->GetSubObjectLevel() == 1) {
//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
DrawLineProc lp(gw);
DrawGizmo(
vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);
gw->setRndLimits(savedLimits);
return 0;
}
示例4: Display
int AFRMod::Display(
TimeValue t, INode* inode, ViewExp *vpt,
int flagst, ModContext *mc)
{
GraphicsWindow *gw = vpt->getGW();
Point3 pt[4];
Matrix3 tm = CompMatrix(t,inode,mc);
int savedLimits;
gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
gw->setTransform(tm);
// Draw start point
if (ip && ip->GetSubObjectLevel() == 1) {
if (sel[0])
gw->setColor(LINE_COLOR, (float)1.0, (float)0.0, (float)0.0);
else //gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
p1->GetValue(t,&pt[0],FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt[0],HOLLOW_BOX_MRKR);
// Draw end point
if (ip && ip->GetSubObjectLevel() == 1) {
if (sel[1])
gw->setColor(LINE_COLOR, (float)1.0, (float)0.0, (float)0.0);
else //gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
p2->GetValue(t,&pt[1],FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt[1],HOLLOW_BOX_MRKR);
// Draw a line inbetween
if (ip && ip->GetSubObjectLevel() == 1) {
//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
} else {
//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
}
gw->polyline(2, pt, NULL, NULL, 0, NULL);
// Draw arrowhead
Matrix3 vtm;
vpt->GetAffineTM(vtm);
Point3 vz = vtm.GetRow(2) * Inverse(tm);
Point3 dp = (pt[1]-pt[0]);
Point3 v = Normalize(vz^dp) * Length(dp) * 0.2f;
pt[0] = pt[1] - (0.2f*dp) + v;
pt[2] = pt[1] - (0.2f*dp) - v;
gw->polyline(3, pt, NULL, NULL, 0, NULL);
v = Normalize(v^dp) * Length(dp) * 0.2f;
pt[0] = pt[1] - (0.2f*dp) + v;
pt[2] = pt[1] - (0.2f*dp) - v;
gw->polyline(3, pt, NULL, NULL, 0, NULL);
gw->setRndLimits(savedLimits);
return 0;
}