Beispiel #1
0
cVector cVector::cross(cVector& in){
	sVector input = in.getVectorCoord();
	cVector ret = cVector(((m_sVectorData->y * input.z) - (m_sVectorData->z * input.y)),
		((m_sVectorData->z * input.x) - (m_sVectorData->x * input.z)),
		((m_sVectorData->x * input.y) - (m_sVectorData->y * input.x)));
	return ret;
}
Beispiel #2
0
float cVector::dot(cVector& in){
	sVector input = in.getVectorCoord();
	return (m_sVectorData->x * input.x) + (m_sVectorData->y * input.y) + (m_sVectorData->z*input.z);
}
Beispiel #3
0
cVector cVector::sub(cVector& in){
	sVector a = in.getVectorCoord();
	cVector ret = cVector((-a.x) + m_sVectorData->x, (-a.y) + m_sVectorData->y, (-a.z) + m_sVectorData->z);
	return ret;
}
Beispiel #4
0
cVector cVector::add(cVector& in){
	sVector a = in.getVectorCoord();
	cVector ret = cVector(a.x + m_sVectorData->x, a.y + m_sVectorData->y, a.z + m_sVectorData->z);
	return ret;
}
Beispiel #5
0
cVector cVector::operator-(cVector& v){
	sVector a = v.getVectorCoord();
	cVector ret = cVector((-a.x) + m_sVectorData->x, (-a.y) + m_sVectorData->y, (-a.z) + m_sVectorData->z);
	return ret;
}
Beispiel #6
0
cVector cVector::operator+(cVector& v){
	sVector a = v.getVectorCoord();
	cVector ret = cVector(a.x + m_sVectorData->x, a.y + m_sVectorData->y, a.z + m_sVectorData->z);
	return ret;
}