本文整理汇总了C++中Control::GetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Control::GetValue方法的具体用法?C++ Control::GetValue怎么用?C++ Control::GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control::GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: HitTest
int FExtrudeMod::HitTest(
TimeValue t, INode* inode, int type, int crossing,
int flags, IPoint2 *p, ViewExp *vpt, ModContext* mc)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return FALSE;
}
GraphicsWindow *gw = vpt->getGW();
Point3 pt;
HitRegion hr;
int savedLimits, res = 0;
Matrix3 tm = CompMatrix(t,inode,mc);
MakeHitRegion(hr,type, crossing,4,p);
gw->setHitRegion(&hr);
gw->setRndLimits(((savedLimits = gw->getRndLimits()) | GW_PICK) & ~GW_ILLUM);
gw->setTransform(tm);
gw->clearHitCode();
base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt,HOLLOW_BOX_MRKR);
if (gw->checkHitCode()) {
vpt->LogHit(inode, mc, gw->getHitDistance(), 0, NULL);
res = 1;
}
gw->setRndLimits(savedLimits);
return res;
}
示例3: HitTest
int AFRMod::HitTest(
TimeValue t, INode* inode,
int type, int crossing, int flags,
IPoint2 *p, ViewExp *vpt, ModContext* mc)
{
GraphicsWindow *gw = vpt->getGW();
Point3 pt;
HitRegion hr;
int savedLimits, res = 0;
Matrix3 tm = CompMatrix(t,inode,mc);
MakeHitRegion(hr,type, crossing,4,p);
gw->setHitRegion(&hr);
gw->setRndLimits(((savedLimits = gw->getRndLimits()) | GW_PICK) & ~GW_ILLUM);
gw->setTransform(tm);
// Hit test start point
if ((flags&HIT_SELONLY && sel[0]) ||
(flags&HIT_UNSELONLY && !sel[0]) ||
!(flags&(HIT_UNSELONLY|HIT_SELONLY)) ) {
gw->clearHitCode();
p1->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt,HOLLOW_BOX_MRKR);
if (gw->checkHitCode()) {
vpt->LogHit(inode, mc, gw->getHitDistance(), 0, NULL);
res = 1;
}
}
// Hit test end point
if ((flags&HIT_SELONLY && sel[1]) ||
(flags&HIT_UNSELONLY && !sel[1]) ||
!(flags&(HIT_UNSELONLY|HIT_SELONLY)) ) {
gw->clearHitCode();
p2->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
gw->marker(&pt,HOLLOW_BOX_MRKR);
if (gw->checkHitCode()) {
vpt->LogHit(inode, mc, gw->getHitDistance(), 1, NULL);
res = 1;
}
}
gw->setRndLimits(savedLimits);
return res;
}
示例4: GetSubObjectCenters
void FExtrudeMod::GetSubObjectCenters (SubObjAxisCallback *cb,
TimeValue t, INode *node,ModContext *mc) {
Matrix3 tm = CompMatrix(t,node,mc);
Point3 p;
mp_base->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
tm.PreTranslate(p);
cb->Center(tm.GetTrans(),0);
}
示例5: LocalValidity
Interval AFRMod::LocalValidity(TimeValue t)
{
// aszabo|feb.05.02 If we are being edited, return NEVER
// to forces a cache to be built after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
Interval iv = FOREVER;
float v;
Point3 pt;
pblock->GetValue(PB_FALLOFF,t,v,iv);
pblock->GetValue(PB_PINCH,t,v,iv);
pblock->GetValue(PB_BUBBLE,t,v,iv);
p1->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
p2->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
return iv;
}
示例6: GetWorldBoundBox
void FExtrudeMod::GetWorldBoundBox (TimeValue t, INode* inode,
ViewExp * /*vpt*/, Box3& box, ModContext *mc) {
Matrix3 tm = CompMatrix(t,inode,mc);
Point3 pt;
box.Init();
mp_base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
box += pt * tm;
}
示例7: CompMatrix
Matrix3 SymmetryMod::CompMatrix (TimeValue t, INode *inode, ModContext *mc, Interval *validity) {
Interval localInterval(FOREVER);
if (!validity) validity = &localInterval;
Matrix3 tm(1);
mp_mirror->GetValue(t,&tm,*validity,CTRL_RELATIVE);
if (mc && mc->tm) tm = tm * Inverse(*(mc->tm));
if (inode) tm = tm * inode->GetObjTMBeforeWSM(t,validity);
return tm;
}
示例8: GetValidity
//aszabo|feb.06.02 - When LocalValidity is called by ModifyObject,
// it returns NEVER and thus the object channels are marked non valid
// As a result, the mod stack enters and infinite evaluation of the modifier
// ModifyObject now calls GetValidity and CORE calls LocalValidity to
// allow for building a cache on the input of this modifier when it's
// being edited
Interval MirrorMod::GetValidity(TimeValue t)
{
Interval iv = FOREVER;
Matrix3 mat(1);
tmControl->GetValue(t,&mat,iv,CTRL_RELATIVE);
float o;
pblock->GetValue(PB_OFFSET,t,o,iv);
return iv;
}
示例9: GetSubObjectCenters
void AFRMod::GetSubObjectCenters(
SubObjAxisCallback *cb,TimeValue t,
INode *node,ModContext *mc)
{
Matrix3 tm = CompMatrix(t,node,mc);
Point3 pt(0,0,0), p;
int c=0;
if (sel[0]) {
p1->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
pt += p;
c++;
}
if (sel[1]) {
p2->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
pt += p;
c++;
}
if (c) pt /= float(c);
tm.PreTranslate(pt);
cb->Center(tm.GetTrans(),0);
}
示例10: GetWorldBoundBox
void AFRMod::GetWorldBoundBox(
TimeValue t,INode* inode, ViewExp *vpt,
Box3& box, ModContext *mc)
{
Matrix3 tm = CompMatrix(t,inode,mc);
Point3 pt1, pt2;
box.Init();
p1->GetValue(t,&pt1,FOREVER,CTRL_ABSOLUTE);
box += pt1 * tm;
p2->GetValue(t,&pt2,FOREVER,CTRL_ABSOLUTE);
box += pt2 * tm;
Matrix3 vtm;
vpt->GetAffineTM(vtm);
Point3 vz = vtm.GetRow(2) * Inverse(tm);
Point3 dp = (pt2-pt1);
Point3 v = Normalize(vz^dp) * Length(dp) * 0.2f;
box += (pt2 - (0.2f*dp) + v) * tm;
box += (pt2 - (0.2f*dp) - v) * tm;
v = Normalize(v^dp) * Length(dp) * 0.2f;
box += (pt2 - (0.2f*dp) + v) * tm;
box += (pt2 - (0.2f*dp) - v) * tm;
}
示例11: LocalValidity
Interval FExtrudeMod::LocalValidity(TimeValue t) {
// aszabo|feb.05.02 If we are being edited,
// return NEVER to forces a cache to be built after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
Interval iv = FOREVER;
float v;
Point3 pt;
int type;
mp_pblock->GetValue(kFexAmount,t,v,iv);
mp_pblock->GetValue(kFexScale,t,v,iv);
mp_pblock->GetValue (kFexType, t, type, iv);
if (type==2) mp_base->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
return iv;
}
示例12: LocalValidity
Interval FExtrudeMod::LocalValidity(TimeValue t)
{
// aszabo|feb.05.02 If we are being edited, return NEVER
// to forces a cache to be built after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
Interval iv = FOREVER;
float v;
Point3 pt;
pblock->GetValue(PB_AMOUNT,t,v,iv);
pblock->GetValue(PB_SCALE,t,v,iv);
base->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
return iv;
}
示例13: CompMatrix
Matrix3 MirrorMod::CompMatrix(
TimeValue t,INode *inode,ModContext *mc)
{
Interval iv;
Matrix3 tm(1);
tmControl->GetValue(t,&tm,iv,CTRL_RELATIVE);
if (mc && mc->tm) tm = tm * Inverse(*(mc->tm));
if (inode)
{
#ifdef DESIGN_VER
tm = tm * inode->GetObjTMBeforeWSM(GetCOREInterface()->GetTime(),&iv);
#else
tm = tm * inode->GetObjTMBeforeWSM(t,&iv);
#endif // DESIGN_VER
}
return tm;
}
示例14: GetWorldBoundBox
void FExtrudeMod::GetWorldBoundBox(
TimeValue t,INode* inode, ViewExp *vpt,
Box3& box, ModContext *mc)
{
if ( ! vpt || ! vpt->IsAlive() )
{
// why are we here
DbgAssert(!_T("Invalid viewport!"));
return;
}
Matrix3 tm = CompMatrix(t,inode,mc);
Point3 pt;
box.Init();
base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
box += pt * tm;
}
示例15: LocalValidity
Interval SymmetryMod::LocalValidity(TimeValue t) {
// aszabo|feb.05.02 If we are being edited,
// return NEVER to forces a cache to be built after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
Interval iv = FOREVER;
int foo;
mp_pblock->GetValue(kSymAxis, t, foo, iv);
mp_pblock->GetValue (kSymFlip, t, foo, iv);
mp_pblock->GetValue(kSymWeld, t, foo, iv);
mp_pblock->GetValue(kSymSlice, t, foo, iv);
float thresh;
mp_pblock->GetValue (kSymThreshold, t, thresh, iv);
Matrix3 mat(1);
mp_mirror->GetValue(t,&mat,iv,CTRL_RELATIVE);
return iv;
}