添加插件
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Obi
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, Size = 64)]
|
||||
public struct QueryResult
|
||||
{
|
||||
public Vector4 simplexBary; /**< Barycentric coords of nearest point in simplex */
|
||||
public Vector4 queryPoint; /**< Nearest point in query shape*/
|
||||
public Vector4 normal; /**< Closest direction between simplex and query shape. */
|
||||
public float distance; /**< Distance between simplex and query shape.*/
|
||||
public float distanceAlongRay; /**< For ray queries, distance along the ray.*/
|
||||
public int simplexIndex; /**< Index of the simplex in the solver.*/
|
||||
public int queryIndex; /**< Index of the query that spawned this result.*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2effdf7f81654462ac5af1735de92eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obi
|
||||
{
|
||||
public struct QueryShape
|
||||
{
|
||||
public enum QueryType
|
||||
{
|
||||
Sphere = 0,
|
||||
Box = 1,
|
||||
Ray = 2,
|
||||
}
|
||||
|
||||
public Vector4 center; /**< box: center of the box in solver space.
|
||||
sphere: center of the sphere in solver space,.
|
||||
ray: start of the ray in solver space.*/
|
||||
|
||||
public Vector4 size; /**< box: size of the box in each axis.
|
||||
sphere: radius of sphere (x,y,z),
|
||||
ray: end of the line segment in solver space.*/
|
||||
public QueryType type;
|
||||
public float contactOffset;
|
||||
public float maxDistance; // minimum distance around the shape to look for.
|
||||
public int filter;
|
||||
|
||||
public QueryShape(QueryType type, Vector3 center, Vector3 size, float contactOffset, float distance, int filter)
|
||||
{
|
||||
this.type = type;
|
||||
this.center = center;
|
||||
this.size = size;
|
||||
this.contactOffset = contactOffset;
|
||||
this.maxDistance = distance;
|
||||
this.filter = filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d126422956eb46eaa20e28b8d59122c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user