TriangleWall.cc File Reference
#include <MercuryBase.h>
#include "TriangleWall.h"
#include "InteractionHandler.h"
#include "WallHandler.h"
#include "DPMBase.h"
#include "Particles/BaseParticle.h"

Functions

bool setDistance (Mdouble &distance, const Vec3D &branch, Mdouble distanceMax)
 

Function Documentation

◆ setDistance()

bool setDistance ( Mdouble distance,
const Vec3D branch,
Mdouble  distanceMax 
)
35 {
36  const Mdouble distance2 = branch.getLengthSquared();
37  if (distance2 > distanceMax * distanceMax) return false;
38  distance = sqrt(distance2);
39  return true;
40 }
double Mdouble
Definition: GeneralDefine.h:34
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.h:332

References Vec3D::getLengthSquared().