corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | /* |
2 | * Copyright (c) 2006-2014, openmetaverse.org |
||
3 | * All rights reserved. |
||
4 | * |
||
5 | * - Redistribution and use in source and binary forms, with or without |
||
6 | * modification, are permitted provided that the following conditions are met: |
||
7 | * |
||
8 | * - Redistributions of source code must retain the above copyright notice, this |
||
9 | * list of conditions and the following disclaimer. |
||
10 | * - Neither the name of the openmetaverse.org nor the names |
||
11 | * of its contributors may be used to endorse or promote products derived from |
||
12 | * this software without specific prior written permission. |
||
13 | * |
||
14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
||
17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
||
18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
||
19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
||
20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
||
21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
||
22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
||
23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
||
24 | * POSSIBILITY OF SUCH DAMAGE. |
||
25 | */ |
||
26 | |||
27 | using System; |
||
28 | using System.Collections.Generic; |
||
29 | using System.Drawing; |
||
30 | |||
31 | namespace OpenMetaverse.Rendering |
||
32 | { |
||
33 | [AttributeUsage(AttributeTargets.Class)] |
||
34 | public class RendererNameAttribute : System.Attribute |
||
35 | { |
||
36 | private string _name; |
||
37 | |||
38 | public RendererNameAttribute(string name) |
||
39 | : base() |
||
40 | { |
||
41 | _name = name; |
||
42 | } |
||
43 | |||
44 | public override string ToString() |
||
45 | { |
||
46 | return _name; |
||
47 | } |
||
48 | } |
||
49 | |||
50 | /// <summary> |
||
51 | /// Abstract base for rendering plugins |
||
52 | /// </summary> |
||
53 | public interface IRendering |
||
54 | { |
||
55 | /// <summary> |
||
56 | /// Generates a basic mesh structure from a primitive |
||
57 | /// </summary> |
||
58 | /// <param name="prim">Primitive to generate the mesh from</param> |
||
59 | /// <param name="lod">Level of detail to generate the mesh at</param> |
||
60 | /// <returns>The generated mesh</returns> |
||
61 | SimpleMesh GenerateSimpleMesh(Primitive prim, DetailLevel lod); |
||
62 | |||
63 | /// <summary> |
||
64 | /// Generates a basic mesh structure from a sculpted primitive and |
||
65 | /// texture |
||
66 | /// </summary> |
||
67 | /// <param name="prim">Sculpted primitive to generate the mesh from</param> |
||
68 | /// <param name="sculptTexture">Sculpt texture</param> |
||
69 | /// <param name="lod">Level of detail to generate the mesh at</param> |
||
70 | /// <returns>The generated mesh</returns> |
||
71 | SimpleMesh GenerateSimpleSculptMesh(Primitive prim, Bitmap sculptTexture, DetailLevel lod); |
||
72 | |||
73 | /// <summary> |
||
74 | /// Generates a series of faces, each face containing a mesh and |
||
75 | /// metadata |
||
76 | /// </summary> |
||
77 | /// <param name="prim">Primitive to generate the mesh from</param> |
||
78 | /// <param name="lod">Level of detail to generate the mesh at</param> |
||
79 | /// <returns>The generated mesh</returns> |
||
80 | FacetedMesh GenerateFacetedMesh(Primitive prim, DetailLevel lod); |
||
81 | |||
82 | /// <summary> |
||
83 | /// Generates a series of faces for a sculpted prim, each face |
||
84 | /// containing a mesh and metadata |
||
85 | /// </summary> |
||
86 | /// <param name="prim">Sculpted primitive to generate the mesh from</param> |
||
87 | /// <param name="sculptTexture">Sculpt texture</param> |
||
88 | /// <param name="lod">Level of detail to generate the mesh at</param> |
||
89 | /// <returns>The generated mesh</returns> |
||
90 | FacetedMesh GenerateFacetedSculptMesh(Primitive prim, Bitmap sculptTexture, DetailLevel lod); |
||
91 | |||
92 | /// <summary> |
||
93 | /// Apply texture coordinate modifications from a |
||
94 | /// <seealso cref="TextureEntryFace"/> to a list of vertices |
||
95 | /// </summary> |
||
96 | /// <param name="vertices">Vertex list to modify texture coordinates for</param> |
||
97 | /// <param name="center">Center-point of the face</param> |
||
98 | /// <param name="teFace">Face texture parameters</param> |
||
99 | /// <param name="primScale">Scale of the prim</param> |
||
100 | void TransformTexCoords (List<Vertex> vertices, Vector3 center, Primitive.TextureEntryFace teFace, Vector3 primScale); |
||
101 | } |
||
102 | } |