public Plane Set(float3 _p0, float3 _p1, float3 _p2) { // Compute two vectors from the three points float3 v0 = _p1 - _p0, v1 = _p2 - _p0; // Compute the normal to the plane n = v0.Cross(v1); n.Normalize(); d = -_p0.Dot(n); return(this); }
public Plane Set( float3 _p0, float3 _p1, float3 _p2 ) { // Compute two vectors from the three points float3 v0 = _p1 - _p0, v1 = _p2 - _p0; // Compute the normal to the plane n = v0.Cross( v1 ); n.Normalize(); d = -_p0.Dot(n); return this; }
// Helpers public void Normalize() { Axis.Normalize(); }
public Ray Bend ( float3 _Axis, float _fBendFactor ) { m_Aim += _fBendFactor * m_Aim.Dot(_Axis) * _Axis; m_Aim.Normalize(); return this; }
public Ray Bend( float3 _Axis, float _fBendFactor ) { m_Aim += _fBendFactor * m_Aim.Dot(_Axis) * _Axis; m_Aim.Normalize(); return this; }