コード例 #1
0
        private void OnRenderObject()
        {
            var cam = Camera.current;

            if (cam == null)
            {
                return;
            }

            var points = new List <Vector3d>();

            foreach (var p in m_particles)
            {
                points.Add(p.Position);
            }

            m_lines.Clear();
            m_lines.Load(points);

            m_verts.Clear();
            m_verts.Load(points);

            m_lines.Draw(cam);
            m_verts.Draw(cam);
        }
コード例 #2
0
 public void Draw(GraphicsDevice device, CommonShaderParameters parameters)
 {
     VertexRenderer.Update(Node.Geometry, Node.ModelMatrix, Node.Orientation, parameters.CameraPosition, SelectedVertices);
     VertexRenderer.Draw(parameters.View, parameters.Projection, device, new Vector3(0, 1, 0));
 }