本文整理汇总了C++中IntersectAction::scale方法的典型用法代码示例。如果您正苦于以下问题:C++ IntersectAction::scale方法的具体用法?C++ IntersectAction::scale怎么用?C++ IntersectAction::scale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IntersectAction
的用法示例。
在下文中一共展示了IntersectAction::scale方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: intersectEnter
ActionBase::ResultE Joint::intersectEnter(Action *action)
{
// Use parent class for trivial reject
if(Inherited::intersect(action) == Action::Skip)
return Action::Skip;
// Need to check children
IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
Matrix m = this->getMatrix();
m.mult(this->getJointTransformation());
m.invert();
Pnt3f pos;
Vec3f dir;
m.multFull(ia->getLine().getPosition (), pos);
m.mult (ia->getLine().getDirection(), dir);
Real32 length = dir.length();
if(length < TypeTraits<Real32>::getDefaultEps())
SWARNING << "Joint::intersectEnter: Near-zero scale!" << std::endl;
ia->setLine(Line(pos, dir), ia->getMaxDist());
ia->scale (length );
return ActionBase::Continue;
}
示例2: intersectLeave
Action::ResultE InverseTransform::intersectLeave(Action *action)
{
IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
Matrix m(_invWorld);
Pnt3f pos;
Vec3f dir;
m.multFull(ia->getLine().getPosition (), pos);
m.mult (ia->getLine().getDirection(), dir);
ia->setLine(Line(pos, dir), ia->getMaxDist());
ia->scale(dir.length());
return Action::Continue;
}
示例3: intersectLeave
ActionBase::ResultE Joint::intersectLeave(Action *action)
{
IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
Matrix m = this->getMatrix();
m.mult(this->getJointTransformation());
Pnt3f pos;
Vec3f dir;
m.multFull(ia->getLine().getPosition (), pos);
m.mult (ia->getLine().getDirection(), dir);
ia->setLine(Line(pos, dir), ia->getMaxDist());
ia->scale(dir.length());
return ActionBase::Continue;
}
示例4: intersectEnter
Action::ResultE SkeletonBlendedGeometry::intersectEnter(Action *action)
{
IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
Matrix m(_invWorld);
m.invert();
Pnt3f pos;
Vec3f dir;
m.multFull(ia->getLine().getPosition (), pos);
m.mult (ia->getLine().getDirection(), dir);
ia->setLine(Line(pos, dir), ia->getMaxDist());
ia->scale(dir.length());
return Inherited::intersectEnter(action);
}
示例5: intersectEnter
Action::ResultE ScreenGroup::intersectEnter(Action *action)
{
IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
Matrix m(_camTransform);
m.invert();
Pnt3f pos;
Vec3f dir;
m.multFull(ia->getLine().getPosition (), pos);
m.mult (ia->getLine().getDirection(), dir);
ia->setLine(Line(pos, dir), ia->getMaxDist());
ia->scale(dir.length());
return Action::Continue;
}