C# Class RenderingLibrary.Math.Geometry.LinePrimitive

Show file Open project: vchelaru/FlatRedBall Class Usage Examples

Public Properties

Property Type Description
Color Color
Depth float
Position Vector2

Public Methods

Method Description
Add ( Vector2 vector ) : void

Adds a vector to the primive live object.

Add ( float x, float y ) : void

Adds a vector to the primive live object.

ClearVectors ( ) : void

Clears all vectors from the primitive line object.

CreateCircle ( float radius, int sides ) : void

Creates a circle starting from 0, 0.

Insert ( int index, Vector2 vector ) : void

Insers a vector into the primitive line object.

LinePrimitive ( Microsoft.Xna.Framework.Graphics.Texture2D singlePixelTexture ) : System

Creates a new primitive line object.

Remove ( Vector2 vector ) : void

Removes a vector from the primitive line object.

RemoveAt ( int index ) : void

Removes a vector from the primitive line object.

Render ( SpriteRenderer spriteRenderer, SystemManagers managers ) : void

Renders the primtive line object.

Render ( SpriteRenderer spriteRenderer, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D textureToUse, float repetitionsPerLength ) : void
Replace ( int index, Vector2 whatToReplaceWith ) : void

Replaces a vector at the given index with the argument Vector2.

Shift ( float x, float y ) : void

Method Details

Add() public method

Adds a vector to the primive live object.
public Add ( Vector2 vector ) : void
vector Vector2 The vector to add.
return void

Add() public method

Adds a vector to the primive live object.
public Add ( float x, float y ) : void
x float The X position of the new point.
y float The Y position of the new point.
return void

ClearVectors() public method

Clears all vectors from the primitive line object.
public ClearVectors ( ) : void
return void

CreateCircle() public method

Creates a circle starting from 0, 0.
public CreateCircle ( float radius, int sides ) : void
radius float The radius (half the width) of the circle.
sides int The number of sides on the circle (the more the detailed).
return void

Insert() public method

Insers a vector into the primitive line object.
public Insert ( int index, Vector2 vector ) : void
index int The index to insert it at.
vector Vector2 The vector to insert.
return void

LinePrimitive() public method

Creates a new primitive line object.
public LinePrimitive ( Microsoft.Xna.Framework.Graphics.Texture2D singlePixelTexture ) : System
singlePixelTexture Microsoft.Xna.Framework.Graphics.Texture2D
return System

Remove() public method

Removes a vector from the primitive line object.
public Remove ( Vector2 vector ) : void
vector Vector2 The vector to remove.
return void

RemoveAt() public method

Removes a vector from the primitive line object.
public RemoveAt ( int index ) : void
index int The index of the vector to remove.
return void

Render() public method

Renders the primtive line object.
public Render ( SpriteRenderer spriteRenderer, SystemManagers managers ) : void
spriteRenderer RenderingLibrary.Graphics.SpriteRenderer The sprite renderer to use to render the primitive line object.
managers SystemManagers
return void

Render() public method

public Render ( SpriteRenderer spriteRenderer, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D textureToUse, float repetitionsPerLength ) : void
spriteRenderer RenderingLibrary.Graphics.SpriteRenderer
managers SystemManagers
textureToUse Microsoft.Xna.Framework.Graphics.Texture2D
repetitionsPerLength float
return void

Replace() public method

Replaces a vector at the given index with the argument Vector2.
public Replace ( int index, Vector2 whatToReplaceWith ) : void
index int What index to replace.
whatToReplaceWith Vector2 The new vector that will be placed at the given index
return void

Shift() public method

public Shift ( float x, float y ) : void
x float
y float
return void

Property Details

Color public property

Gets/sets the color of the primitive line object.
public Color Color
return Color

Depth public property

Gets/sets the render depth of the primitive line object (0 = front, 1 = back)
public float Depth
return float

Position public property

Gets/sets the position of the primitive line object.
public Vector2 Position
return Vector2