public void AddPrimitive(DebugRenderPrimitive primitive) { DebugRenderStorage.ModificationAt(primitive.StartTime); DebugRenderStorage.AddPrimitive(primitive); UpdateDuration(primitive.StartTime + (primitive.InfiniteLength ? 0 : primitive.Duration)); }
public CircleSelectionInfo(DebugRenderPrimitive selectedPrimitive, int triangleIndex, bool isSelectedTriangleOpaque) : base(selectedPrimitive, triangleIndex, isSelectedTriangleOpaque) { Color = Primitive.GetColor(TriangleIndex, IsSelectedTriangleOpaque); Center = (selectedPrimitive as DebugRenderCircle).center; Radius = (selectedPrimitive as DebugRenderCircle).radius; Up = (selectedPrimitive as DebugRenderCircle).up; }
public void AddAnnotation(long primitive_id, int time, int duration, string text, Color32 color) { DebugRenderPrimitive primitive = DebugRenderStorage.GetPrimitive(primitive_id); if (primitive != null) { primitive.Annotation = new DebugRenderAnnotation(text, color, time, duration); } }
private void OnHighlightChanged(DebugRenderPrimitive selectedPrimitive, int selectedTriangleIndex, bool isSelectedTriangleOpaque) { if (selectedPrimitive != null) { highlightPropertyGrid.SelectedObject = selectedPrimitive.GetSelectionInfo(selectedTriangleIndex, isSelectedTriangleOpaque); } else { highlightPropertyGrid.SelectedObject = (debugRenderControl.Session as RDRSession).SceneInfo; } }
public void RemoveAnnotation(long primitive_id, int time) { DebugRenderPrimitive primitive = DebugRenderStorage.GetPrimitive(primitive_id); if (primitive != null && primitive.Annotation != null) { DebugRenderStorage.ModificationAt(time); primitive.Annotation.EndTime = time; UpdateDuration(time); } }
public TriMeshSelectionInfo(DebugRenderPrimitive selectedPrimitive, int triangleIndex, bool isSelectedTriangleOpaque) : base(selectedPrimitive, triangleIndex, isSelectedTriangleOpaque) { Vector3 a, b, c; if (Primitive.GetTriangle(TriangleIndex, IsSelectedTriangleOpaque, out a, out b, out c)) { V0 = a; V1 = b; V2 = c; } else { V0 = V1 = V2 = new Vector3(0, 0, 0); } Color = Primitive.GetColor(TriangleIndex, IsSelectedTriangleOpaque); }
public ConeSelectionInfo(DebugRenderPrimitive selectedPrimitive, int triangleIndex, bool isSelectedTriangleOpaque) : base(selectedPrimitive, triangleIndex, isSelectedTriangleOpaque) { Color = Primitive.GetColor(TriangleIndex, IsSelectedTriangleOpaque); }