Beispiel #1
0
 /// <summary>Returns the frame shape. May be NULL. </summary>
 public virtual NxShape getFrameShape()
 {
     if (doSetFunctionPointers)
     {
         throw new System.NotSupportedException("Cannot call abstract base member");
     }
     return(NxShape.GetClass(NxFluidEmitter_getFrameShape_INVOKE(ClassPointer, doSetFunctionPointers)));
 }
Beispiel #2
0
 /// <summary>Called when a trigger shape reports a trigger event. </summary>
 /// <param name="triggerShape">is the shape that has been marked as a trigger. </param>
 /// <param name="otherShape">is the shape causing the trigger event. </param>
 /// <param name="status">is the type of trigger event.</param>
 public virtual void onTrigger(NxShape triggerShape, NxShape otherShape, NxShapeFlag status)
 {
     if (doSetFunctionPointers)
     {
         throw new System.NotSupportedException("Cannot call abstract base member");
     }
     NxUserTriggerReport_onTrigger_INVOKE(ClassPointer, doSetFunctionPointers, (triggerShape != null ? triggerShape.ClassPointer : NullRef), (otherShape != null ? otherShape.ClassPointer : NullRef), status);
 }
Beispiel #3
0
 /// <summary>This is called when a contact constraint is generated. Modify the parameters in order to affect the generated contact constraint. This callback needs to be both thread safe and reentrant. </summary>
 /// <param name="changeFlags">when making changes to the contact point, you must mark in this flag what changes have been made, see NxContactConstraintChange. </param>
 /// <param name="shape0">one of the two shapes in contact </param>
 /// <param name="shape1">the other shape </param>
 /// <param name="featureIndex0">feature on the first shape, which is in contact with the other shape </param>
 /// <param name="featureIndex1">feature on the second shape, which is in contact with the other shape </param>
 /// <param name="data">contact constraint properties, for the user to change. Changes in this also requires changes in the changeFlags parameter.</param>
 public virtual bool onContactConstraint(ref uint changeFlags, NxShape shape0, NxShape shape1, uint featureIndex0, uint featureIndex1, NxContactCallbackData data)
 {
     if (doSetFunctionPointers)
     {
         throw new System.NotSupportedException("Cannot call abstract base member");
     }
     return(NxUserContactModify_onContactConstraint_INVOKE(ClassPointer, doSetFunctionPointers, ref changeFlags, (shape0 != null ? shape0.ClassPointer : NullRef), (shape1 != null ? shape1.ClassPointer : NullRef), featureIndex0, featureIndex1, (data != null ? data.ClassPointer : NullRef)));
 }
Beispiel #4
0
 /// <summary>Sets the frame shape. Can be set to NULL. </summary>
 /// <param name="shape">The frame shape.</param>
 public virtual void setFrameShape(NxShape shape)
 {
     if (doSetFunctionPointers)
     {
         throw new System.NotSupportedException("Cannot call abstract base member");
     }
     NxFluidEmitter_setFrameShape_INVOKE(ClassPointer, doSetFunctionPointers, (shape != null ? shape.ClassPointer : NullRef));
 }
Beispiel #5
0
 /// <summary>Return contact information for the wheel. </summary>
 /// <param name="dest">Description of the contact. (only valid if there is a contact) </param>
 public virtual NxShape getContact(NxWheelContactData dest)
 {
     if (doSetFunctionPointers)
     {
         throw new System.NotSupportedException("Cannot call abstract base member");
     }
     return(NxShape.GetClass(NxWheelShape_getContact_INVOKE(ClassPointer, doSetFunctionPointers, (dest != null ? dest.ClassPointer : NullRef))));
 }
 /// <summary>Retrieves the shapes for the current pair. </summary>
 /// <param name="shapeIndex">Used to choose which of the pair of shapes to retrieve(set to 0 or 1). </param>
 public NxShape getShape(uint shapeIndex)
 {
     return(NxShape.GetClass(NxContactStreamIterator_getShape_INVOKE(ClassPointer, doSetFunctionPointers, shapeIndex)));
 }
Beispiel #7
0
 private void onTrigger_virtual(IntPtr triggerShape, IntPtr otherShape, NxShapeFlag status)
 {
     onTrigger(NxShape.GetClass(triggerShape), NxShape.GetClass(otherShape), status);
 }
Beispiel #8
0
 private bool onContactConstraint_virtual([In()][Out()] ref uint changeFlags, IntPtr shape0, IntPtr shape1, uint featureIndex0, uint featureIndex1, IntPtr data)
 {
     return(onContactConstraint(ref changeFlags, NxShape.GetClass(shape0), NxShape.GetClass(shape1), featureIndex0, featureIndex1, NxContactCallbackData.GetClass(data)));
 }
Beispiel #9
0
 private void setFrameShape_virtual(IntPtr shape)
 {
     setFrameShape(NxShape.GetClass(shape));
 }
Beispiel #10
0
		private bool onWheelContact_virtual(IntPtr wheelShape, [In()] [Out()] ref NxVec3 contactPoint, [In()] [Out()] ref NxVec3 contactNormal, [In()] [Out()] ref float contactPosition, [In()] [Out()] ref float normalForce, IntPtr otherShape, [In()] [Out()] ref ushort otherShapeMaterialIndex, uint otherShapeFeatureIndex)
		{
			return onWheelContact(NxWheelShape.GetClass(wheelShape), ref contactPoint, ref contactNormal, ref contactPosition, ref normalForce, NxShape.GetClass(otherShape), ref otherShapeMaterialIndex, otherShapeFeatureIndex);
		}
Beispiel #11
0
		/// <summary>This callback is called once for each wheel and sub step before the wheel constraints are setup and fed to the SDK. The values passed in the parameters can be adjusted to affect the vehicle simulation. The most interesting values are contactPosition, contactPoint, and contactNormal. The contactPosition value specifies how far on the travel distance the contactPoint was found. If you want to simulate a bumpy road, then this is the main parameter to change. It is also good to adjust the contactPoint variable, so that the wheel forces are applied in the correct position. </summary>
		/// <param name="wheelShape">The WheelShape that is being processed. </param>
		/// <param name="contactPoint">The contact point (in world coordinates) that is being used for the wheel. </param>
		/// <param name="contactNormal">The normal of the geometry at the contact point. </param>
		/// <param name="contactPosition">The distance on the spring travel distance where the wheel would end up if it was resting on the contact point. </param>
		/// <param name="normalForce">The normal force on the wheel from the last simulation step. </param>
		/// <param name="otherShape">The shape with which the wheel is in contact. </param>
		/// <param name="otherShapeMaterialIndex">The material on the other shape in the position where the wheel is in contact. Currently has no effect on the simulation. </param>
		/// <param name="otherShapeFeatureIndex">The feature on the other shape in the position where the wheel is in contact.</param>
		public virtual bool onWheelContact(NxWheelShape wheelShape, ref NxVec3 contactPoint, ref NxVec3 contactNormal, ref float contactPosition, ref float normalForce, NxShape otherShape, ref ushort otherShapeMaterialIndex, uint otherShapeFeatureIndex)
		{
			if (doSetFunctionPointers)
			{
				throw new System.NotSupportedException("Cannot call abstract base member");
			}
			return NxUserWheelContactModify_onWheelContact_INVOKE(ClassPointer, doSetFunctionPointers, (wheelShape!=null ? wheelShape.ClassPointer : NullRef), ref contactPoint, ref contactNormal, ref contactPosition, ref normalForce, (otherShape!=null ? otherShape.ClassPointer : NullRef), ref otherShapeMaterialIndex, otherShapeFeatureIndex);
		}