Exposed another glut method (the demos really require cleanup soon!)

First steps for a raycast-vehicle demo (far from finished)
This commit is contained in:
ejcoumans
2006-09-05 07:36:55 +00:00
parent e84716482d
commit fa96109cd9
22 changed files with 319 additions and 63 deletions

View File

@@ -76,6 +76,7 @@ WheelInfo& RaycastVehicle::AddWheel( const SimdVector3& connectionPointCS, const
WheelInfo& wheel = m_wheelInfo[GetNumWheels()-1];
UpdateWheelTransformsWS( wheel );
UpdateWheelTransform(GetNumWheels()-1);
return wheel;
}
@@ -344,17 +345,9 @@ SimdScalar RaycastVehicle::GetSteeringValue(int wheel) const
void RaycastVehicle::ApplyEngineForce(SimdScalar force, int wheel)
{
for (int i=0;i<GetNumWheels();i++)
{
WheelInfo& wheelInfo = GetWheelInfo(i);
bool applyOnFrontWheel = !wheel;
if (applyOnFrontWheel == wheelInfo.m_bIsFrontWheel)
{
wheelInfo.m_engineForce = force;
}
}
assert(wheel>=0 && wheel < GetNumWheels());
WheelInfo& wheelInfo = GetWheelInfo(wheel);
wheelInfo.m_engineForce = force;
}

View File

@@ -143,6 +143,13 @@ public:
return m_indexForwardAxis;
}
virtual void SetCoordinateSystem(int rightIndex,int upIndex,int forwardIndex)
{
m_indexRightAxis = rightIndex;
m_indexUpAxis = upIndex;
m_indexForwardAxis = forwardIndex;
}
virtual void BuildJacobian()
{
//not yet