C# 클래스 Vocaluxe.Lib.Draw.CDirect3D

상속: System.Windows.Forms.Form, IDraw
파일 보기 프로젝트 열기: stsundermann/Vocaluxe

공개 메소드들

메소드 설명
AddTexture ( Bitmap bmp ) : Vocaluxe.Lib.Draw.STexture

Adds a texture and stores it in the Vram

AddTexture ( Bitmap bmp, string TexturePath ) : Vocaluxe.Lib.Draw.STexture

Adds a texture and stores it in the Vram

AddTexture ( int W, int H, IntPtr Data ) : Vocaluxe.Lib.Draw.STexture
AddTexture ( int W, int H, byte &Data ) : Vocaluxe.Lib.Draw.STexture
AddTexture ( string TexturePath ) : Vocaluxe.Lib.Draw.STexture

Adds a texture and stores it in the VRam

CDirect3D ( ) : System

Creates a new Instance of the CDirect3D Class

ClearScreen ( ) : void

Removes all textures from the screen

CopyScreen ( ) : Vocaluxe.Lib.Draw.STexture
CopyScreen ( Vocaluxe.Lib.Draw.STexture &Texture ) : void

Copies the current frame into a texture

DrawColor ( Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF rect ) : void

Draws a colored rectangle

DrawLine ( int a, int r, int g, int b, int w, int x1, int y1, int x2, int y2 ) : void

Draws a line

DrawText ( string Text, int x, int y, float h, float z ) : void

Draws a text string

DrawText ( string Text, int x, int y, int h ) : void

Draws a text string

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds, bool mirrored ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, bool mirrored ) : void

Draws a texture

DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, float begin, float end ) : void

Draws a texture

DrawTextureReflection ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds, float space, float height ) : void

Draws a reflection of a texture

GetScreenHeight ( ) : int

Gets the current viewport height

GetScreenWidth ( ) : int

Gets the current viewport width

GetTextBounds ( Vocaluxe.Menu.CText text ) : RectangleF

Calculates the bounds for a CText object

GetTextBounds ( Vocaluxe.Menu.CText text, float Height ) : RectangleF

Calculates the bounds for a CText object

Init ( ) : bool

Inits the Device

MainLoop ( ) : void

Starts the rendering

MakeScreenShot ( ) : void

Creates a Screenshot of the current frame

QuequeTexture ( int W, int H, byte &Data ) : Vocaluxe.Lib.Draw.STexture
RemoveTexture ( Vocaluxe.Lib.Draw.STexture &Texture ) : void

Removes a texture from the Vram

Reset ( ) : void

Resets the device, all objects in the Direct3D default pool get flushed and need to be recreated

TextureCount ( ) : int

Gets the count of current textures

Unload ( ) : bool

Unloads all Textures and other objects used by Direct3D for rendering

UpdateTexture ( Vocaluxe.Lib.Draw.STexture &Texture, IntPtr Data ) : bool

Updates the data of a texture

UpdateTexture ( Vocaluxe.Lib.Draw.STexture &Texture, byte &Data ) : bool

Updates the data of a texture

보호된 메소드들

메소드 설명
OnLoad ( EventArgs e ) : void
OnResize ( EventArgs e ) : void
WndProc ( Message &m ) : void

비공개 메소드들

메소드 설명
AddToVertexBuffer ( TexturedColoredVertex vertices, Texture tex, System.Matrix rotation ) : void

Adds a quad a list which will be added and rendered to the vertexbuffer when calling RenderToVertexBuffer to reduce vertexbuffer calls each frame to a minimum

CalculateRotationMatrix ( float rot, float rx1, float rx2, float ry1, float ry2 ) : System.Matrix
CheckQueque ( ) : void
EnterFullScreen ( ) : void

Triggers the Fullscreen mode

LeaveFullScreen ( ) : void

Triggers the windowed mode

NextPowerOfTwo ( float n ) : float

Calculates the next power of two

OnClosingEvent ( object sender, CancelEventArgs e ) : void
OnKeyDown ( object sender, System e ) : void
OnKeyPress ( object sender, System e ) : void
OnKeyUp ( object sender, System e ) : void
OnMouseDown ( object sender, MouseEventArgs e ) : void
OnMouseEnter ( object sender, EventArgs e ) : void
OnMouseLeave ( object sender, EventArgs e ) : void
OnMouseMove ( object sender, MouseEventArgs e ) : void
OnMouseUp ( object sender, MouseEventArgs e ) : void
OnMouseWheel ( object sender, MouseEventArgs e ) : void
OnPaintEvent ( object sender, PaintEventArgs e ) : void
OnPreviewKeyDown ( object sender, System e ) : void
OnResizeEvent ( object sender, EventArgs e ) : void
RResize ( ) : void

Resizes the viewport

RenderVertexBuffer ( ) : void

Renders the vertex buffer

_TextureExists ( Vocaluxe.Lib.Draw.STexture &Texture ) : bool

Checks if a texture exists

메소드 상세

AddTexture() 공개 메소드

Adds a texture and stores it in the Vram
public AddTexture ( Bitmap bmp ) : Vocaluxe.Lib.Draw.STexture
bmp System.Drawing.Bitmap The Bitmap of which the texute will be created from
리턴 Vocaluxe.Lib.Draw.STexture

AddTexture() 공개 메소드

Adds a texture and stores it in the Vram
public AddTexture ( Bitmap bmp, string TexturePath ) : Vocaluxe.Lib.Draw.STexture
bmp System.Drawing.Bitmap The Bitmap of which the texute will be created from
TexturePath string The path to the texture
리턴 Vocaluxe.Lib.Draw.STexture

AddTexture() 공개 메소드

public AddTexture ( int W, int H, IntPtr Data ) : Vocaluxe.Lib.Draw.STexture
W int
H int
Data System.IntPtr
리턴 Vocaluxe.Lib.Draw.STexture

AddTexture() 공개 메소드

public AddTexture ( int W, int H, byte &Data ) : Vocaluxe.Lib.Draw.STexture
W int
H int
Data byte
리턴 Vocaluxe.Lib.Draw.STexture

AddTexture() 공개 메소드

Adds a texture and stores it in the VRam
public AddTexture ( string TexturePath ) : Vocaluxe.Lib.Draw.STexture
TexturePath string The texture's filepath
리턴 Vocaluxe.Lib.Draw.STexture

CDirect3D() 공개 메소드

Creates a new Instance of the CDirect3D Class
public CDirect3D ( ) : System
리턴 System

ClearScreen() 공개 메소드

Removes all textures from the screen
public ClearScreen ( ) : void
리턴 void

CopyScreen() 공개 메소드

public CopyScreen ( ) : Vocaluxe.Lib.Draw.STexture
리턴 Vocaluxe.Lib.Draw.STexture

CopyScreen() 공개 메소드

Copies the current frame into a texture
public CopyScreen ( Vocaluxe.Lib.Draw.STexture &Texture ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture in which the frame is copied to
리턴 void

DrawColor() 공개 메소드

Draws a colored rectangle
public DrawColor ( Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF rect ) : void
color Vocaluxe.Lib.Draw.SColorF The color in which the rectangle will be drawn in
rect Vocaluxe.Lib.Draw.SRectF The coordinates in a SRectF struct
리턴 void

DrawLine() 공개 메소드

Draws a line
public DrawLine ( int a, int r, int g, int b, int w, int x1, int y1, int x2, int y2 ) : void
a int The alpha value from 0-255
r int The red value from 0-255
g int The red value from 0-255
b int The red value from 0-255
w int The width of the line
x1 int The start x-value
y1 int The start y-value
x2 int The end x-value
y2 int The end y-value
리턴 void

DrawText() 공개 메소드

Draws a text string
public DrawText ( string Text, int x, int y, float h, float z ) : void
Text string The text to be drawn
x int The text's x-position
y int The text's y-position
h float The text's height
z float The text's x-position
리턴 void

DrawText() 공개 메소드

Draws a text string
public DrawText ( string Text, int x, int y, int h ) : void
Text string The text to be drawn
x int The text's x-position
y int The text's y-position
h int The text's height
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
bounds Vocaluxe.Lib.Draw.SRectF A SRectF struct containing which part of the texture should be drawn
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds, bool mirrored ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
bounds Vocaluxe.Lib.Draw.SRectF A SRectF struct containing which part of the texture should be drawn
mirrored bool True if the texture should be mirrored
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, bool mirrored ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
mirrored bool True if the texture should be mirrored
리턴 void

DrawTexture() 공개 메소드

Draws a texture
public DrawTexture ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, float begin, float end ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
begin float A Value ranging from 0 to 1 containing the beginning of the texture
end float A Value ranging from 0 to 1 containing the ending of the texture
리턴 void

DrawTextureReflection() 공개 메소드

Draws a reflection of a texture
public DrawTextureReflection ( Vocaluxe.Lib.Draw.STexture Texture, Vocaluxe.Lib.Draw.SRectF rect, Vocaluxe.Lib.Draw.SColorF color, Vocaluxe.Lib.Draw.SRectF bounds, float space, float height ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture of which a reflection should be drawn
rect Vocaluxe.Lib.Draw.SRectF A SRectF struct containing the destination coordinates
color Vocaluxe.Lib.Draw.SColorF A SColorF struct containing a color which the texture will be colored in
bounds Vocaluxe.Lib.Draw.SRectF A SRectF struct containing which part of the texture should be drawn
space float The space between the texture and the reflection
height float The height of the reflection
리턴 void

GetScreenHeight() 공개 메소드

Gets the current viewport height
public GetScreenHeight ( ) : int
리턴 int

GetScreenWidth() 공개 메소드

Gets the current viewport width
public GetScreenWidth ( ) : int
리턴 int

GetTextBounds() 공개 메소드

Calculates the bounds for a CText object
public GetTextBounds ( Vocaluxe.Menu.CText text ) : RectangleF
text Vocaluxe.Menu.CText The CText object of which the bounds should be calculated for
리턴 System.Drawing.RectangleF

GetTextBounds() 공개 메소드

Calculates the bounds for a CText object
public GetTextBounds ( Vocaluxe.Menu.CText text, float Height ) : RectangleF
text Vocaluxe.Menu.CText The CText object of which the bounds should be calculated for
Height float The height of the CText object
리턴 System.Drawing.RectangleF

Init() 공개 메소드

Inits the Device
public Init ( ) : bool
리턴 bool

MainLoop() 공개 메소드

Starts the rendering
public MainLoop ( ) : void
리턴 void

MakeScreenShot() 공개 메소드

Creates a Screenshot of the current frame
public MakeScreenShot ( ) : void
리턴 void

OnLoad() 보호된 메소드

protected OnLoad ( EventArgs e ) : void
e System.EventArgs
리턴 void

OnResize() 보호된 메소드

protected OnResize ( EventArgs e ) : void
e System.EventArgs
리턴 void

QuequeTexture() 공개 메소드

public QuequeTexture ( int W, int H, byte &Data ) : Vocaluxe.Lib.Draw.STexture
W int
H int
Data byte
리턴 Vocaluxe.Lib.Draw.STexture

RemoveTexture() 공개 메소드

Removes a texture from the Vram
public RemoveTexture ( Vocaluxe.Lib.Draw.STexture &Texture ) : void
Texture Vocaluxe.Lib.Draw.STexture The texture to be removed
리턴 void

Reset() 공개 메소드

Resets the device, all objects in the Direct3D default pool get flushed and need to be recreated
public Reset ( ) : void
리턴 void

TextureCount() 공개 메소드

Gets the count of current textures
public TextureCount ( ) : int
리턴 int

Unload() 공개 메소드

Unloads all Textures and other objects used by Direct3D for rendering
public Unload ( ) : bool
리턴 bool

UpdateTexture() 공개 메소드

Updates the data of a texture
public UpdateTexture ( Vocaluxe.Lib.Draw.STexture &Texture, IntPtr Data ) : bool
Texture Vocaluxe.Lib.Draw.STexture The texture to update
Data System.IntPtr A Pointer containing the data of which the texture should be updated
리턴 bool

UpdateTexture() 공개 메소드

Updates the data of a texture
public UpdateTexture ( Vocaluxe.Lib.Draw.STexture &Texture, byte &Data ) : bool
Texture Vocaluxe.Lib.Draw.STexture The texture to update
Data byte A byte array containing the new texture's data
리턴 bool

WndProc() 보호된 메소드

protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message
리턴 void