Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / common / data_common / r2 / r2_prim_render.lua
blobfac48cdeb9fa406738b77e5addedbed9be19b3a1
1 -- Definition file for primitives rendering
3 -- enums
4 r2.PrimRender = {}
5 r2.PrimRender.Shape = { Star = 0, PolyLine = 1, ClosedPolyLine = 2 }
6 r2.PrimRender.WrapMode =
7 {
8 Repeat = 0,
9 Centered = 1, -- centered & clamped texture
10 Scaled = 2 -- the texture corver the whole quad surface on the world map (not supported for decals, resumes to Repeat)
14 -- definition of a primitive look
15 -- should be passed as a parameter to the visual displayer of type R2ED::CDisplayerVisualGroup
16 r2.DefaultPrimLook =
18 Shape = r2.PrimRender.Shape.Star,
19 VertexShapeName = "",
20 VertexShapeScale = 1,
21 VertexLook =
23 DecalTexture = "",
24 DecalSize = 1,
25 DecalColor = CRGBA(255, 255, 255),
26 DecalDistToEdgeDecal = 0,
27 WorldMapTexture = "",
28 WorldMapColor = CRGBA(255, 255, 255)
30 FirstVertexLook =
32 DecalTexture = "",
33 DecalSize = 1,
34 DecalColor = CRGBA(255, 255, 255),
35 DecalDistToEdgeDecal = 0,
36 WorldMapTexture = "",
37 WorldMapColor = CRGBA(255, 255, 255)
39 EdgeLook =
41 ShapeName = "",
42 ShapeScale = 1,
43 DecalTexture = "",
44 DecalUScale = 1,
45 DecalWidth = 1,
46 WorldMapTexture = "",
47 WorldMapWidth = 0,
48 WorldMapColor = CRGBA(255, 255, 255),
49 WrapMode = r2.PrimRender.WrapMode.Repeat,
50 VorldMapFiltered = true
52 LastEdgeIsValid = true
55 -- look for region
56 r2.PrimRender.RegionLook =
58 Shape = r2.PrimRender.Shape.ClosedPolyLine,
59 VertexLook =
62 EdgeLook =
64 DecalTexture = "r2_zone_edge.tga",
65 DecalColor = CRGBA(0, 255, 0, 255),
66 DecalUScale = 2,
67 DecalWidth = 0.1,
68 WrapMode = r2.PrimRender.WrapMode.Repeat,
69 WorldMapTexture = "r2_map_zone_edge.tga",
70 WorldMapWidth = 1,
71 WorldMapColor = CRGBA(0, 255, 0, 255)
75 -- look for invalid region (self intersecting)
76 r2.PrimRender.RegionInvalidLook =
78 Shape = r2.PrimRender.Shape.ClosedPolyLine,
79 VertexLook =
81 DecalTexture = "r2_zone_vertex_invalid.tga",
82 DecalSize = 0.2,
84 EdgeLook =
86 DecalTexture = "r2_zone_edge.tga",
87 DecalColor = CRGBA(255, 0, 255),
88 DecalUScale = 2,
89 DecalWidth = 0.1,
90 WrapMode = r2.PrimRender.WrapMode.Repeat,
91 WorldMapTexture = "r2_map_edge_stipple.tga",
92 WorldMapWrapMode = r2.PrimRender.WrapMode.Repeat,
93 WorldMapUScale = 0.5,
94 WorldMapWidth = 1,
95 WorldMapColor = CRGBA(127, 127, 127)
99 -- look for region being drawn
100 r2.PrimRender.RegionCreateLook = clone(r2.PrimRender.RegionLook)
101 r2.PrimRender.RegionCreateLook.VertexShapeName = "r2_region_vertex.shape"
102 r2.PrimRender.RegionCreateLook.VertexShapeScale = 0.25
103 r2.PrimRender.RegionCreateLook.VertexShapeScale = 0.25
104 r2.PrimRender.RegionCreateLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga"
105 r2.PrimRender.RegionCreateLook.Shape = r2.PrimRender.Shape.PolyLine
106 --r2_icon_map_entity_small.tga
107 r2.PrimRender.RegionCreateInvalidLook= clone(r2.PrimRender.RegionInvalidLook)
108 r2.PrimRender.RegionCreateInvalidLook.VertexShapeName = ""
109 r2.PrimRender.RegionCreateInvalidLook.Shape = r2.PrimRender.Shape.PolyLine
110 r2.PrimRender.RegionCreateInvalidLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga"
111 r2.PrimRender.RegionCreateInvalidLook.EdgeLook.WorldMapColor = CRGBA(255, 0, 0)
112 -- look when a region can be closed (mouse is on first vertex and there are at least 3 points)
113 r2.PrimRender.RegionCreateCanCloseLook = clone(r2.PrimRender.RegionCreateLook)
114 r2.PrimRender.RegionCreateCanCloseLook.EdgeLook.DecalColor = CRGBA(255, 255, 0)
115 r2.PrimRender.RegionCreateCanCloseLook.EdgeLook.WorldMapColor = CRGBA(255, 255, 0)
116 r2.PrimRender.RegionCreateCanCloseLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga"
117 r2.PrimRender.RegionCreateCanCloseLook.Shape = r2.PrimRender.Shape.ClosedPolyLine
121 -- look for road
122 r2.PrimRender.RoadLook =
124 Shape = r2.PrimRender.Shape.PolyLine,
125 VertexLook =
128 EdgeLook =
130 DecalTexture = "r2_path.tga",
131 DecalColor = CRGBA(0, 127, 255, 160),
132 DecalUScale = 0.25,
133 DecalWidth = 0.4,
134 DecalWrapMode = r2.PrimRender.WrapMode.Repeat,
135 WorldMapTexture = "r2_map_edge_arrow.tga",
136 WorldMapWrapMode = r2.PrimRender.WrapMode.Centered,
137 WorldMapUScale = 0.3,
138 WorldMapWidth = 3.5,
139 WorldMapColor = CRGBA(0, 127, 255, 160)
141 ClipDownFacing = true
144 r2.PrimRender.RoadLookInvalid = clone(r2.PrimRender.RegionInvalidLook)
145 r2.PrimRender.RoadLookInvalid.EdgeLook.WorldMapColor = CRGBA(127, 127, 127, 127)
146 r2.PrimRender.RoadLookInvalid.EdgeLook.WorldMapTexture = "r2_map_edge_stipple.tga"
147 r2.PrimRender.RoadLookInvalid.Shape = r2.PrimRender.Shape.PolyLine
148 r2.PrimRender.RoadLookInvalid.ClipDownFacing = true
150 r2.PrimRender.RoadLookInaccessible = clone(r2.PrimRender.RoadLookInvalid)
151 r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapTexture = "*accessibility_texture*"
152 r2.PrimRender.RoadLookInaccessible.EdgeLook.DecalTexture = "*accessibility_texture*"
153 r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapcolor = CRGBA(255, 0, 255, 255)
154 r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapWidth = 2
155 r2.PrimRender.RoadLookInaccessible.EdgeLook.WorldMapFiltered = false
156 r2.PrimRender.RoadLookInaccessible.EdgeLook.DecalFiltered = false
157 r2.PrimRender.RoadLookInaccessible.ClipDownFacing = true
163 -- look for road being drawn
164 r2.PrimRender.RoadCreateLook = clone(r2.PrimRender.RoadLook)
165 r2.PrimRender.RoadCreateLook.VertexShapeName = "r2_road_flag.shape"
166 r2.PrimRender.RoadCreateLook.VertexShapeScale = 0.4
167 r2.PrimRender.RoadCreateLook.VertexLook.WorldMapTexture ="r2_icon_map_entity_small.tga"
168 r2.PrimRender.RoadCreateInvalidLook = clone(r2.PrimRender.RegionCreateInvalidLook)
172 -- look for group
173 r2.PrimRender.GroupLook =
175 Shape = r2.PrimRender.Shape.Star,
176 VertexLook =
178 DecalTexture = "r2_selection_circle.tga",
179 DecalSize = 0.5,
180 DecalDistToEdgeDecal = 0.45,
181 DecalColor = CRGBA(0, 255, 0, 255),
183 FirstVertexLook =
185 DecalTexture = "r2_selection_circle_double.tga",
186 DecalSize = 0.7,
187 DecalDistToEdgeDecal = 0.62,
188 DecalColor = CRGBA(0, 255, 0, 255),
190 EdgeLook =
192 DecalTexture = "r2_arrow.tga",
193 DecalUScale = 0.5,
194 DecalWidth = 0.4,
195 DecalWrapMode = r2.PrimRender.WrapMode.Centered,
196 DecalColor = CRGBA(0, 255, 0, 255),
197 WorldMapTexture = "r2_map_edge_arrow.tga",
198 WorldMapWrapMode = r2.PrimRender.WrapMode.Centered,
199 WorldMapUScale = -0.6,
200 WorldMapWidth = 2.5,
201 WorldMapColor = CRGBA(0, 255, 0, 160)
203 ClipDownFacing = true
206 -- look for auto group
207 r2.PrimRender.AutoGroupLook = clone(r2.PrimRender.GroupLook)
208 r2.PrimRender.AutoGroupLook.VertexLook.DecalColor = CRGBA(0, 255, 0, 80)
209 r2.PrimRender.AutoGroupLook.FirstVertexLook.DecalColor = CRGBA(0, 255, 0, 80)
210 r2.PrimRender.AutoGroupLook.EdgeLook.DecalColor = CRGBA(0, 255, 0, 80)
211 r2.PrimRender.AutoGroupLook.EdgeLook.WorldMapColor = CRGBA(0, 255, 0, 80)
214 -- hightlight / selection boxs
215 r2.PrimRender.SelectBoxLook =
217 Shape = r2.PrimRender.Shape.ClosedPolyLine,
218 VertexLook =
220 DecalTexture = "r2_zone_corner.tga",
221 DecalSize = 0.1,
222 --DecalDistToEdgeDecal = 0.45,
223 DecalColor = CRGBA(255, 0, 0, 255),
225 FirstVertexLook =
227 DecalTexture = "r2_zone_corner.tga",
228 DecalSize = 0.1,
229 --DecalDistToEdgeDecal = 0.62,
230 DecalColor = CRGBA(255, 0, 0, 255),
232 EdgeLook =
234 DecalTexture = "r2_zone_edge.tga",
235 DecalUScale = 0.5,
236 DecalWidth = 0.1,
237 DecalWrapMode = r2.PrimRender.WrapMode.Centered,
238 DecalColor = CRGBA(255, 0, 0, 255),
239 WorldMapTexture = "r2_map_edge_arrow.tga",
240 WorldMapWrapMode = r2.PrimRender.WrapMode.Centered,
241 WorldMapUScale = -0.6,
242 WorldMapWidth = 2.5,
243 WorldMapColor = CRGBA(255, 0, 0, 40)
247 -- nb : edge colors ignored for highlight & slect box : those are taken from hightlight & select decal instead (they are animated)
249 r2.PrimRender.HighlightBoxLook = clone(r2.PrimRender.SelectBoxLook)
250 r2.PrimRender.HighlightBoxLook.VertexLook.DecalColor = CRGBA(255, 255, 255, 255)
251 r2.PrimRender.HighlightBoxLook.FirstVertexLook.DecalColor = CRGBA(255, 255, 255, 255)
252 r2.PrimRender.HighlightBoxLook.EdgeLook.DecalColor = CRGBA(255, 255, 255, 255)
253 r2.PrimRender.HighlightBoxLook.EdgeLook.WorldMapColor = CRGBA(255, 255, 255, 40)
256 r2.PrimRender.SelectBoxLook.EdgeLook.DecalTexture = "r2_select_edge.tga"
257 r2.PrimRender.SelectBoxLook.EdgeLook.DecalUScale = 2
258 r2.PrimRender.SelectBoxLook.EdgeLook.DecalWidth = 0.15
259 r2.PrimRender.SelectBoxLook.VertexLook.DecalSize = 0.15
260 r2.PrimRender.SelectBoxLook.FirstVertexLook.DecalSize = 0.15
263 r2.PrimRender.ComponentRegionLook =
265 Shape = r2.PrimRender.Shape.ClosedPolyLine,
266 VertexLook =
269 EdgeLook =
271 DecalTexture = "r2_zone_edge.tga",
272 DecalColor = CRGBA(0, 255, 0, 127),
273 DecalUScale = 2,
274 DecalWidth = 0.1,
275 WrapMode = r2.PrimRender.WrapMode.Repeat,
276 WorldMapTexture = "r2_map_zone_edge.tga",
277 WorldMapWidth = 1,
278 WorldMapColor = CRGBA(0, 255, 0, 32)
282 r2.PrimRender.ComponentRegionInvalidLook =
284 Shape = r2.PrimRender.Shape.ClosedPolyLine,
285 VertexLook =
288 EdgeLook =
290 DecalTexture = "r2_zone_edge.tga",
291 DecalColor = CRGBA(255, 0, 0, 127),
292 DecalUScale = 2,
293 DecalWidth = 0.1,
294 WrapMode = r2.PrimRender.WrapMode.Repeat,
295 WorldMapTexture = "r2_map_edge_stipple.tga",
296 WorldMapWrapMode = r2.PrimRender.WrapMode.Repeat,
297 WorldMapUScale = 0.5,
298 WorldMapWidth = 1,
299 WorldMapColor = CRGBA(255, 0, 0, 32)