C# Class HoloToolkit.Unity.Tagalong

A Tagalong that extends SimpleTagalong that allows for specifying the minimum and target percentage of the object to keep in the view frustum of the camera and that keeps the Tagalong object in front of other holograms including the Spatial Mapping Mesh.
Inheritance: SimpleTagalong
显示文件 Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Methods

Method Description
DebugDrawColliderBox ( bool draw, Bounds colliderBounds ) : void

This function draws a box at the bounds provided.

DebugDrawDebuggingLines ( bool draw, Vector3 center, Vector3 cameraPosition, Vector3 cameraToTarget, Vector3 centeredPoint, Vector3 pointOnFrustum, Vector3 recalculatedPointOnFrustum, Vector3 calculatedPosition ) : void

Protected Methods

Method Description
CalculateTagalongTargetPosition ( Vector3 fromPosition, Vector3 &toPosition ) : bool
DebugDrawLine ( bool draw, Vector3 start, Vector3 end ) : void
DebugDrawLine ( bool draw, Vector3 start, Vector3 end, Color color ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
AdjustTagalongDistance ( Vector3 &newPosition ) : bool
CalculateTargetPosition ( bool isHorizontal, Vector3 centermostEdge, Vector3 vectorTowardCenter, float width, Vector3 center, Plane frustumPlane, bool invertAngle ) : Vector3

Calculates a target position for the Tagalong in either the horizontal or vertical direction.

Method Details

CalculateTagalongTargetPosition() protected method

protected CalculateTagalongTargetPosition ( Vector3 fromPosition, Vector3 &toPosition ) : bool
fromPosition UnityEngine.Vector3
toPosition UnityEngine.Vector3
return bool

DebugDrawColliderBox() public method

This function draws a box at the bounds provided.
public DebugDrawColliderBox ( bool draw, Bounds colliderBounds ) : void
draw bool If true, drawing happens.
colliderBounds UnityEngine.Bounds The bounds to draw the box.
return void

DebugDrawDebuggingLines() public method

public DebugDrawDebuggingLines ( bool draw, Vector3 center, Vector3 cameraPosition, Vector3 cameraToTarget, Vector3 centeredPoint, Vector3 pointOnFrustum, Vector3 recalculatedPointOnFrustum, Vector3 calculatedPosition ) : void
draw bool
center UnityEngine.Vector3
cameraPosition UnityEngine.Vector3
cameraToTarget UnityEngine.Vector3
centeredPoint UnityEngine.Vector3
pointOnFrustum UnityEngine.Vector3
recalculatedPointOnFrustum UnityEngine.Vector3
calculatedPosition UnityEngine.Vector3
return void

DebugDrawLine() protected method

protected DebugDrawLine ( bool draw, Vector3 start, Vector3 end ) : void
draw bool
start UnityEngine.Vector3
end UnityEngine.Vector3
return void

DebugDrawLine() protected method

protected DebugDrawLine ( bool draw, Vector3 start, Vector3 end, Color color ) : void
draw bool
start UnityEngine.Vector3
end UnityEngine.Vector3
color UnityEngine.Color
return void

Start() protected method

protected Start ( ) : void
return void

Update() protected method

protected Update ( ) : void
return void