C# Класс Vocaluxe.Lib.Draw.CDirect3D

Наследование: System.Windows.Forms.Form, IDraw
Показать файл Открыть проект

Открытые методы

Метод Описание
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