Ejemplo n.º 1
0
 /// <summary>
 /// Creates a hill plane mesh (used for instance for any water)
 /// </summary>
 /// <returns>The mesh</returns>
 /// <param name="name">Name of this mesh</param>
 /// <param name="tileSize">Size of each tile from the mesh</param>
 /// <param name="tileCount">Number of tiles</param>
 /// <param name="hillHeight">Height of each hills</param>
 /// <param name="countHills">Number of hills</param>
 /// <param name="textureRepeatCount">Texture repeatition count</param>
 public AnimatedMesh AddHillPlaneMesh(string name, Dimension2Df tileSize, Dimension2D tileCount, float hillHeight, Dimension2Df countHills, Dimension2Df textureRepeatCount)
 {
     return (AnimatedMesh)
         NativeElement.GetObject(SceneManager_AddHillPlaneMesh(_raw, name, tileSize.ToUnmanaged(), tileCount.ToUnmanaged(), hillHeight, countHills.ToUnmanaged(), textureRepeatCount.ToUnmanaged()),
                                 typeof(AnimatedMesh));
 }
 public TextSceneNode AddBillboardTextSceneNodeW(GUIFont font, string text, SceneNode parent, Dimension2Df size, Vector3D position, int id, Color shade_top, Color shade_down)
 {
     IntPtr par = IntPtr.Zero;
     if (parent != null)
         par = parent.Raw;
     return (TextSceneNode)
         NativeElement.GetObject(SceneManager_AddTextSceneNode2W(_raw, font.Raw, text, par, size.ToUnmanaged(), position.ToUnmanaged(),
                                                         id, shade_top.ToUnmanaged(), shade_down.ToUnmanaged()),
                                 typeof(TextSceneNode));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds a billboard (simple 2D texture which seems to be on a 3D box)
 /// </summary>
 /// <returns>The billboard</returns>
 /// <param name="parent">Parents from the node</param>
 /// <param name="size">Size of the billboard</param>
 /// <param name="id">ID (-1 for automatic ID assignation)</param>
 public BillboardSceneNode AddBillboardSceneNode(SceneNode parent, Dimension2Df size, int id)
 {
     IntPtr par = IntPtr.Zero;
     if(parent != null)
         par = parent.Raw;
     return (BillboardSceneNode)
         NativeElement.GetObject(SceneManager_AddBillboardSceneNode(_raw, par, size.ToUnmanaged(), id),
                             typeof(BillboardSceneNode));
 }