Ejemplo n.º 1
0
        public override void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform)
        {
            createInfo            = new INTERACTION_CREATE_SHAPE_INFO();
            createInfo.shapeFlags = ShapeInfoFlags.None;

            createTransform = getRigidbodyTransform();
        }
Ejemplo n.º 2
0
        public override void Setup()
        {
            base.Setup();

            INTERACTION_SPHERE_DESCRIPTION sphere = new INTERACTION_SPHERE_DESCRIPTION();

            sphere.shape.type = ShapeType.Sphere;
            sphere.radius     = 1.0f;

            IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphere);

            InteractionC.AddShapeDescription(ref _scene, spherePtr, out _shapeDescriptionHandle);

            INTERACTION_CREATE_SHAPE_INFO info = new INTERACTION_CREATE_SHAPE_INFO();

            info.shapeFlags = ShapeInfoFlags.None;

            INTERACTION_TRANSFORM transform = new INTERACTION_TRANSFORM();

            transform.position = Vector3.zero.ToCVector();
            transform.rotation = Quaternion.identity.ToCQuaternion();
            transform.wallTime = 0;

            InteractionC.CreateShapeInstance(ref _scene, ref _shapeDescriptionHandle, ref transform, ref info, out _shapeInstanceHandle);
        }
Ejemplo n.º 3
0
    public override void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform) {
      createInfo = new INTERACTION_CREATE_SHAPE_INFO();
      createInfo.shapeFlags = ShapeInfoFlags.None;

      createTransform = getRigidbodyTransform();
    }
Ejemplo n.º 4
0
    public override void Setup() {
      base.Setup();

      INTERACTION_SPHERE_DESCRIPTION sphere = new INTERACTION_SPHERE_DESCRIPTION();
      sphere.shape.type = ShapeType.Sphere;
      sphere.radius = 1.0f;

      IntPtr spherePtr = StructAllocator.AllocateStruct(ref sphere);

      InteractionC.AddShapeDescription(ref _scene, spherePtr, out _shapeDescriptionHandle);

      INTERACTION_CREATE_SHAPE_INFO info = new INTERACTION_CREATE_SHAPE_INFO();
      info.shapeFlags = ShapeInfoFlags.None;

      INTERACTION_TRANSFORM transform = new INTERACTION_TRANSFORM();
      transform.position = Vector3.zero.ToCVector();
      transform.rotation = Quaternion.identity.ToCQuaternion();
      transform.wallTime = 0;

      InteractionC.CreateShapeInstance(ref _scene, ref _shapeDescriptionHandle, ref transform, ref info, out _shapeInstanceHandle);
    }
Ejemplo n.º 5
0
 /// <summary>
 /// Called by InteractionManager to get the creation info used to create the shape associated with this InteractionBehaviour.
 /// </summary>
 /// <param name="createInfo"></param>
 /// <param name="createTransform"></param>
 public abstract void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform);
 /// <summary>
 /// Called by InteractionManager to get the creation info used to create the shape associated with this InteractionBehaviour.
 /// </summary>
 /// <param name="createInfo"></param>
 /// <param name="createTransform"></param>
 public abstract void GetInteractionShapeCreationInfo(out INTERACTION_CREATE_SHAPE_INFO createInfo, out INTERACTION_TRANSFORM createTransform);