protected virtual void OnDrawGizmos() { Gizmos.color = Color.red; GizmosEx.DrawCross(base.transform.position, 1); Gizmos.color = Color.green; GizmosEx.DrawArrow(base.transform.position, base.transform.position + new Vector3(1, 1, 1) * 3); }
void OnDrawGizmosSelected() { if (m_Directional) { GizmosEx.DrawOrtho(transform, m_Aspect, m_Size, 0.01f, m_Range, new Color(0.5f, 0.5f, 0.5f, 0.7f)); } else { GizmosEx.DrawPerspective(transform, m_Aspect, m_Angle, 0.01f, m_Range, new Color(0.5f, 0.5f, 0.5f, 0.7f)); } }
void OnDrawGizmosSelected() { if (orthographic) { GizmosEx.DrawOrtho(transform, aspect, orthographicSize, nearClipPlane, farClipPlane, new Color(0.5f, 0.5f, 0.5f, 0.7f)); } else { GizmosEx.DrawPerspective(transform, aspect, fieldOfView, nearClipPlane, farClipPlane, new Color(0.5f, 0.5f, 0.5f, 0.7f)); } }
private void OnDrawGizmos() { GizmosEx.PushMatrix(this.transform.localToWorldMatrix); GizmosEx.PushColor(Color.red); GizmosEx.DrawXYWirePlane(this.Width, this.Height); GizmosEx.PopColor(); GizmosEx.PopMatrix(); GizmosEx.PopMatrix(); GizmosEx.PushColor(Color.cyan); GizmosEx.DrawArrow(this.LastProjectedPoint, this.LastProjectedPoint + this.LastProjectedVector); GizmosEx.PopColor(); }
protected virtual void OnDrawGizmosSelected() { if (this.Grid == null) { return; } Vector3 gridCellSize = this.Grid.GridCellSize; var extents = new Vector3(this.Width * gridCellSize.x, this.Height * gridCellSize.y, this.Depth * gridCellSize.z); GizmosEx.DrawWireBox(this.transform.position + extents * 0.5f, extents); }
public void OnDrawGizmos() { if (points == null) { return; } foreach (var point in points) { Gizmos.DrawCube(point, Vector3.one * 0.1f); } GizmosEx.DrawPolygon(hull.points); }
/// <summary> /// Gizmo の描画時に呼び出されます。 /// </summary> protected override void OnDrawGizmos() { if (!this.drawGizmo) { return; } Color previousColor = Gizmos.color; Gizmos.color = this.gizmoColor; Gizmos.DrawWireCube(this.bounds.center, this.bounds.size); GizmosEx.DrawArrow(base.bounds.center, base.transform.rotation * Vector3Ex.Up * this.gizmoArrowLength); Gizmos.color = previousColor; }
void OnDrawGizmosSelected() { Matrix4x4 proj = default(Matrix4x4); if (m_Orthographic) { proj = Matrix4x4.Ortho(-m_AspectRatio * m_OrthographicSize, m_AspectRatio * m_OrthographicSize, -m_OrthographicSize, m_OrthographicSize, m_NearClipPlane, m_FarClipPlane); } else { proj = Matrix4x4.Perspective(m_FieldOfView, m_AspectRatio, m_NearClipPlane, m_FarClipPlane); } GizmosEx.DrawViewFrustum(proj, transform.localToWorldMatrix, new Color(0.65f, 0.65f, 0.65f, 1)); }
protected void OnDrawGizmos() { if (Curve == null) { return; } for (int s = 0; s < Curve.SegmentCount; ++s) { var segment = Curve.GetSegment(s); var points = segment.Points; if (ShowSegments) { using (new GizmosColorScope(SegmentColors.LoopedAt(s, Color.cyan))) { for (int i = 0; i < points.Count - 1; ++i) { var p0 = points[i]; var p1 = points[i + 1]; GizmosEx.DrawLine(p0, p1, transform); } } } if (ShowPoints) { using (new GizmosColorScope(Color.yellow)) { foreach (var point in points) { GizmosEx.DrawCross(point, PointSize, transform); } } } } if (ShowKeyPoints) { using (new GizmosColorScope(Color.magenta)) { foreach (var point in Curve.KeyPoints) { GizmosEx.DrawCross(point, PointSize, transform); } } } }
void OnDrawGizmosSelected() { Matrix4x4 proj = default(Matrix4x4); if (m_Orthographic) { proj = Matrix4x4.Ortho(-m_AspectRatio * m_OrthographicSize, m_AspectRatio * m_OrthographicSize, -m_OrthographicSize, m_OrthographicSize, m_NearClipPlane, m_FarClipPlane); } else { proj = Matrix4x4.Perspective(m_FieldOfView, m_AspectRatio, m_NearClipPlane, m_FarClipPlane); } GizmosEx.DrawViewFrustum(proj, transform.localToWorldMatrix, new Color(0.65f, 0.65f, 0.65f, 1)); if (m_Mesh != null) { Matrix4x4 posOffMatrix = Matrix4x4.TRS(transform.position, Quaternion.identity, transform.localScale); m_Mesh.OnDrawGizmosSelected(transform.localToWorldMatrix * posOffMatrix); } }
public void DrawGizmos() { foreach(var fairwayPoint in points) { // GizmosEx.DrawCircle(fairwayPoint.position, fairwayPoint.radius, transform.up); // var coords = MathfEx.CircleCoordinatesXZ(fairwayPoint.position, fairwayPoint.radius, transform.rotation); // foreach(var coord in coords) // Gizmos.DrawWireSphere(coord, 0.1f); } Gizmos.color = Color.white; foreach(var hull in hulls) GizmosEx.DrawPolygon(hull.points); Gizmos.color = Color.yellow; GizmosEx.DrawPolygon(holeHull.points); }
private void OnDrawGizmosSelected() { // var refPos = transform.TransformPoint(center); // var refRot = referenceBone.rotation * Quaternion.FromToRotation(Vector3.up, GetDirectionFromInt(direction)); // // Gizmos.color = Color.blue; // GizmosEx.DrawWireCapsule(refPos, refRot, radius, height + radius * 2); var pos = transform.TransformPoint(center); var rot = transform.rotation * Quaternion.FromToRotation(Vector3.up, GetDirectionFromInt(direction)); Gizmos.color = Color.red; GizmosEx.DrawWireCapsule(pos, rot, radius, height + radius * 2); if (Rigidbody == null) { return; } Gizmos.color = Color.gray; Gizmos.DrawSphere(transform.TransformPoint(Rigidbody.centerOfMass), 0.05f); }
protected override void OnDrawGizmos() { base.OnDrawGizmos(); if (Spline == null) { return; } if (ShowTangents) { using (new GizmosColorScope(Color.magenta)) { for (int i = 0; i < Spline.PointCount; ++i) { var p = Spline[i]; var t = Spline.Tangents[i]; GizmosEx.DrawLine(p, p + t, transform); } } } }
private void OnDrawGizmosSelected() { GizmosEx.DrawWireArc(this.transform.position - this.Offset, 0.3f); }