本文整理汇总了C++中GraphicsWindow::getTransform方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphicsWindow::getTransform方法的具体用法?C++ GraphicsWindow::getTransform怎么用?C++ GraphicsWindow::getTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicsWindow
的用法示例。
在下文中一共展示了GraphicsWindow::getTransform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Display
int bhkProxyObject::Display(TimeValue t, INode* inode, ViewExp *vpt, int flags)
{
if (forceRedraw)
{
Interface *gi = GetCOREInterface();
gi->ForceCompleteRedraw();
}
Matrix3 m;
Color color = Color(inode->GetWireColor());
GraphicsWindow *gw = vpt->getGW();
Material *mtl = gw->getMaterial();
m = inode->GetObjectTM(t);
gw->setTransform(m);
DWORD rlim = gw->getRndLimits();
DWORD newrlim = GW_WIREFRAME|GW_Z_BUFFER;
#if VERSION_3DSMAX >= ((5000<<16)+(15<<8)+0) // Version 5+
newrlim |= GW_EDGES_ONLY;
#endif
gw->setRndLimits(newrlim);
if (inode->Selected())
gw->setColor( LINE_COLOR, GetSelColor());
else if(!inode->IsFrozen() && !inode->Dependent())
gw->setColor( LINE_COLOR, color);
Matrix3 m3(true);
float size = 20.0f;
Point3 pts[5];
// X
pts[0] = Point3(-size, 0.0f, 0.0f); pts[1] = Point3(size, 0.0f, 0.0f);
vpt->getGW()->polyline(2, pts, NULL, NULL, FALSE, NULL);
// Y
pts[0] = Point3(0.0f, -size, 0.0f); pts[1] = Point3(0.0f, size, 0.0f);
vpt->getGW()->polyline(2, pts, NULL, NULL, FALSE, NULL);
// Z
pts[0] = Point3(0.0f, 0.0f, -size); pts[1] = Point3(0.0f, 0.0f, size);
vpt->getGW()->polyline(2, pts, NULL, NULL, FALSE, NULL);
//UpdateMesh(t);
int bvType = 0;
pblock2->GetValue(PB_BOUND_TYPE, 0, bvType, FOREVER, 0);
if (bvType != 0)
{
Matrix3 tm = gw->getTransform();
Matrix3 proxyTM(true);
proxyTM.SetTranslate(proxyPos);
gw->setTransform(proxyTM);
proxyMesh.render( gw, mtl, NULL, COMP_ALL);
gw->setTransform(tm);
}
gw->setRndLimits(rlim);
return 0;
}