_data
: SphereGrabSurfaceData |
Signature
SphereGrabSurfaceData _data |
MinimalRotationPoseAtSurface
(
userPose
, relativeTo
)
|
Signature
Pose MinimalRotationPoseAtSurface(in Pose userPose, Transform relativeTo) Parameters userPose: in PoserelativeTo: TransformReturns Pose |
MinimalTranslationPoseAtSurface
(
userPose
, relativeTo
)
|
Signature
Pose MinimalTranslationPoseAtSurface(in Pose userPose, Transform relativeTo) Parameters userPose: in PoserelativeTo: TransformReturns Pose |
NearestPointInSurface
(
targetPosition
, relativeTo
)
|
Signature
Vector3 NearestPointInSurface(Vector3 targetPosition, Transform relativeTo) Parameters targetPosition: Vector3relativeTo: TransformReturns Vector3 |
Reset
()
|
Signature
virtual void Reset() Returns void |
RotationAtPoint
(
surfacePoint
, baseRot
, desiredRotation
, relativeTo
)
|
Signature
Quaternion RotationAtPoint(Vector3 surfacePoint, Quaternion baseRot, Quaternion desiredRotation, Transform relativeTo) Parameters surfacePoint: Vector3baseRot: QuaterniondesiredRotation: QuaternionrelativeTo: TransformReturns Quaternion |
Start
()
|
Signature
virtual void Start() Returns void |
CalculateBestPoseAtSurface
(
targetRay
, bestPose
, relativeTo
)
|
Finds the Pose at the surface that is the closest to the given ray.
Signature
bool CalculateBestPoseAtSurface(Ray targetRay, out Pose bestPose, Transform relativeTo) Parameters targetRay: RayÂ
Ray searching for the nearest snap pose
bestPose: out PoseÂ
The best found pose at the surface.
relativeTo: TransformÂ
Reference transform to measure the poses against
Returns boolÂ
True if the pose was found
|
CalculateBestPoseAtSurface
(
targetPose
, bestPose
, scoringModifier
, relativeTo
)
|
Finds the Pose at the surface that is the closest to the given pose.
Signature
GrabPoseScore CalculateBestPoseAtSurface(in Pose targetPose, out Pose bestPose, in PoseMeasureParameters scoringModifier, Transform relativeTo) Parameters targetPose: in PoseÂ
The root pose to find the nearest to.
bestPose: out PoseÂ
The best found pose at the surface.<
relativeTo: TransformÂ
Reference transform to measure the poses against
|
CalculateBestPoseAtSurface
(
targetPose
, offset
, bestPose
, scoringModifier
, relativeTo
)
|
Finds the Pose at the surface that is the closest to the given pose.
Signature
GrabPoseScore CalculateBestPoseAtSurface(in Pose targetPose, in Pose offset, out Pose bestPose, in PoseMeasureParameters scoringModifier, Transform relativeTo) Parameters targetPose: in PoseÂ
The root pose to find the nearest to.
offset: in PoseÂ
The offset from the root, for accurate scoring
bestPose: out PoseÂ
The best found pose at the surface.<
relativeTo: TransformÂ
Reference transform to measure the poses against
|
CreateDuplicatedSurface
(
gameObject
)
|
Creates a new IGrabSurface under the selected gameobject with the same data as this one.
Signature
IGrabSurface CreateDuplicatedSurface(GameObject gameObject) Parameters gameObject: GameObjectÂ
The gameobject in which to place the new IGrabSurface.
|
CreateMirroredSurface
(
gameObject
)
|
Creates a new IGrabSurface under the selected gameobject that is a mirror version of the current.
Signature
IGrabSurface CreateMirroredSurface(GameObject gameObject) Parameters gameObject: GameObjectÂ
The gameobject in which to place the new IGrabSurface.
|
GetCentre
(
relativeTo
)
|
The center of the sphere in world coordinates.
Signature
Vector3 GetCentre(Transform relativeTo) Parameters relativeTo: TransformÂ
The reference transform to apply the surface to
Returns Vector3Â
Position in world space
|
GetDirection
(
relativeTo
)
|
The direction of the sphere, measured from the center to the original grip position.
Signature
Vector3 GetDirection(Transform relativeTo) Parameters relativeTo: TransformÂ
The reference transform to apply the surface to
Returns Vector3Â
Direction in world space
|
GetRadius
(
relativeTo
)
|
The radius of the sphere, this is automatically calculated as the distance between the center and the original grip pose.
Signature
float GetRadius(Transform relativeTo) Parameters relativeTo: TransformÂ
The reference transform to apply the surface to
Returns floatÂ
Distance in world space
|
GetReferencePose
(
relativeTo
)
|
The reference pose of the surface.
It defines the radius of the sphere as the point from the relative transform to the reference pose to ensure that the sphere covers this pose.
Signature
Pose GetReferencePose(Transform relativeTo) Parameters relativeTo: TransformÂ
The reference transform to apply the surface to
Returns PoseÂ
Pose in world space
|
InjectAllSphereSurface
(
data
, relativeTo
)
|
Signature
void InjectAllSphereSurface(SphereGrabSurfaceData data, Transform relativeTo) Parameters data: SphereGrabSurfaceDatarelativeTo: TransformReturns void |
InjectData
(
data
)
|
Signature
void InjectData(SphereGrabSurfaceData data) Parameters data: SphereGrabSurfaceDataReturns void |
InjectRelativeTo
(
relativeTo
)
|
Signature
void InjectRelativeTo(Transform relativeTo) Parameters relativeTo: TransformReturns void |
MirrorPose
(
gripPose
, relativeTo
)
|
Method for mirroring a Pose around the surface.
Different surfaces will prefer mirroring along different axis.
Signature
Pose MirrorPose(in Pose pose, Transform relativeTo) Parameters gripPose: in PoseÂ
The Pose to be mirrored.
relativeTo: TransformÂ
Reference transform to mirror the pose around
Returns PoseÂ
A new pose mirrored at this surface.
|
SetCentre
(
point
, relativeTo
)
|
Signature
void SetCentre(Vector3 point, Transform relativeTo) Parameters point: Vector3relativeTo: TransformReturns void |