|
|
|
|
|
|
{ |
|
|
|
Gizmos.DrawIcon(transform.position, "Packages/com.unity.perception/Editor/Icons/Keypoint.png", false); |
|
|
|
} |
|
|
|
|
|
|
|
private void OnDrawGizmosSelected() |
|
|
|
{ |
|
|
|
if (singlePerceptionCamera == null) |
|
|
|
|
|
|
sphereMesh = (Mesh) defaultAssets.FirstOrDefault(a => a.name == "Sphere"); |
|
|
|
|
|
|
|
#endif
|
|
|
|
Vector3 occlusionDistance; |
|
|
|
float occlusionDistance; |
|
|
|
occlusionDistance = transform.lossyScale * selfOcclusionDistance; |
|
|
|
occlusionDistance = selfOcclusionDistance; |
|
|
|
occlusionDistance = Vector3.one * KeypointLabeler.defaultSelfOcclusionDistance; |
|
|
|
occlusionDistance = KeypointLabeler.defaultSelfOcclusionDistance; |
|
|
|
occlusionDistance = Vector3.one * KeypointLabeler.defaultSelfOcclusionDistance; |
|
|
|
occlusionDistance = KeypointLabeler.defaultSelfOcclusionDistance; |
|
|
|
occlusionDistance = Vector3.one * keypointLabeler.selfOcclusionDistance; |
|
|
|
occlusionDistance = keypointLabeler.selfOcclusionDistance; |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
|
|
|
Gizmos.color = /*Color.green;*/new Color(1, 1, 1, .5f); |
|
|
|
Gizmos.DrawMesh(sphereMesh, 0, transform.position, transform.rotation, occlusionDistance * 2); |
|
|
|
var occlusionDistanceScale = transform.lossyScale * occlusionDistance; |
|
|
|
Gizmos.color = new Color(1, 1, 1, .25f); |
|
|
|
Gizmos.DrawMesh(sphereMesh, 0, transform.position, transform.rotation, occlusionDistanceScale * 2); |
|
|
|
} |
|
|
|
} |
|
|
|
} |