_sphere(sphere),
_time(t),
_material(0),
+ _id(0),
_havePoint(false)
{ }
_linearVelocity = toWorld.xformVec(_linearVelocity);
_angularVelocity = toWorld.xformVec(_angularVelocity);
_point = toWorld.xformPt(_point);
+ if (!_id)
+ _id = transform.getId();
}
_havePoint |= havePoint;
_sphere.setCenter(sphere.getCenter());
// The trick is to decrease the radius of the search sphere.
_sphere.setRadius(length(closest - _sphere.getCenter()));
_havePoint = true;
+ _id = 0;
}
void setSphere(const SGSphered& sphere)
{ return _angularVelocity; }
const SGMaterial* getMaterial() const
{ return _material; }
+ BVHNode::Id getId() const
+ { return _id; }
- bool getHavePoint() const
- { return _havePoint; }
bool empty() const
{ return !_havePoint; }
SGVec3d _linearVelocity;
SGVec3d _angularVelocity;
const SGMaterial* _material;
-
+ BVHNode::Id _id;
+
bool _havePoint;
};