Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer Class Reference

Public Member Functions

 BitmapMeshalizer ()
 
Mesh CreateMesh (Bitmap bitmap)
 

Public Attributes

float Width = 1f
 
float Height = 1f
 
float OffsetX = -0.5f
 
float OffsetY = -0.5f
 
float Depth = 0.05f
 
byte AlphaTreshold = 10
 
byte AlphaTresholdMax = 250
 
Material Material
 

Constructor & Destructor Documentation

essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.BitmapMeshalizer ( )
25  {
26 
27  }

Member Function Documentation

Mesh essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.CreateMesh ( Bitmap  bitmap)
30  {
31  if (bitmap == null)
32  {
33  throw new InvalidDataException("Required bitmap");
34  }
35 
36  var visbuff = MapAlphaChannel(bitmap);
37  var mesh = new Mesh(true);
38 
39  foreach(var rect in visbuff.EnumerateRectangles())
40  {
41  DrawRect(mesh, visbuff, rect);
42  }
43 
44  return mesh;
45  }
A raw, un-optimize, fully mutable, representation of a static mesh
Definition: Mesh.cs:13

Member Data Documentation

byte essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.AlphaTreshold = 10
byte essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.AlphaTresholdMax = 250
float essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.Depth = 0.05f
float essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.Height = 1f
Material essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.Material
float essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.OffsetX = -0.5f
float essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.OffsetY = -0.5f
float essentials.action.ItemFramework.Meshalizer.BitmapMeshalizer.Width = 1f

The documentation for this class was generated from the following file: