本文整理汇总了C++中FVector::GetAbsMax方法的典型用法代码示例。如果您正苦于以下问题:C++ FVector::GetAbsMax方法的具体用法?C++ FVector::GetAbsMax怎么用?C++ FVector::GetAbsMax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FVector
的用法示例。
在下文中一共展示了FVector::GetAbsMax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NoiseMax
/**
* Force the bounding box to be updated.
*/
void FParticleBeam2EmitterInstance::ForceUpdateBoundingBox()
{
if (Component)
{
float MaxSizeScale = 1.0f;
ParticleBoundingBox.Init();
ParticleBoundingBox += Component->GetComponentLocation();
FVector NoiseMin(0.0f);
FVector NoiseMax(0.0f);
// Noise points have to be taken into account...
if (BeamModule_Noise)
{
BeamModule_Noise->GetNoiseRange(NoiseMin, NoiseMax);
}
// Take scale into account as well
FVector Scale = Component->ComponentToWorld.GetScale3D();
// Take each particle into account
for (int32 i=0; i<ActiveParticles; i++)
{
DECLARE_PARTICLE_PTR(Particle, ParticleData + ParticleStride * ParticleIndices[i]);
int32 CurrentOffset = TypeDataOffset;
FBeam2TypeDataPayload* BeamData = NULL;
FVector* InterpolatedPoints = NULL;
float* NoiseRate = NULL;
float* NoiseDelta = NULL;
FVector* TargetNoisePoints = NULL;
FVector* NextNoisePoints = NULL;
float* TaperValues = NULL;
float* NoiseDistanceScale = NULL;
FBeamParticleModifierPayloadData* SourceModifier = NULL;
FBeamParticleModifierPayloadData* TargetModifier = NULL;
BeamTypeData->GetDataPointers(this, (const uint8*)Particle, CurrentOffset,
BeamData, InterpolatedPoints, NoiseRate, NoiseDelta, TargetNoisePoints,
NextNoisePoints, TaperValues, NoiseDistanceScale,
SourceModifier, TargetModifier);
FVector Size = Particle->Size * Scale;
ParticleBoundingBox += Particle->Location;
ParticleBoundingBox += Particle->Location + NoiseMin;
ParticleBoundingBox += Particle->Location + NoiseMax;
ParticleBoundingBox += BeamData->SourcePoint;
ParticleBoundingBox += BeamData->SourcePoint + NoiseMin;
ParticleBoundingBox += BeamData->SourcePoint + NoiseMax;
ParticleBoundingBox += BeamData->TargetPoint;
ParticleBoundingBox += BeamData->TargetPoint + NoiseMin;
ParticleBoundingBox += BeamData->TargetPoint + NoiseMax;
MaxSizeScale = FMath::Max(MaxSizeScale, Size.GetAbsMax()); //@todo particles: this does a whole lot of compares that can be avoided using SSE/ Altivec.
}
ParticleBoundingBox = ParticleBoundingBox.ExpandBy(MaxSizeScale);
}
}