コード例 #1
0
        /// <summary>
        /// Sets the current color of a pixel
        /// </summary>
        /// <param name="x">Width of the pixel</param>
        /// <param name="y">Height of the pixel</param>
        /// <param name="color">Color of the pixel</param>
        public void SetPixel(int x, int y, Color color)
        {
            bool unlock = _lockresult == IntPtr.Zero;
            if (unlock)
                Lock();

            LockResult_SetPixel(_lockresult, _raw, x, y, color.ToUnmanaged());

            if (unlock)
                Unlock();
        }
コード例 #2
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw3DLine(Vector3D start, Vector3D end, Color color)
 {
     VideoDriver_Draw3DLine(_raw, start.ToUnmanaged(), end.ToUnmanaged(), color.ToUnmanaged());
 }
コード例 #3
0
        public void DrawW(string text, Rect rect, Color color, bool hcenter, bool vcenter)
        {
#if !LINUX
			GUIFont_DrawW(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
#else
			GUIFont_Draw(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
#endif
        }
コード例 #4
0
 public TextSceneNode AddTextSceneNodeW(GUIFont font, string text, Color color, SceneNode parent)
 {
     IntPtr par = IntPtr.Zero;
     if (parent != null)
         par = parent.Raw;
     return (TextSceneNode)
         NativeElement.GetObject(SceneManager_AddTextSceneNodeW(_raw, font.Raw, text, color.ToUnmanaged(), par),
                                 typeof(TextSceneNode));
 }
コード例 #5
0
 public void DrawW(string text, Rect rect, Color color, bool hcenter, bool vcenter)
 {
     GUIFont_DrawW(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
 }
コード例 #6
0
 public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter, Rect cliprect)
 {
     GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, cliprect.ToUnmanaged());
 }
コード例 #7
0
 /// <summary>
 /// Adds a heightmap-based terrain on the scene
 /// </summary>
 /// <returns>The terrain node</returns>
 /// <param name="heightMap">Relative or non-relative path to the heightmap.</param>
 /// <param name="parent">Parent from the terrain</param>
 /// <param name="id">ID (-1 for automatic assign.)</param>
 /// <param name="position">Position of the node</param>
 /// <param name="rotation">Rotation of the node</param>
 /// <param name="scale">Scale of the node</param>
 /// <param name="vertexColor">Default color of all the vertices used if no texture is assigned to the node.</param>
 /// <param name="maxLOD">Maximal LOD, set 5 or change it ONLY IF YOU KNOW WHAT YOU ARE DOING</param>
 /// <param name="patchSize">PatchSize, should be 17 and you mustn't change it unless you know what you're doing</param>
 public TerrainSceneNode AddTerrainSceneNode(string heightMap, SceneNode parent, int id, Vector3D position, Vector3D rotation, Vector3D scale, Color vertexColor, int maxLOD, TerrainPatchSize patchSize, int smoothFactor)
 {
     IntPtr par = IntPtr.Zero;
     if(parent != null)
         par = parent.Raw;
     return (TerrainSceneNode)
         NativeElement.GetObject(SceneManager_AddTerrainSceneNode(_raw, heightMap, par, id, position.ToUnmanaged(), rotation.ToUnmanaged(), scale.ToUnmanaged(), vertexColor.ToUnmanaged(), maxLOD, patchSize, smoothFactor),
                                 typeof(TerrainSceneNode));
 }
コード例 #8
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void SetFog(Color color, bool linearFog, float start, float end, float density, bool pixelFog, bool rangeFog)
 {
     VideoDriver_SetFog(_raw, color.ToUnmanaged(), linearFog, start, end, density, pixelFog, rangeFog);
 }
コード例 #9
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 /// <summary>
 /// Begin the scene
 /// </summary>
 /// <param name="back">Should the back buffer be cleared ?</param>
 /// <param name="z">Should the Z buffer be cleared ? (useless on 2D-only applications)</param>
 /// <param name="col">Color of the backbuffer</param>
 /// <returns>False if failed</returns>
 public bool BeginScene(bool back, bool z, Color col)
 {
     return VideoDriver_BeginScene(_raw, back, z, col.ToUnmanaged());
 }
コード例 #10
0
		public ParticleEmitter CreatePointEmitter(Vector3D direction, uint minPPS, uint maxPPS, Color minSC, Color maxSC, uint minLT, uint maxLT, int maxAngleDegrees)
		{
			return (ParticleEmitter)
				NativeElement.GetObject(Particle_CreatePointEmitter(_raw, direction.ToUnmanaged(), minPPS, maxPPS, minSC.ToUnmanaged(), maxSC.ToUnmanaged(), minLT, maxLT, maxAngleDegrees),
										typeof(ParticleEmitter));
		}
コード例 #11
0
		public ParticleAffector CreateFadeOutParticleAffector(Color TargetColor, uint TimeNeededToFadeOut)
		{
			return (ParticleAffector)
				NativeElement.GetObject(Particle_CreateFadeOutParticleAffector(_raw, TargetColor.ToUnmanaged(), TimeNeededToFadeOut),
				                        typeof(ParticleAffector));
		}
コード例 #12
0
ファイル: GUISkin.cs プロジェクト: Paulus/irrlichtnetcp
 /// <summary>
 /// Sets the default color.
 /// </summary>
 /// <param name="color">Specified default color</param>
 /// <param name="col">New color</param>
 public void SetColor(GuiDefaultColor color, Color col)
 {
     GuiSkin_SetColor(_raw, color, col.ToUnmanaged());
 }
コード例 #13
0
 /// <summary>
 /// Sets the colors of all vertices to one color. 
 /// </summary>
 /// <param name="mesh">Mesh on which the operation is performed. </param>
 /// <param name="color">New color.</param>
 public void SetVertexColors(Mesh mesh, Color color)
 {
     MeshManipulator_SetVertexColors(_raw, mesh.Raw, color.ToUnmanaged());
 }
コード例 #14
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw3DTriangle(Triangle3D tri, Color col)
 {
     VideoDriver_Draw3DTriangle(_raw, tri.ToUnmanaged(), col.ToUnmanaged());
 }
コード例 #15
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw2DImage(Texture image, Position2D destPos, Rect sourceRect, Color color, bool useAlpha)
 {
     VideoDriver_Draw2DImageB(_raw, image.Raw, destPos.ToUnmanaged(), sourceRect.ToUnmanaged(), color.ToUnmanaged(), useAlpha);
 }
コード例 #16
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 /// <summary>
 /// Creates an 1bit alpha channel of the texture based on a color
 /// </summary>
 /// <param name="texture">Input texture that will be modified</param>
 /// <param name="color">Color</param>
 public void MakeColorKeyTexture(Texture texture, Color color)
 {
     VideoDriver_MakeColorKeyTextureA(_raw, texture.Raw, color.ToUnmanaged());
 }
コード例 #17
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw2DImage(Texture image, Rect destRect, Rect sourceRect, Rect clipRect, Color color, bool useAlpha)
 {
     VideoDriver_Draw2DImageC(_raw, image.Raw, destRect.ToUnmanaged(), sourceRect.ToUnmanaged(), clipRect.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), useAlpha);
 }
コード例 #18
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void SetRenderTarget(Texture target, bool clearBackBuffer, bool clearZBuffer, Color color)
 {
     VideoDriver_SetRenderTarget(_raw, (target == null ? IntPtr.Zero : target.Raw), clearBackBuffer, clearZBuffer, color.ToUnmanaged());
 }
コード例 #19
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw2DLine(Position2D start, Position2D end, Color color)
 {
     VideoDriver_Draw2DLine(_raw, start.ToUnmanaged(), end.ToUnmanaged(), color.ToUnmanaged());
 }
コード例 #20
0
 public TerrainSceneNode AddTerrainSceneNodeFromRawData(float[,] data, int width, SceneNode parent, int id, Vector3D position, Vector3D rotation, Vector3D scale, Color vertexColor, int maxLOD, TerrainPatchSize patchSize, int smoothFactor)
 {
     IntPtr par = IntPtr.Zero;
     if (parent != null)
         par = parent.Raw;
     return (TerrainSceneNode)
         NativeElement.GetObject(SceneManager_AddTerrainSceneNodeFromRawData(_raw, data, data.Length, width, par, id, position.ToUnmanaged(), rotation.ToUnmanaged(), scale.ToUnmanaged(), vertexColor.ToUnmanaged(), maxLOD, patchSize, smoothFactor),
                                 typeof(TerrainSceneNode));
 }
コード例 #21
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw2DPolygon(Position2D center, float radius, Color color, int vertexCount)
 {
     VideoDriver_Draw2DPolygon(_raw, center.ToUnmanaged(), radius, color.ToUnmanaged(), vertexCount);
 }
コード例 #22
0
 public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter)
 {
     GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
 }
コード例 #23
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw2DRectangle(Rect rectangle, Color leftUp, Color rightUp, Color leftDown, Color rightDown)
 {
     VideoDriver_Draw2DRectangle(_raw, rectangle.ToUnmanaged(), leftUp.ToUnmanaged(), rightUp.ToUnmanaged(), leftDown.ToUnmanaged(), rightDown.ToUnmanaged());
 }
コード例 #24
0
 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));
 }
コード例 #25
0
ファイル: VideoDriver.cs プロジェクト: Paulus/irrlichtnetcp
 public void Draw3DBox(Box3D box, Color color)
 {
     VideoDriver_Draw3DBox(_raw, box.ToUnmanaged(), color.ToUnmanaged());
 }
コード例 #26
0
 public void SetColor(Color col)
 {
     MeshBuffer_SetColor(_raw, col.ToUnmanaged());
 }
コード例 #27
0
        public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter)
        {
#if !LINUX
            GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
#else
			GUIFont_Draw(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null);
#endif
        }