design – What technologies should I use for digital fingerprinting? What development strategy should I use?

I am an online survey provider and, because of the nature of my business, I receive a lot of fraud and duplicates for my investigations, which I can not control with the help of cookie restrictions.

I want to implement digital fingerprint tracking so that I can track the uniqueness of the respondent and block unwanted respondents.

I want to know what technology should I use for this project (can handle 1,000 to 1,500 requests per second or more).
I also want to know what development strategy to use for this project.

So far, I've tried Fingerprint JS, Ever Cookie, but because of my traffic that's close to a million (1 million) a day, it can not work at the moment.

All kinds of suggestions and advice are welcome. If this is not the place to ask such questions, please let me know.

collision – Hierarchy of C ++ limit volumes

Here is a C ++ implementation of a bounding volume hierarchy, intended for the rapid detection of collisions (break views, radii, other bounding volumes). I would like to hear some thoughts:

#ifndef BOUNDINGVOLUMEHIERARCHY_H
#define BOUNDINGVOLUMEHIERARCHY_H

#understand 
#understand 
#understand 
#understand 
#understand 
#understand 

Log2 namespace
{
model
  BoundingVolumeHierarchy class
{
public:
NodePool class;

static constant auto Dim = BV :: getDim ();

using Type = type name BV :: Type;
using Ray = Ray;
using Vector = Vector;
using Matrix = Matrix;

struct ObjectInfo
{
T * _object;
BV _bv;
Type _bvSize;
};
private:
auto getBV (const T & object)
{
return Proxy :: GetBoundingVolume () (object);
}
auto getSize (const T & object)
{
return Proxy :: GetLargestBVSize () (object);
}
ObjectInfo createInfo (object T *)
{
return {object, getBV (* object), getSize (* object)};
}
public:
Node class
{
public:
Node () = default;
virtual ~ Node () = default;
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, CullResult& cull_result) const = 0;
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, const IntersectedPlanes & in, CullResult& cull_result) const = 0;
virtual void cullAllObjects (const Camera :: CullingParams & cp, std :: vector& objects) const = 0;
virtual size_t getSizeInBytes () const = 0;
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const = 0;
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const = 0;
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const = 0;
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const = 0;
intersectFirst virtual void (BV & bv const, T const * & prime) const = 0;
intersectFirst virtual void (const BV & bv, const Matrix & transform, T const * & first) const = 0;
cullVisibleNodes (const Camera :: CullingParams & cp, virtual std :: vector const)& nodes) const = 0;
virtual void cullAllNodes (const Camera :: CullingParams & cp, std :: vector& nodes) const = 0;
virtual void countNodes (unsigned & internal_nodes, unsigned & leaf_nodes) const = 0;
virtual void getAllBVs (std :: vector& bvs) const = 0;
cullBVs virtual void (const Camera :: CullingParams & cp, const Matrix & transform, std :: vector& result) const = 0;
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects) const = 0;
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects) const = 0;
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects, std :: vector& bvs) const = 0;
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects, std :: vector& bvs) const = 0;
virtual void findNearest (const Ray & ray, const Matrix and transformation, T const * & closest, Type & most_t, Matrix & more_transform) const = 0;
virtual void findNearest (const Ray & ray, const Matrix and transform, T const * and closest, Type and closer_t, Matrix and more_transform, std :: vector& bvs) const = 0;
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix & plus_transform) const = 0;
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T * & closest, Type & u, Type & v, Type & t, Matrix & plus_transform) = 0;
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform, std :: vector& bvs) const = 0;
virtual void findNearestNested (const Ray & ray, const Conserved + & closer, Type & u, Type & v, Type & t, Matrix & plus_transform) const = 0;
virtual void findNearestNested (const Ray & ray, TNested * & closest, Type & u, Type & v, Type & t, Matrix & closest_transform) = 0;
voRr virtual voRquery (const BV & bv, std :: vector& intersected_objects) const = 0;
virtual void queryAll (std :: vector& intersected_objects) const = 0;
virtual void queryRange (BV & bv const, const Camera :: CullingParams & cp, std :: vector& intersected_objects) const = 0;
virtual void queryAll (const Camera :: CullingParams & cp, std :: vector& intersected_objects) const = 0;
virtual bool isLeaf () const = 0;
virtual node * getLeft () const = 0;
virtual node * getRight () const = 0;
virtual node * & getLeft () = 0;
virtual node * & getRight () = 0;
Virtual T getObjectPtr () = 0;
Virtual BV getBV () const = 0;
Virtual virtual BV * getBVPtr () const = 0;
Virtual BV * getBVPtr () = 0;
virtual type distToPoint2 (const and point vector) const = 0;
virtual void destruction (NodePool & pool) = 0;
virtual type * getLargestBVSize () = 0;
Cost of virtual type (const BV & bv) const = 0;
};
LeafNode class: public node
{
public:
Explicit LeafNode (T object)
: Node (),
Object Object)
{
}
virtual ~ LeafNode () = default;
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, CullResult& cull_result) forced replacement
{
cull_result._probablyVisibleObjects.push_back (_object);
}
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, const IntersectedPlanes & in, CullResult& cull_result) forced replacement
{
cull_result._probablyVisibleObjects.push_back (_object);
}
virtual void cullAllObjects (const Camera :: CullingParams & cp, std :: vector& objects) const override
{
objects.push_back (_object);
}
virtual size_t getSizeInBytes () const crashed
{
returns sizeof * this;
}
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (getBV ())) {
intersected_objects.push_back (_object);
}
}
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (BV (getBV (), transform))) {
intersected_objects.push_back (_object);
}
}
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (getBV ())) {
intersected_objects.push_back (& ​​object);
}
}
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (BV (getBV (), transform))) {
intersected_objects.push_back (& ​​object);
}
}
virtual void intersectFirst (const BV & bv, T const * and first) const override
{
if (! first && bv.intersects (getBV ())) {
first = & _object;
}
}
intersectFirst virtual void (BV & bv const, const Matrix & transform, T const * & first) const crush
{
if (! first && bv.intersects (BV (getBV (), transform)))) {
first = & _object;
}
}
cullVisibleNodes (const Camera :: CullingParams & cp, virtual std :: vector const)& nodes) forced replacement
{
if (contribute (cp) && intersectFrustum (cp)! = IntersectionResult :: OUTSIDE) {
nodes.push_back (this);
}
}
virtual void cullAllNodes (const Camera :: CullingParams & cp, std :: vector& nodes) forced replacement
{
if (contribute (cp)) {
nodes.push_back (this);
}
}
virtual void countNodes (unsigned & internal_nodes, unsigned & leaf_nodes) const substitu
{
leaf nodes ++;
}
virtual void getAllBVs (std :: vector& bvs) const override
{
bvs.push_back (getBV ());
}
cullBVs virtual void (const Camera :: CullingParams & cp, const Matrix & transform, std :: vector& result) const override
{
BV bv (getBV (), transform);
if (bv.contributes (cp._camPos, cp._thresh)) {
result.push_back (bv);
}
}
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects) const crushing
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (getBV (), ray))) {
intersected_objects.push_back (_object);
}
}
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (getBV (), transform), ray)))) {
intersected_objects.push_back (_object);
}
}
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects, std :: vector& bvs) const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (getBV (), ray))) {
intersected_objects.push_back (_object);
bvs.push_back (getBV ());
}
}
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects, std :: vector& bvs) const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (getBV (), transform), ray)))) {
intersected_objects.push_back (_object);
bvs.push_back (BV (getBV (), transformation));
}
}
virtual void findNearest (const Ray & ray, const Matrix and transformation, T const * and closest, Type and closest t, Matrix and closer_transform) const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (get (), transform), radius);
if (std :: get<0>(result) && std :: get<1>(result) <next_t) {
closest = & _object;
most_t = std :: get<1>(result);
most_transform = transform;
}
}
virtual void findNearest (const Ray & ray, const Matrix and transform, T const * and closest, Type and closer_t, Matrix and more_transform, std :: vector& bvs) const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (get (), transform), radius);
if (std :: get<0>(result) && std :: get<1>(result) <next_t) {
closest = & _object;
most_t = std :: get<1>(result);
most_transform = transform;
bvs.push_back (BV (getBV (), transformation));
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) Const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (getBV (), transform), ray)))) {
auto result = Proxy :: IntersectRay () (_ object, ray, transform);
if (std :: get<0>(result) && std :: get<3>(result) <t) {
closest = & _object;
most_transform = transform;
u = std :: get<1>(result);
v = std :: get<2>(result);
t = std :: get<3>(result);
}
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform)
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (getBV (), transform), ray)))) {
auto result = Proxy :: IntersectRay () (_ object, ray, transform);
if (std :: get<0>(result) && std :: get<3>(result) <t) {
closest = & _object;
most_transform = transform;
u = std :: get<1>(result);
v = std :: get<2>(result);
t = std :: get<3>(result);
}
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform, std :: vector& bvs) const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (getBV (), transform), ray)))) {
auto result = Proxy :: IntersectRay () (_ object, ray, transform);
if (std :: get<0>(result) && std :: get<3>(result) <t) {
closest = & _object;
most_transform = transform;
u = std :: get<1>(result);
v = std :: get<2>(result);
t = std :: get<3>(result);
bvs.push_back (BV (getBV (), transformation));
}
}
}
virtual void findNearestNested (const Ray & Ray, Constable TNested * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) Const
{
Proxy :: FindNearestNestedConst () (_ object, ray, closest, u, v, t, closest_transform);
}
virtual void findNearestNested (const Ray & ray, TNested * & closest, Type & u, Type & v, Type & t, Matrix & closest_transform)
{
Proxy :: FindNearestNested () (_ object, ray, closest, u, v, t, closest_transform);
}
voRr virtual voRquery (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (getBV ())) {
intersected_objects.push_back (_object);
}
}
virtual void queryAll (std :: vector& intersected_objects) const crushing
{
intersected_objects.push_back (_object);
}
virtual void queryRange (BV & bv const, const Camera :: CullingParams & cp, std :: vector& intersected_objects) const crushing
{
if (contribute (cp) && bv.intersects (getBV ())) {
intersected_objects.push_back (_object);
}
}
virtual void queryAll (const Camera :: CullingParams & cp, std :: vector& intersected_objects) const crushing
{
if (contribute (cp)) {
intersected_objects.push_back (_object);
}
}
virtual bool isLeaf () const crashed
{
return true;
}
virtual node * getLeft () const substituted
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
virtual node * getRight () const crashed
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
virtual Node * & getLeft () override
{
throw std :: exception ("Do not call this method");
}
Virtual Node * & getRight ()
{
throw std :: exception ("Do not call this method");
}
virtual replacement T * getObjectPtr ()
{
returns & _object;
}
virtual replacement of BV getBV ()
{
return Proxy :: GetBoundingVolume () (_ object);
}
virtual BV const * getBVPtr () const replacement
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
Virtual BV * getBVPtr () substitute
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
Virtual Type distToPoint2 (const Vector & point) Constant Const Const
{
return Proxy :: GetBoundingVolume () (_ object) .distToPoint2 (period);
}
virtual destruction of destruction (NodePool & pool)
{
pool.destroy (this);
}
Virtual Type * getLargestBVSize () replacement
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
virtual type cost (const BV & bv) forced replacement
{
return bv.getUnion (getBV ()). size2 ();
}
private:
Object;
automatic contribution (const Camera :: CullingParams & cp) const
{
return getBV (). Contributes (cp._camPos, cp._thresh, Proxy :: GetLargestBVSize () (_ object));
}
auto intersectFrustum (const Camera :: CullingParams & cp) const
{
return IntersectionTests :: frustumIntersectsBoundingVolume (getBV (), cp._frustumPlanes);
}
};
using NodePtr = Node *;
InternalNode class: public node
{
public:
InternalNode (ObjectInfo * begin, ObjectInfo * end, BoundingVolumeHierarchy & bvh)
: Node (),
_bv (begin -> _ bv),
_largestBVSize (begin -> _ bvSize)
{
for (auto ptr = start + 1; ptr < end; ptr++) {
          _bv.unify(ptr->_bv);
_largestBVSize = std :: max (_largestBVSize, ptr -> _ bvSize);
}
automatic axis = _bv.getLongestAxis ();
auto bv_center = _bv.center (axis);
auto mid = std :: partition (begin, end, [&axis, &bv_center](const ObjectInfo & o) {
return o._bv.center (axis) <bv_center;
});
if (middle == beginning || middle == end) {
middle = beginning + (end - beginning) / 2u;
}
_left = bvh.createNode (begin, mid);
_right = bvh.createNode (mid, end);
}
virtual ~ InternalNode () = default;
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, CullResult& cull_result) forced replacement
{
if (contribute (cp)) {
auto result = intersectFrustum (cp);
if (result == IntersectionResult :: INTERSECTING) {
_left-> cullVisibleObjects (cp, cull_result);
_right-> cullVisibleObjects (cp, cull_result);
}
else if (result == IntersectionResult :: INSIDE) {
_left-> cullAllObjects (cp, cull_result._fullyVisibleObjects);
_right-> cullAllObjects (cp, cull_result._fullyVisibleObjects);
}
}
}
virtual void cullVisibleObjects (const Camera :: CullingParams & cp, const IntersectedPlanes & in, CullResult& cull_result) forced replacement
{
if (contribute (cp)) {
IntersectedPlanes out;
auto result = intersectFrustum (cp, in, out);
if (result == IntersectionResult :: INTERSECTING) {
_left-> cullVisibleObjects (cp, out, cull_result);
_right-> cullVisibleObjects (cp, out, cull_result);
}
else if (result == IntersectionResult :: INSIDE) {
_left-> cullAllObjects (cp, cull_result._fullyVisibleObjects);
_right-> cullAllObjects (cp, cull_result._fullyVisibleObjects);
}
}
}
virtual void cullAllObjects (const Camera :: CullingParams & cp, std :: vector& objects) const override
{
if (contribute (cp)) {
_left-> cullAllObjects (cp, objects);
_right-> cullAllObjects (cp, objects);
}
}
virtual size_t getSizeInBytes () const crashed
{
return sizeof * this + _left-> getSizeInBytes () + _right-> getSizeInBytes ();
}
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (_bv)) {
_left-> intersectObjects (bv, intersected_objects);
_right-> intersectObjects (bv, intersected_objects);
}
}
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (BV (_bv, transform))) {
_left-> intersectObjects (bv, transform, intersected_objects);
_right-> intersectObjects (bv, transform, intersected_objects);
}
}
intersectObjects of virtual void (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (_bv)) {
_left-> intersectObjects (bv, intersected_objects);
_right-> intersectObjects (bv, intersected_objects);
}
}
virtual intersectObjects void (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (bv.intersects (BV (_bv, transform))) {
_left-> intersectObjects (bv, transform, intersected_objects);
_right-> intersectObjects (bv, transform, intersected_objects);
}
}
virtual void intersectFirst (const BV & bv, T const * and first) const override
{
if (! first && bv.intersects (_bv)) {
_left-> intersectFirst (bv, first);
_right-> intersectFirst (bv, prime);
}
}
intersectFirst virtual void (BV & bv const, const Matrix & transform, T const * & first) const crush
{
if (! first && bv.intersects (BV (_bv, transform)))) {
_left-> intersectFirst (bv, transform, first);
_right-> intersectFirst (bv, transform, first);
}
}
cullVisibleNodes (const Camera :: CullingParams & cp, virtual std :: vector const)& nodes) forced replacement
{
if (contribute (cp)) {
auto result = intersectFrustum (cp);
if (result == IntersectionResult :: INSIDE) {
nodes.push_back (this);
_left-> cullAllNodes (cp, nodes);
_right-> cullAllNodes (cp, nodes);
}
else if (result == IntersectionResult :: INTERSECTING) {
nodes.push_back (this);
_left-> cullVisibleNodes (cp, nodes);
_right-> cullVisibleNodes (cp, nodes);
}
}
}
virtual void cullAllNodes (const Camera :: CullingParams & cp, std :: vector& nodes) forced replacement
{
if (contribute (cp)) {
nodes.push_back (this);
_left-> cullAllNodes (cp, nodes);
_right-> cullAllNodes (cp, nodes);
}
}
virtual void countNodes (unsigned & internal_nodes, unsigned & leaf_nodes) const substitu
{
internal nodes ++;
_left-> countNodes (internal nodes, leaf nodes);
_right-> countNodes (internal nodes, leaf nodes);
}
virtual void getAllBVs (std :: vector& bvs) const override
{
bvs.push_back (_bv);
_left-> getAllBVs (bvs);
_right-> getAllBVs (bvs);
}
cullBVs virtual void (const Camera :: CullingParams & cp, const Matrix & transform, std :: vector& result) const override
{
BV bv (_bv, transform);
if (bv.contributes (cp._camPos, cp._thresh)) {
result.push_back (bv);
_left-> cullBVs (cp, transformation, result);
_right-> cullBVs (cp, transformation, result);
}
}
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects) const crushing
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (_bv, ray))) {
_left-> intersectObjects (ray, intersected_objects);
_right-> intersectObjects (ray, intersected_objects);
}
}
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects) const crushing
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), radius))) {
_left-> intersectObjects (ray, transform, intersected_objects);
_right-> intersectObjects (ray, transform, intersected_objects);
}
}
intersectObjects of virtual void (const Ray & ray, std :: vector& intersected_objects, std :: vector& bvs) const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (_bv, ray))) {
_left-> intersectObjects (ray, intersected_objects, bvs);
_right-> intersectObjects (ray, intersected_objects, bvs);
bvs.push_back (_bv);
}
}
intersectObjects void virtual (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects, std :: vector& bvs) const override
{
if (std :: get<0>(IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), radius))) {
_left-> intersectObjects (radius, transformation, intersected_objects, bvs);
_right-> intersectObjects (ray, transform, intersected_objects, bvs);
bvs.push_back (BV (_bv, transformation));
}
}
virtual void findNearest (const Ray & ray, const Matrix and transformation, T const * and closest, Type and closest t, Matrix and closer_transform) const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), ray);
if (std :: get<0>(result) && std :: get<1>(result) < nearest_t) {
          _left->findNearest (radius, transformation, closer, closer, plus_transform);
_right-> findNearest (ray, transformation, nearest, nearest, nearest, nearest);
}
}
virtual void findNearest (const Ray & ray, const Matrix and transform, T const * and closest, Type and closer_t, Matrix and more_transform, std :: vector& bvs) const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), ray);
if (std :: get<0>(result) && std :: get<1>(result) < nearest_t) {
          bvs.push_back(BV(_bv, transform));
          _left->findNearest (radius, transformation, closer, closer, plus_transform, bvs);
_right-> findNearest (radius, transformation, closer, closer, closer, plus_transform, bvs);
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) Const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), ray);
if (std :: get<0>(result) && std :: get<1>(result) < t) {
          _left->findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
_right-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform)
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), ray);
if (std :: get<0>(result) && std :: get<1>(result) < t) {
          _left->findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
_right-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
}
}
virtual void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform, std :: vector& bvs) const override
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (BV (_bv, transform), ray);
if (std :: get<0>(result) && std :: get<1>(result) < t) {
          bvs.push_back(BV(_bv, transform));
          _left->findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform, bvs);
_right-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform, bvs);
}
}
virtual void findNearestNested (const Ray & Ray, Constable TNested * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) Const
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (_bv, ray);
if (std :: get<0>(result) && std :: get<1>(result) < t) {
          Node* nodes[2] = { _left, _right };
          auto result = _left->distToPoint2 (ray.getOrigin ()) < _right->distToPoint2 (ray.getOrigin ());
nodes[!result]-> findNearestNested (ray, the closest, u, v, t, the closest_transform);
nodes[result]-> findNearestNested (ray, the closest, u, v, t, the closest_transform);
}
}
virtual void findNearestNested (const Ray & ray, TNested * & closest, Type & u, Type & v, Type & t, Matrix & closest_transform)
{
auto result = IntersectionTests :: rayIntersectsBoundingVolume (_bv, ray);
if (std :: get<0>(result) && std :: get<1>(result) < t) {
          Node* nodes[2] = { _left, _right };
          auto result = _left->distToPoint2 (ray.getOrigin ()) < _right->distToPoint2 (ray.getOrigin ());
nodes[!result]-> findNearestNested (ray, the closest, u, v, t, the closest_transform);
nodes[result]-> findNearestNested (ray, the closest, u, v, t, the closest_transform);
}
}
voRr virtual voRquery (const BV & bv, std :: vector& intersected_objects) const crushing
{
if (bv.contains (_bv)) {
_left-> queryAll (intersected_objects);
_right-> queryAll (intersected_objects);
}
else if (bv.intersects (_bv)) {
_left-> queryRange (bv, intersected_objects);
_right-> queryRange (bv, intersected_objects);
}
}
virtual void queryAll (std :: vector& intersected_objects) const crushing
{
_left-> queryAll (intersected_objects);
_right-> queryAll (intersected_objects);
}
virtual void queryRange (BV & bv const, const Camera :: CullingParams & cp, std :: vector& intersected_objects) const crushing
{
if (contribute (cp)) {
if (bv.contains (_bv)) {
_left-> queryAll (cp, intersected_objects);
_right-> queryAll (cp, intersected_objects);
}
else if (bv.intersects (_bv)) {
_left-> queryRange (bv, cp, intersected_objects);
_right-> queryRange (bv, cp, intersected_objects);
}
}
}
virtual void queryAll (const Camera :: CullingParams & cp, std :: vector& intersected_objects) const crushing
{
if (contribute (cp)) {
_left-> queryAll (cp, intersected_objects);
_right-> queryAll (cp, intersected_objects);
}
}
virtual bool isLeaf () const crashed
{
returns false;
}
virtual node * getLeft () const substituted
{
returns _left;
}
virtual node * getRight () const crashed
{
return well;
}
virtual Node * & getLeft () override
{
returns _left;
}
Virtual Node * & getRight ()
{
return well;
}
virtual replacement T * getObjectPtr ()
{
throw std :: exception ("Do not call this method");
returns nullptr;
}
virtual replacement of BV getBV ()
{
return _bv;
}
virtual BV const * getBVPtr () const replacement
{
return & _bv;
}
Virtual BV * getBVPtr () substitute
{
return & _bv;
}
Virtual Type distToPoint2 (const Vector & point) Constant Const Const
{
return _bv.distToPoint2 (period);
}
virtual destruction of destruction (NodePool & pool)
{
pool.destroy (this);
}
Virtual Type * getLargestBVSize () replacement
{
return & _largestBVSize;
}
virtual type cost (const BV & bv) forced replacement
{
return bv.getUnion (_bv) .size2 ();
}
private:
NodePtr _left, _right;
BV _bv;
Type _largestBVSize;
automatic contribution (const Camera :: CullingParams & cp) const
{
return _bv.contributes (cp._camPos, cp._thresh, _largestBVSize);
}
auto intersectFrustum (const Camera :: CullingParams & cp) const
{
return IntersectionTests :: frustumIntersectsBoundingVolume (_bv, cp._frustumPlanes);
}
auto intersectFrustum (const Camera :: CullingParams & cp, const IntersectedPlanes & in, IntersectedPlanes & out) const
{
return IntersectionTests :: frustumIntersectsBoundingVolume (_bv, cp._frustumPlanes, in, out);
}
};
BoundingVolumeHierarchy () = delete;
BoundingVolumeHierarchy (T * objects, unsigned number):
_nodePool (count)
{
std :: vector information;
infos.reserve (count);
for (unsigned i = 0; i <number; i ++) {
infos.push_back (createInfo (objects + i));
}
_root = createNode (infos.data (), infos.data () + count);
}
BoundingVolumeHierarchy (const BoundingVolumeHierarchy & other) = delete;
BoundingVolumeHierarchy & operator = (const BoundingVolumeHierarchy & other) = delete;
BoundingVolumeHierarchy (BoundingVolumeHierarchy && other) = default;
BoundingVolumeHierarchy & operator = (BoundingVolumeHierarchy && other) = default;
void cullVisibleObjects (const Camera :: CullingParams & cp, CullResult& cull_result) const
{
_root-> cullVisibleObjects (cp, cull_result);
}
void cullVisibleObjectsWithPlaneMasking (fixed camera :: CullingParams & cp, CullResult& cull_result) const
{
IntersectedPlanes out = {{0, 1, 2, 3, 4, 5}, 6};
_root-> cullVisibleObjects (cp, out, cull_result);
}
void intersectObjects (const BV & bv, std :: vector& intersected_objects) const
{
_root-> intersectObjects (bv, intersected_objects);
}
void intersectObjects (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const
{
_root-> intersectObjects (bv, transform, intersected_objects);
}
void intersectObjects (const BV & bv, std :: vector& intersected_objects) const
{
_root-> intersectObjects (bv, intersected_objects);
}
void intersectObjects (BV & bv const, const Matrix & transform, std :: vector& intersected_objects) const
{
_root-> intersectObjects (bv, transform, intersected_objects);
}
void intersectFirst (const BV & bv, T const * and first) const
{
_root-> intersectFirst (bv, first);
}
void intersectFirst (const BV & bv, const Matrix & transform, T const * & first) const
{
_root-> intersectFirst (bv, transform, first);
}
void intersectObjects (const Ray & ray, std :: vector& intersected_objects) const
{
_root-> intersectObjects (ray, intersected_objects);
}
void intersectObjects (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects) const
{
_root-> intersectObjects (ray, transform, intersected_objects);
}
void intersectObjects (const Ray & ray, std :: vector& intersected_objects, std :: vector& intersected_bvs) const
{
_root-> intersectObjects (radius, intersected_objects, intersected_bvs);
}
void intersectObjects (const Ray & ray, const Matrix & transform, std :: vector& intersected_objects, std :: vector& intersected_bvs) const
{
_root-> intersectObjects (ray, transformation, intersected_objects, intersected_bvs);
}
void findNearest (const Ray & ray, const Matrix and transform, T * & closest, Type & plus_t, Matrix & more_transform) const
{
_root-> findNearest (ray, transformation, closest, closest, closest, nearest);
}
void findNearest (const Ray & ray, const Matrix and transformation, T * & closest, Type & plus_t, Matrix & more_transform, std :: vector& bvs) const
{
_root-> findNearest (ray, transformation, nearest, nearest, nearest, plus_transform, bvs);
}
void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) const
{
_root-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
}
void findNearestPrecise (const Ray & ray, const Matrix and transformation, T * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) const
{
_root-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform);
}
void findNearestPrecise (const Ray & ray, const Matrix and transformation, T const * and closest, Type & u, Type & v, Type & t, Matrix and closest_transform, std :: vector& bvs) const
{
_root-> findNearestPrecise (radius, transformation, closer, u, v, t, plus_transform, bvs);
}
void cullVisibleNodes (const Camera :: CullingParams & cp, std :: vector& nodes) const
{
_root-> cullVisibleNodes (cp, nodes);
}
void findNearestNested (const Ray & ray, const * and closest, Type & u, Type & v, Type & t, Matrix and the closest_transform) const
{
_root-> findNearestNested (ray, the closest, u, v, t, the closest_transform);
}
void findNearestNested (const Ray & ray, TNested * & closest, Type & u, Type & v, Type & t, Matrix & closest_transform) const
{
      _root-> findNearestNested (ray, le plus proche, u, v, t, le plus proche_transform);
}
    void queryRange (const BV & bv, std :: vector& intersected_objects) const
{
      _root-> queryRange (bv, intersected_objects);
}
    void queryRange (const BV & bv, const Camera :: CullingParams & cp, std :: vector& intersected_objects) const
{
      _root-> queryRange (bv, cp, intersected_objects);
}
model
    void findOverlappingPairs (NodePtr a, OtherNodePtr b, const Matrix & a_transform, std :: vector <std :: tuple> & overlapping_pairs) const
{
      si (! a-> isLeaf () &&! b-> isLeaf ()) {
        auto a_bv = BV (* a-> getBVPtr (), a_transform);
        if (a_bv.intersects (* b-> getBVPtr ())) {
          if (a_bv.size2 ()> b-> getBVPtr () -> size2 ()) {
            findOverlappingPairs(a-> getLeft (), b, a_transform, overlapping_pairs);
            findOverlappingPairs(a-> getRight (), b, a_transform, overlapping_pairs);
}
          autre {
            findOverlappingPairs(a, b-> getLeft (), a_transform, overlapping_pairs);
            findOverlappingPairs(a, b-> getRight (), a_transform, overlapping_pairs);
}
}
}
      sinon si (a-> isLeaf () && b-> isLeaf ()) {
        auto a_bv = BV (Proxy :: GetBoundingVolume () (* a-> getObjectPtr ()), a_transform);
        auto b_bv = OtherProxy :: GetBoundingVolume () (* b-> getObjectPtr ());
        if (a_bv.intersects (b_bv)) {
          overlapping_pairs.push_back (std :: tuple(a-> getObjectPtr (), b-> getObjectPtr ()));
}
}
      sinon si (a-> isLeaf () &&! b-> isLeaf ()) {
        if (BV (a-> getBV (), a_transform) .intersects (* b-> getBVPtr ())) {
          findOverlappingPairs(a, b-> getLeft (), a_transform, overlapping_pairs);
          findOverlappingPairs(a, b-> getRight (), a_transform, overlapping_pairs);
}
}
      else {// a est interne et b est un nœud feuille
        if (BV (* a-> getBVPtr (), a_transform) .intersects (b-> getBV ())) {
          findOverlappingPairs(a-> getLeft (), b, a_transform, overlapping_pairs);
          findOverlappingPairs(a-> getRight (), b, a_transform, overlapping_pairs);
}
}
}
    insert vide (objet T)
{
      insert (object, _root);
}
    auto getSizeInBytes () const
{
      retourne _root-> getSizeInBytes ();
}
    const auto & getBV () const
{
      retourne _root-> getBV ();
}
    const auto & getRoot () const
{
      retourne _root;
}
    auto getAllBVs () const
{
      std :: vector bvs;
      _root-> getAllBVs (bvs);
      return bvs;
}
    auto cullBVs (const Camera :: CullingParams & cp, const Matrix & transform, std :: vector& bvs) const
{
      _root-> cullBVs (cp, transform, bvs);
}
    auto countNodes (unsigned & internal_nodes, unsigned & leaf_nodes) const
{
      internal_nodes = 0;
      leaf_nodes = 0;
      _root-> countNodes (noeuds internes, noeuds feuille);
}
  privé:
    insertion vide (objet T, NodePtr & noeud)
{
      if (! node-> isLeaf ()) {
        noeud-> getBVPtr () -> unify (getBV (objet));
        * noeud-> getLargestBVSize () = std :: max (* noeud-> getLargestBVSize (), getSize (objet));
        node-> getLeft () -> cost (getBV (objet)) < node->getRight () -> coût (getBV (objet))? insert (objet, noeud-> getLeft ()): insert (objet, noeud-> getRight ());
}
      autre {
        Objets ObjectInfo[2] = {createInfo (& object), createInfo (node-> getObjectPtr ())};
        noeud-> détruire (_nodePool);
        noeud = createNode (objets, objets + 2);
}
}
    classe NodePool
{
    Publique:
      NodePool (num_objects non signé)
{
        hauteur auto = static_cast(std :: floor (log2 (static_cast(num_objects))));
        auto num_nodes = static_cast(std :: pow (2.0, static_cast(hauteur) + 1,0) - 1,0);
        auto num_leaf_nodes = static_cast(std :: pow (2.0, static_cast(la taille)));
        auto num_internal_nodes = num_nodes - num_leaf_nodes;
        num_leaf_nodes = std::max(num_leaf_nodes, 32u);
        num_internal_nodes = std::max(num_internal_nodes, 32u);
        _internalNodePool.set_next_size(num_internal_nodes);
        _leafNodePool.set_next_size(num_leaf_nodes);
}
      NodePool(const NodePool& other) = delete;
      NodePool& operator=(const NodePool& other) = delete;
      NodePool(NodePool&& other) = delete;
      NodePool& operator=(NodePool&& other) = delete;
      NodePtr createNode(ObjectInfo* begin, ObjectInfo* end, BoundingVolumeHierarchy& bvh)
{
        if (end - begin > 1) {
          return new (_internalNodePool.malloc()) InternalNode(begin, end, bvh);
}
        return new (_leafNodePool.malloc()) LeafNode(*begin->_object);
}
      auto destroy(LeafNode* node)
{
        _leafNodePool.destroy(node);
}
      auto destroy(InternalNode* node)
{
        _internalNodePool.destroy(node);
}
    private:
      boost::object_pool _internalNodePool;
      boost::object_pool _leafNodePool;
    };
    NodePool _nodePool;
    auto* createNode(ObjectInfo* begin, ObjectInfo* end)
{
      return _nodePool.createNode(begin, end, *this);
}
    NodePtr _root;
  };
}

#endif

magento2 – Magento 2 registration on product prices

Is there a way to save changes to individual products?
I have the code below:

$ product = $ this -> _ productRepository-> get ($ productID);
$ product-> setCustomerGroupId ($ customerGroupID); // Lie the customer group ID given to the product. This is done so that prices for the group can be fixed
$ product-> setCustomerGroupPrice ($ customerGroupPrice); // Bind the group price given to the product
$ product-> save (); // Save the product changes in the database.

My problem though is that the save () does not actually save the changes. I'm pretty sure that save () is purely for the object manager, but I do not want to use it.

In addition, I am interested in any further suggestions on how to properly assign a customer group ID, then a price to this newly signed ID, unlike what I currently have.

How to implement the console in non-angular log 7?

How can I implement the console log in this method below?

getEventoByFolhaId public (typeFolhaId: number): observable {
return this.httpClient.get ({
resource: `$ {this.resource} / leaf-type / $ {TypeFolhaId}`,
});
}

I've tried it in many ways but I have a runtime error?

usability – redundant buttons in the empty state

For the blank screen, which option is the best?

Option 1:
Have two identical buttons, one in the normal place (next to the header) and the other next to the text that explains what the user has to do

pros: the button next to the text makes it easy to search for actions

disadvantages: redundancy can confuse users, they may think that it is different actions (although the design and the text are exactly the same)

Option 2:
Have a single button next to the header, where it will also be later.

advantages: cleaner screen

Disadvantages: Users may miss CTA

This is for an office system that users use daily,
I have not found a clear reference for option 1 and I am against using arrows to point to the top button.

enter the description of the image here

5th dnd – Is it possible for 2 (or more) wizards to share a spell book?

If a wizard has a spellbook, he can not prepare the spell until he has written it in his own spellbook. I do not see any mechanical reason not to use a spell book for this purpose, but each apprentice should write his own copy of a spell so that he can understand and memorize it quickly.

Copying this spell into your spell book involves reproducing its basic form and then deciphering the unique scoring system used by the wizard that wrote it. You must practice the spell until you understand the sounds or gestures required, then transcribe it into your spell book using your own notation.

Thus, your spell book would end up with only one spell as defined by apprentice A, who can now prepare it. Other apprentices can not prepare their fate from this entry, but they can copy this spell into their own written version.

So your spell book has twice the same fate and two different apprentices can prepare for it, but the others still can not do it. This is not the most effective way to store your spells, because this spellbook will be a jumble of different notations.

Imagine sharing a character sheet with 4 different characters in your group, and you will see how incredibly frustrating it will be for your assistants.

macos – Password required to update Apple ID settings

My iPhone (under iOS 12.1) informs me that I should "Update Apple ID settings" otherwise "Some account services will only be available [I] log in again. "

When I launch settings > Update Apple ID settings iOS asks me first my "Apple ID password", then "iPhone password", then "Mac password". The description of the latter reads as follows: "Enter the password you use to unlock the Mac …".

What password is it? I'm hesitant to enter a lot of passwords without better information on what's going on here. I have both an iPhone and a MacBook and use the same Apple ID account on both.

Snoop dogg vs Ludacris? | Yahoo answers

Report abuse

Additional details