当前位置: 首页>>代码示例>>C++>>正文


C++ Box3::Scale方法代码示例

本文整理汇总了C++中Box3::Scale方法的典型用法代码示例。如果您正苦于以下问题:C++ Box3::Scale方法的具体用法?C++ Box3::Scale怎么用?C++ Box3::Scale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Box3的用法示例。


在下文中一共展示了Box3::Scale方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetAtten

void    plRTSpotLight::GetLocalBoundBox( TimeValue t, INode *node, ViewExp *vpt, Box3 &box )
{
    Point3  loc = node->GetObjectTM( t ).GetTrans();
    float   scaleFactor = vpt->NonScalingObjectSize() * vpt->GetVPWorldWidth( loc ) / 360.0f;
    float   width, depth;

    box = fMesh.getBoundingBox();
    // Because we want to scale about the origin, not the box center, we have to do this funky offset
    Point3  boxCenter = box.Center();
    box.Translate( -boxCenter );
    box.Scale( scaleFactor );
    boxCenter *= scaleFactor;
    box.Translate( boxCenter );

    // Include points for the spotlight. That means either the attenuated cone or 
    // our unattenuated cone display
    if( ( extDispFlags & EXT_DISP_ONLY_SELECTED ) )
    {
        if( GetUseAtten() ) 
            depth = GetAtten( t, ATTEN_END );
        else
            depth = 100.f + 50.f;   // Include arrows

        width = depth * tan( DegToRad( GetFallsize( t ) / 2.f ) );

        box += Point3( -width, -width, 0.f );
        box += Point3( width, width, -depth );
    }
}
开发者ID:Drakesinger,项目名称:Plasma,代码行数:29,代码来源:plRealTimeLights.cpp

示例2: GetLocalBoundBox

void TapeHelpObject::GetLocalBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box )
{
    if ( ! vpt || ! vpt->IsAlive() )
    {
        box.Init();
        return;
    }

    Matrix3 m = inode->GetObjectTM(t);
    Point3 pt;
    Point3 q[4];
    float scaleFactor = vpt->NonScalingObjectSize()*vpt->GetVPWorldWidth(m.GetTrans())/(float)360.0;
    box = mesh.getBoundingBox();
    box.Scale(scaleFactor);

    float d;
    if (GetTargetPoint(t,inode,pt)) {
        d = Length(m.GetTrans()-pt)/Length(inode->GetObjectTM(t).GetRow(2));
        box += Point3(float(0),float(0),-d);
    }
    if(GetSpecLen()) {
        GetLinePoints(t, q, GetLength(t) );
        box += q[0];
        box += q[1];
    }
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:26,代码来源:tapehelp.cpp

示例3:

void    plRTProjDirLight::GetLocalBoundBox( TimeValue t, INode *node, ViewExp *vpt, Box3 &box )
{
    Point3  loc = node->GetObjectTM( t ).GetTrans();
    float   scaleFactor = vpt->NonScalingObjectSize() * vpt->GetVPWorldWidth( loc ) / 360.0f;
    float   width, height, depth;

    box = fMesh.getBoundingBox();
    // Because we want to scale about the origin, not the box center, we have to do this funky offset
    Point3  boxCenter = box.Center();
    box.Translate( -boxCenter );
    box.Scale( scaleFactor );
    boxCenter *= scaleFactor;
    box.Translate( boxCenter );

    if( ( extDispFlags & EXT_DISP_ONLY_SELECTED ) )
    {
        fProjPB->GetValue( kWidth, t, width, FOREVER );
        fProjPB->GetValue( kHeight, t, height, FOREVER );
        fProjPB->GetValue( kRange, t, depth, FOREVER );
        width /= 2.f;
        height /= 2.f;

        box += Point3( -width, -height, 0.f );
        box += Point3( width, height, -depth );
    }
}
开发者ID:Asteral,项目名称:Plasma,代码行数:26,代码来源:plRTProjDirLight.cpp

示例4: GetLocalBoundBox

void VRayCamera::GetLocalBoundBox(TimeValue t, INode *node, ViewExp *vpt, Box3& box) {
  Matrix3 m=node->GetObjectTM(t);
  float scaleFactor=vpt->NonScalingObjectSize()*vpt->GetVPWorldWidth(m.GetTrans())/360.0f;
  box=mesh.getBoundingBox();
  box.Scale(scaleFactor);

  if (extendedDisplayFlags & EXT_DISP_ONLY_SELECTED) box+=Point3(0.0f, 0.0f, -GetTDist(t));
}
开发者ID:Danod,项目名称:domemaster-stereo-shader,代码行数:8,代码来源:vraydomemasterstereo.cpp

示例5: GetLocalBoundBox

void TargetObject::GetLocalBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ){
	if ( ! vpt || ! vpt->IsAlive() )
	{
		box.Init();
		return;
	}
	
	Matrix3 m = inode->GetObjectTM(t);
	float scaleFactor = vpt->NonScalingObjectSize()*vpt->GetVPWorldWidth(m.GetTrans())/(float)360.0;
	box = mesh.getBoundingBox();
	box.Scale(scaleFactor);
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:12,代码来源:target.cpp

示例6: GetLocalBoundBox

void ProtHelpObject::GetLocalBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) 
{
   if ( ! vpt || ! vpt->IsAlive() )
	{
		box.Init();
		return;
	}
	 Matrix3 m = inode->GetObjectTM(t);
   Point3 pt;
   Point3 q[4];
   float scaleFactor = vpt->NonScalingObjectSize()*vpt->GetVPWorldWidth(m.GetTrans())/360.0f;
   box = mesh.getBoundingBox();
   box.Scale(scaleFactor);

   if (GetTargetPoint(0, t, &pt))
      box += Inverse(m) * pt;
   if (GetTargetPoint(1, t, &pt))
      box += Inverse(m) * pt;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:19,代码来源:prothelp.cpp

示例7:

void    plRTDirLight::GetLocalBoundBox( TimeValue t, INode *node, ViewExp *vpt, Box3 &box )
{
    Point3  loc = node->GetObjectTM( t ).GetTrans();
    float   scaleFactor = vpt->NonScalingObjectSize() * vpt->GetVPWorldWidth( loc ) / 360.0f;
    float   width, height, depth;

    box = fMesh.getBoundingBox();
    // Because we want to scale about the origin, not the box center, we have to do this funky offset
    Point3  boxCenter = box.Center();
    box.Translate( -boxCenter );
    box.Scale( scaleFactor );
    boxCenter *= scaleFactor;
    box.Translate( boxCenter );

    if( ( extDispFlags & EXT_DISP_ONLY_SELECTED ) )
    {
        width = 2 * 20.f + ( 10.f / 2.f );  // Add in half arrow size
        height = 2 * 20.f + ( 10.f / 2.f );
        depth = 100.f;

        box += Point3( -width, -height, 0.f );
        box += Point3( width, height, -depth );
    }
}
开发者ID:Drakesinger,项目名称:Plasma,代码行数:24,代码来源:plRealTimeLights.cpp


注:本文中的Box3::Scale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。