The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)

HowTo:Determine if two vectors are antiparallel?

From DocR19

Jump to: navigation, search

Call the function antiparallel in vector.hxx.

Contents

Signature

logical antiparallel(SPAvector const &v1, SPAvector const &v2, const double res = SPAresnor);
 
logical antiparallel(SPAunit_vector const &v1, SPAvector const &v2, const double res = SPAresnor);
 
logical antiparallel(SPAunit_vector const &v1, SPAunit_vector const &v2, const double res = SPAresnor);

Header Files

#include "vector.hxx"

Example

SPAvector v1 = some_vector1;
SPAvector v2 = some_vector2;
logical is_antiparallel = antiparallel( v1, v2, SPAresnor );

Scheme Commands

(define g1 (gvector 2 0 0))
(define g2 (gvector -3 0 0))
; gvector:parallel? does not make the distinction between parallel and antiparallel
(gvector:parallel? g1 g2)
;;#t

Notes

  • Two vectors are deemed antiparallel if the sine of the angle between them is less than the angular tolerance (SPAresnor). The user may specify a different tolerance.
  • Use biparallel if the sense of the vectors does not matter.

Related Content

Personal tools