quakeforge/ruamoko/gatest/multivector.h
Bill Currie b9cff7aae0 [gatest] Implement and use multi-vector reverse
This gives the resultant point the correct sign.  Though the projective
divide would take care of the sign, this makes reading the point a
little less confusing (still need to sort out automatic blade reversals
for the likes of e31).
2023-05-24 18:25:47 +09:00

29 lines
870 B
Objective-C

#ifndef __multivector_h
#define __multivector_h
#include <Object.h>
@class Algebra;
@class BasisLayout;
@interface MultiVector : Object
{
double *components;
Algebra *algebra;
BasisLayout *layout;
int num_components;
}
+(MultiVector *) new:(Algebra *) algebra;
// NOTE: values must have the same layout as algebra
+(MultiVector *) new:(Algebra *) algebra values:(double *) values;
+(MultiVector *) new:(Algebra *) algebra group:(BasisGroup *) group;
// NOTE: values must have the same layout as group
+(MultiVector *) new:(Algebra *) algebra group:(BasisGroup *) group values:(double *) values;
+(MultiVector *) copy:(MultiVector *) src;
-(MultiVector *) product:(MultiVector *) rhs;
-(MultiVector *) wedge:(MultiVector *) rhs;
-(MultiVector *) dot:(MultiVector *) rhs;
-(MultiVector *) dual;
-(MultiVector *) reverse;
@end
#endif//__multivector_h