MCPcopy Create free account
hub / github.com/Kitware/VTK / Cross

Method Cross

Common/Core/vtkMath.h:1952–1961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1950//----------------------------------------------------------------------------
1951template <class VectorT1, class VectorT2, class VectorT3>
1952void vtkMath::Cross(VectorT1&& a, VectorT2&& b, VectorT3& c)
1953{
1954 typedef typename vtkMatrixUtilities::ScalarTypeExtractor<VectorT3>::value_type ValueType;
1955 ValueType Cx = a[1] * b[2] - a[2] * b[1];
1956 ValueType Cy = a[2] * b[0] - a[0] * b[2];
1957 ValueType Cz = a[0] * b[1] - a[1] * b[0];
1958 c[0] = Cx;
1959 c[1] = Cy;
1960 c[2] = Cz;
1961}
1962
1963//----------------------------------------------------------------------------
1964// Cross product of two 3-vectors. Result (a x b) is stored in c[3].

Callers 15

BuildFrustumMethod · 0.45
BuildRepresentationMethod · 0.45
ComputeDistanceToAxisFunction · 0.45
RotateMethod · 0.45
BuildAnnulusMethod · 0.45
RotateMethod · 0.45
BuildConeMethod · 0.45
UpdatePoseMethod · 0.45
UpdatePoseMethod · 0.45
PlaceWidgetExtendedMethod · 0.45
ApplyPoseToCameraMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected