C# 클래스 Nez.LineRenderer

Renders a trail behind a moving object Adapted from http://www.paradeofrain.com/2010/01/28/update-on-continuous-2d-trails-in-xna/
상속: RenderableComponent
파일 보기 프로젝트 열기: prime31/Nez

공개 메소드들

메소드 설명
addPoint ( Vector2 point, float width = 20 ) : LineRenderer

adds a point to the line. If start/end widths are not set each point should have a width set here.

addPoint ( Vector2 point, float width, Microsoft.Xna.Framework.Color color ) : LineRenderer

adds a point to the line. If start/end widths are not set each point should have a width set here. If start/end colors are not set a color should be set as well.

addPoints ( Vector2 points ) : LineRenderer
calculateVertices ( ) : void
clearPoints ( ) : LineRenderer

clears all the points

clearStartEndColors ( ) : LineRenderer

clears the global start/end colors and goes back to using the individual point colors

clearStartEndWidths ( ) : LineRenderer

clears the global start/end widths and goes back to using the individual point widths

debugRender ( Graphics graphics ) : void
isVisibleFromCamera ( Camera camera ) : bool
onAddedToEntity ( ) : void
onEntityTransformChanged ( Transform comp ) : void
render ( Graphics graphics, Camera camera ) : void
setCutoffAngleForEndCapSubdivision ( float cutoffAngleForEndCapSubdivision ) : LineRenderer

sets the cutoff angle for use with EndCapType.JaggedWithCutoff. Any angles less than the cutoff angle will have jagged joints and all others will have standard.

setDegreesPerSubdivision ( float degreesPerSubdivision ) : LineRenderer

sets the number of degrees between each subdivision for use with EndCapType.Smooth

setEndCapType ( EndCapType endCapType ) : LineRenderer

sets the EndCapType used for rendering the line

setPoints ( Vector2 points ) : LineRenderer
setStartEndColors ( Microsoft.Xna.Framework.Color startColor, Microsoft.Xna.Framework.Color endColor ) : LineRenderer

sets the start and end color. If these are set, the individual point colors will be ignored.

setStartEndWidths ( float startWidth, float endWidth ) : LineRenderer

sets the start and end width. If these are set, the individual point widths will be ignored.

setTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : LineRenderer

sets the texture. Textures should be horizontally tileable. Pass in null to unset the texture.

setUseWorldSpace ( bool useWorldSpace ) : LineRenderer

sets whether local or world space will be used for rendering. Defaults to world space. Using local space will take into account all the Transform properties including scale/rotation/position.

updatePoint ( int index, Vector2 point ) : LineRenderer

updates a points properties

updatePoint ( int index, Vector2 point, float width ) : LineRenderer

updates a points properties

updatePoint ( int index, Vector2 point, float width, Microsoft.Xna.Framework.Color color ) : LineRenderer

updates a points properties

비공개 메소드들

메소드 설명
addFirstSegment ( Segment &segment, Segment &nextSegment, int &vertIndex ) : void
addSegment ( Segment &segment, int &vertIndex ) : void
addSingleSegmentLine ( Segment &segment, Microsoft.Xna.Framework.Color nextPointColor ) : void
addVert ( int index, Vector2 position, Vector2 texCoord, Microsoft.Xna.Framework.Color col ) : void
patchJaggedJoint ( Segment &segment, int &vertIndex ) : void
patchJoint ( Segment &segment, int &vertIndex ) : void
patchSmoothJoint ( Segment &segment, int &vertIndex ) : void
patchStandardJoint ( Segment &segment, int &vertIndex ) : void

메소드 상세

addPoint() 공개 메소드

adds a point to the line. If start/end widths are not set each point should have a width set here.
public addPoint ( Vector2 point, float width = 20 ) : LineRenderer
point Microsoft.Xna.Framework.Vector2 Point.
width float Width.
리턴 LineRenderer

addPoint() 공개 메소드

adds a point to the line. If start/end widths are not set each point should have a width set here. If start/end colors are not set a color should be set as well.
public addPoint ( Vector2 point, float width, Microsoft.Xna.Framework.Color color ) : LineRenderer
point Microsoft.Xna.Framework.Vector2 Point.
width float Width.
color Microsoft.Xna.Framework.Color Color.
리턴 LineRenderer

addPoints() 공개 메소드

public addPoints ( Vector2 points ) : LineRenderer
points Microsoft.Xna.Framework.Vector2
리턴 LineRenderer

calculateVertices() 공개 메소드

public calculateVertices ( ) : void
리턴 void

clearPoints() 공개 메소드

clears all the points
public clearPoints ( ) : LineRenderer
리턴 LineRenderer

clearStartEndColors() 공개 메소드

clears the global start/end colors and goes back to using the individual point colors
public clearStartEndColors ( ) : LineRenderer
리턴 LineRenderer

clearStartEndWidths() 공개 메소드

clears the global start/end widths and goes back to using the individual point widths
public clearStartEndWidths ( ) : LineRenderer
리턴 LineRenderer

debugRender() 공개 메소드

public debugRender ( Graphics graphics ) : void
graphics Graphics
리턴 void

isVisibleFromCamera() 공개 메소드

public isVisibleFromCamera ( Camera camera ) : bool
camera Camera
리턴 bool

onAddedToEntity() 공개 메소드

public onAddedToEntity ( ) : void
리턴 void

onEntityTransformChanged() 공개 메소드

public onEntityTransformChanged ( Transform comp ) : void
comp Transform
리턴 void

render() 공개 메소드

public render ( Graphics graphics, Camera camera ) : void
graphics Graphics
camera Camera
리턴 void

setCutoffAngleForEndCapSubdivision() 공개 메소드

sets the cutoff angle for use with EndCapType.JaggedWithCutoff. Any angles less than the cutoff angle will have jagged joints and all others will have standard.
public setCutoffAngleForEndCapSubdivision ( float cutoffAngleForEndCapSubdivision ) : LineRenderer
cutoffAngleForEndCapSubdivision float Cutoff angle for end cap subdivision.
리턴 LineRenderer

setDegreesPerSubdivision() 공개 메소드

sets the number of degrees between each subdivision for use with EndCapType.Smooth
public setDegreesPerSubdivision ( float degreesPerSubdivision ) : LineRenderer
degreesPerSubdivision float Degrees per subdivision.
리턴 LineRenderer

setEndCapType() 공개 메소드

sets the EndCapType used for rendering the line
public setEndCapType ( EndCapType endCapType ) : LineRenderer
endCapType EndCapType End cap type.
리턴 LineRenderer

setPoints() 공개 메소드

public setPoints ( Vector2 points ) : LineRenderer
points Microsoft.Xna.Framework.Vector2
리턴 LineRenderer

setStartEndColors() 공개 메소드

sets the start and end color. If these are set, the individual point colors will be ignored.
public setStartEndColors ( Microsoft.Xna.Framework.Color startColor, Microsoft.Xna.Framework.Color endColor ) : LineRenderer
startColor Microsoft.Xna.Framework.Color Start color.
endColor Microsoft.Xna.Framework.Color End color.
리턴 LineRenderer

setStartEndWidths() 공개 메소드

sets the start and end width. If these are set, the individual point widths will be ignored.
public setStartEndWidths ( float startWidth, float endWidth ) : LineRenderer
startWidth float Start width.
endWidth float End width.
리턴 LineRenderer

setTexture() 공개 메소드

sets the texture. Textures should be horizontally tileable. Pass in null to unset the texture.
public setTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : LineRenderer
texture Microsoft.Xna.Framework.Graphics.Texture2D Texture.
리턴 LineRenderer

setUseWorldSpace() 공개 메소드

sets whether local or world space will be used for rendering. Defaults to world space. Using local space will take into account all the Transform properties including scale/rotation/position.
public setUseWorldSpace ( bool useWorldSpace ) : LineRenderer
useWorldSpace bool If set to true use world space.
리턴 LineRenderer

updatePoint() 공개 메소드

updates a points properties
public updatePoint ( int index, Vector2 point ) : LineRenderer
index int Index.
point Microsoft.Xna.Framework.Vector2 Point.
리턴 LineRenderer

updatePoint() 공개 메소드

updates a points properties
public updatePoint ( int index, Vector2 point, float width ) : LineRenderer
index int Index.
point Microsoft.Xna.Framework.Vector2 Point.
width float Width.
리턴 LineRenderer

updatePoint() 공개 메소드

updates a points properties
public updatePoint ( int index, Vector2 point, float width, Microsoft.Xna.Framework.Color color ) : LineRenderer
index int Index.
point Microsoft.Xna.Framework.Vector2 Point.
width float Width.
color Microsoft.Xna.Framework.Color Color.
리턴 LineRenderer