VisualPOVRAY.Point3.crossproduct C# (CSharp) Method

crossproduct() public method

public crossproduct ( Point3 vec ) : Point3
vec Point3
return Point3
        public Point3 crossproduct(Point3 vec)
        {
            if (this != null && vec != null)
            {
                Point3 results = new Point3(0, 0, 0);
                results.x = this.y * vec.z - this.z * vec.y;
                results.y = this.z * vec.x - this.x * vec.z;
                results.z = this.x * vec.y - this.y * vec.x;
                return results;
            }
            else
            {
                return null;
            }
        }

Usage Example

Beispiel #1
0
 public Plane(Point3 vectorx = null, Point3 vectory = null, float disp = -1.0f, Signal<float> dispr = null, Point3 translate = null, Point3 rotation = null, PovTexture texture = null, bool reactive = false)
 {
     Point3 n = vectorx.crossproduct(vectory);
     this.normal = n ?? new Point3(0, 1, 0, reactive: reactive);
     this.normal.reactive = reactive;
     this.disp = dispr ?? new Lift0f(disp);
     this.translate = translate ?? new Point3(0, 0, 0, reactive: reactive);
     this.rotation = rotation ?? new Point3(0, 0, 0, reactive: reactive);
     this.texture = texture ?? new POVColor("Red");
     this.reactive = reactive;
 }
All Usage Examples Of VisualPOVRAY.Point3::crossproduct