@@ -965,7 +965,7 @@ typedef float (*vm_GetMagnitude_fp)(vector *vec);
965
965
DMFCDLLOUT (vm_GetMagnitude_fp DLLvm_GetMagnitude;)
966
966
967
967
// Rotates a vector thru a matrix
968
- typedef void (*vm_MatrixMulVector_fp)(vector *, vector *, matrix *);
968
+ typedef void (*vm_MatrixMulVector_fp)(vector *, const vector *, const matrix *);
969
969
DMFCDLLOUT (vm_MatrixMulVector_fp DLLvm_MatrixMulVector;)
970
970
971
971
// Applies an instantaneous force on an object, resulting in an instantaneous
@@ -1013,15 +1013,15 @@ typedef void (*vm_MakeAngleZero_fp)(angvec *a);
1013
1013
DMFCDLLOUT (vm_MakeAngleZero_fp DLLvm_MakeAngleZero;)
1014
1014
1015
1015
// Multiply a vector times the transpose of a matrix
1016
- typedef void (*vm_VectorMulTMatrix_fp)(vector *result, vector *v, matrix *m);
1016
+ typedef void (*vm_VectorMulTMatrix_fp)(vector *result, const vector *v, const matrix *m);
1017
1017
DMFCDLLOUT (vm_VectorMulTMatrix_fp DLLvm_VectorMulTMatrix;)
1018
1018
1019
1019
// Multiplies 2 3x3 matrixes, returning the result in first argument
1020
- typedef void (*vm_MatrixMul_fp)(matrix *, matrix *, matrix *);
1020
+ typedef void (*vm_MatrixMul_fp)(matrix *, const matrix *, const matrix *);
1021
1021
DMFCDLLOUT (vm_MatrixMul_fp DLLvm_MatrixMul;)
1022
1022
1023
1023
// Multiply a matrix times the transpose of a matrix
1024
- typedef void (*vm_MatrixMulTMatrix_fp)(matrix *dest, matrix *src0, matrix *src1);
1024
+ typedef void (*vm_MatrixMulTMatrix_fp)(matrix *dest, const matrix *src0, const matrix *src1);
1025
1025
DMFCDLLOUT (vm_MatrixMulTMatrix_fp DLLvm_MatrixMulTMatrix;)
1026
1026
1027
1027
// Returns the dot product of the two given vectors
@@ -1033,23 +1033,23 @@ typedef void (*vm_SubVectors_fp)(vector *, const vector *, const vector *);
1033
1033
DMFCDLLOUT (vm_SubVectors_fp DLLvm_SubVectors;)
1034
1034
1035
1035
// Returns adds two vectors, returns result in first arg
1036
- typedef void (*vm_AddVectors_fp)(vector *, vector *, vector *);
1036
+ typedef void (*vm_AddVectors_fp)(vector *, const vector *, const vector *);
1037
1037
DMFCDLLOUT (vm_AddVectors_fp DLLvm_AddVectors;)
1038
1038
1039
1039
// Given a vector, divides second arg by vector components
1040
1040
typedef void (*vm_AverageVector_fp)(vector *, int );
1041
1041
DMFCDLLOUT (vm_AverageVector_fp DLLvm_AverageVector;)
1042
1042
1043
1043
// Scales second arg vector by 3rd arg, placing result in first arg
1044
- typedef void (*vm_ScaleVector_fp)(vector *, vector *, float );
1044
+ typedef void (*vm_ScaleVector_fp)(vector *, const vector *, float );
1045
1045
DMFCDLLOUT (vm_ScaleVector_fp DLLvm_ScaleVector;)
1046
1046
1047
1047
// Scales all components of vector v by value s adds the result to p and stores result in vector d
1048
- typedef void (*vm_ScaleAddVector_fp)(vector *d, vector *p, vector *v, float s);
1048
+ typedef void (*vm_ScaleAddVector_fp)(vector *d, const vector *p, const vector *v, float s);
1049
1049
DMFCDLLOUT (vm_ScaleAddVector_fp DLLvm_ScaleAddVector;)
1050
1050
1051
1051
// Divides second vector components by 3rd arg, placing result in first arg. Useful for parametric lines
1052
- typedef void (*vm_DivVector_fp)(vector *, vector *, float );
1052
+ typedef void (*vm_DivVector_fp)(vector *, const vector *, float );
1053
1053
DMFCDLLOUT (vm_DivVector_fp DLLvm_DivVector;)
1054
1054
1055
1055
// Same as NormalizeVector, but uses approximation
@@ -1116,36 +1116,36 @@ DMFCDLLOUT(vm_VectorDistanceQuick_fp DLLvm_VectorDistanceQuick;)
1116
1116
// Parameters: dest - filled in with the normalized direction vector
1117
1117
// start,end - the start and end points used to calculate the vector
1118
1118
// Returns: the distance between the two input points
1119
- typedef float (*vm_GetNormalizedDir_fp)(vector *dest, vector *end, vector *start);
1119
+ typedef float (*vm_GetNormalizedDir_fp)(vector *dest, const vector *end, const vector *start);
1120
1120
DMFCDLLOUT (vm_GetNormalizedDir_fp DLLvm_GetNormalizedDir;)
1121
1121
1122
1122
// Returns a normalized direction vector between two points
1123
1123
// Uses sloppier magnitude, less precise
1124
- typedef float (*vm_GetNormalizedDirFast_fp)(vector *dest, vector *end, vector *start);
1124
+ typedef float (*vm_GetNormalizedDirFast_fp)(vector *dest, const vector *end, const vector *start);
1125
1125
DMFCDLLOUT (vm_GetNormalizedDirFast_fp DLLvm_GetNormalizedDirFast;)
1126
1126
1127
1127
// extract angles from a matrix
1128
- typedef angvec *(*vm_ExtractAnglesFromMatrix_fp)(angvec *a, matrix *m);
1128
+ typedef angvec *(*vm_ExtractAnglesFromMatrix_fp)(angvec *a, const matrix *m);
1129
1129
DMFCDLLOUT (vm_ExtractAnglesFromMatrix_fp DLLvm_ExtractAnglesFromMatrix;)
1130
1130
1131
1131
// returns the angle between two vectors and a forward vector
1132
- typedef angle (*vm_DeltaAngVec_fp)(vector *v0, vector *v1, vector *fvec);
1132
+ typedef angle (*vm_DeltaAngVec_fp)(const vector *v0, const vector *v1, const vector *fvec);
1133
1133
DMFCDLLOUT (vm_DeltaAngVec_fp DLLvm_DeltaAngVec;)
1134
1134
1135
1135
// returns the angle between two normalized vectors and a forward vector
1136
- typedef angle (*vm_DeltaAngVecNorm_fp)(vector *v0, vector *v1, vector *fvec);
1136
+ typedef angle (*vm_DeltaAngVecNorm_fp)(const vector *v0, const vector *v1, const vector *fvec);
1137
1137
DMFCDLLOUT (vm_DeltaAngVecNorm_fp DLLvm_DeltaAngVecNorm;)
1138
1138
1139
1139
// Computes the distance from a point to a plane.
1140
1140
// Parms: checkp - the point to check
1141
1141
// Parms: norm - the (normalized) surface normal of the plane
1142
1142
// planep - a point on the plane
1143
1143
// Returns: The signed distance from the plane; negative dist is on the back of the plane
1144
- typedef float (*vm_DistToPlane_fp)(vector *checkp, vector *norm, vector *planep);
1144
+ typedef float (*vm_DistToPlane_fp)(const vector *checkp, const vector *norm, const vector *planep);
1145
1145
DMFCDLLOUT (vm_DistToPlane_fp DLLvm_DistToPlane;)
1146
1146
1147
1147
// returns the value of a determinant
1148
- typedef float (*vm_CalcDetValue_fp)(matrix *det);
1148
+ typedef float (*vm_CalcDetValue_fp)(const matrix *det);
1149
1149
DMFCDLLOUT (vm_CalcDetValue_fp DLLvm_CalcDetValue;)
1150
1150
1151
1151
typedef void (*vm_MakeInverseMatrix_fp)(matrix *dest);
@@ -1155,20 +1155,20 @@ typedef void (*vm_SinCosToMatrix_fp)(matrix *m, float sinp, float cosp, float si
1155
1155
DMFCDLLOUT (vm_SinCosToMatrix_fp DLLvm_SinCosToMatrix;)
1156
1156
1157
1157
// Gets the real center of a polygon
1158
- typedef float (*vm_GetCentroid_fp)(vector *centroid, vector *src, int nv);
1158
+ typedef float (*vm_GetCentroid_fp)(vector *centroid, const vector *src, int nv);
1159
1159
DMFCDLLOUT (vm_GetCentroid_fp DLLvm_GetCentroid;)
1160
1160
1161
1161
// retrieves a random vector in values -RAND_MAX/2 to RAND_MAX/2
1162
1162
typedef void (*vm_MakeRandomVector_fp)(vector *vec);
1163
1163
DMFCDLLOUT (vm_MakeRandomVector_fp DLLvm_MakeRandomVector;)
1164
1164
1165
1165
// Given a set of points, computes the minimum bounding sphere of those points
1166
- typedef float (*vm_ComputeBoundingSphere_fp)(vector *center, vector *vecs, int num_verts);
1166
+ typedef float (*vm_ComputeBoundingSphere_fp)(vector *center, const vector *vecs, int num_verts);
1167
1167
DMFCDLLOUT (vm_ComputeBoundingSphere_fp DLLvm_ComputeBoundingSphere;)
1168
1168
1169
1169
// Gets the real center of a polygon, but uses fast magnitude calculation
1170
1170
// Returns the size of the passed in stuff
1171
- typedef float (*vm_GetCentroidFast_fp)(vector *centroid, vector *src, int nv);
1171
+ typedef float (*vm_GetCentroidFast_fp)(vector *centroid, const vector *src, int nv);
1172
1172
DMFCDLLOUT (vm_GetCentroidFast_fp DLLvm_GetCentroidFast;)
1173
1173
1174
1174
// returns scaled line width
0 commit comments