35 #ifndef IE_COREMAYA_VECTORTRAITS_H
36 #define IE_COREMAYA_VECTORTRAITS_H
38 #include "IECore/VectorTraits.h"
40 #include "maya/MPoint.h"
41 #include "maya/MFloatPoint.h"
42 #include "maya/MVector.h"
43 #include "maya/MFloatVector.h"
49 struct VectorTraits<MPoint>
52 static unsigned int dimensions() {
return 4; };
53 static double get(
const MPoint &v,
unsigned int i ) {
return v[i]; };
54 static void set( MPoint &v,
unsigned int i,
double x ) { v[i] = x; };
58 struct VectorTraits<MFloatPoint>
61 static unsigned int dimensions() {
return 4; };
62 static float get(
const MFloatPoint &v,
unsigned int i ) {
return v[i]; };
63 static void set( MFloatPoint &v,
unsigned int i,
float x ) { v[i] = x; };
67 struct VectorTraits<MVector>
70 static unsigned int dimensions() {
return 3; };
71 static double get(
const MVector &v,
unsigned int i ) {
return v[i]; };
72 static void set( MVector &v,
unsigned int i,
double x ) { v[i] = x; };
76 struct VectorTraits<MFloatVector>
79 static unsigned int dimensions() {
return 3; };
80 static float get(
const MFloatVector &v,
unsigned int i ) {
return v[i]; };
81 static void set( MFloatVector &v,
unsigned int i,
float x ) { v[i] = x; };
86 #endif // IE_COREMAYA_VECTORTRAITS_H
T::BaseType BaseType
The type of the components of the vector.
Definition: VectorTraits.h:51
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43