Exemple #1
0
        public void AddPrimitive(DebugRenderPrimitive primitive)
        {
            DebugRenderStorage.ModificationAt(primitive.StartTime);

            DebugRenderStorage.AddPrimitive(primitive);
            UpdateDuration(primitive.StartTime + (primitive.InfiniteLength ? 0 : primitive.Duration));
        }
Exemple #2
0
 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;
 }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
 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;
     }
 }
Exemple #5
0
        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);
            }
        }
Exemple #6
0
        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);
        }
Exemple #7
0
 public ConeSelectionInfo(DebugRenderPrimitive selectedPrimitive, int triangleIndex, bool isSelectedTriangleOpaque)
     : base(selectedPrimitive, triangleIndex, isSelectedTriangleOpaque)
 {
     Color = Primitive.GetColor(TriangleIndex, IsSelectedTriangleOpaque);
 }