Package com.prineside.tdi2.shapes
Class MultiLine
java.lang.Object
com.prineside.tdi2.Shape
com.prineside.tdi2.shapes.MultiLine
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.prineside.tdi2.Shape
Shape.Factory<T extends Shape>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendNode
(float x, float y, float size, float color, boolean updatePath) void
void
draw
(com.badlogic.gdx.graphics.g2d.Batch batch) boolean
getFlip()
boolean
int
com.badlogic.gdx.graphics.g2d.TextureRegion
com.badlogic.gdx.graphics.Color
getTint()
void
reset()
Resets the object for reuse.void
setNodeColor
(int nodeIdx, float color) void
setNodePosition
(int idx, float x, float y) void
setNodes
(float[] nodes) x, y, size, colorvoid
setNodes
(float[] nodes, int nodeCount) void
setTextureRegion
(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, boolean mirror, boolean flip) void
setTint
(com.badlogic.gdx.graphics.Color color) void
setTint
(com.badlogic.gdx.graphics.Color color, float alpha) То же самое, только color.a будет перезаписанvoid
-
Method Details
-
setNodes
public void setNodes(float[] nodes, int nodeCount) -
setNodes
public void setNodes(float[] nodes) x, y, size, color -
getNodeCount
public int getNodeCount() -
getTextureRegion
public com.badlogic.gdx.graphics.g2d.TextureRegion getTextureRegion() -
getMirror
public boolean getMirror() -
getFlip
public boolean getFlip() -
setTextureRegion
public void setTextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion, boolean mirror, boolean flip) -
appendNode
public void appendNode(float x, float y, float size, float color, boolean updatePath) - Parameters:
updatePath
- true, чтобы путь был валидным сразу после добавления. В противном случае нужно вызвать updateAllNodes() после добавления всех нод
-
setNodePosition
public void setNodePosition(int idx, float x, float y) -
updateAllNodes
public void updateAllNodes() -
setNodeColor
public void setNodeColor(int nodeIdx, float color) -
setTint
public void setTint(com.badlogic.gdx.graphics.Color color) -
setTint
public void setTint(com.badlogic.gdx.graphics.Color color, float alpha) То же самое, только color.a будет перезаписан -
getTint
public com.badlogic.gdx.graphics.Color getTint() -
bakeVerticesColorIfNeeded
public void bakeVerticesColorIfNeeded() -
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch) -
reset
public void reset()Description copied from interface:com.badlogic.gdx.utils.Pool.Poolable
Resets the object for reuse. Object references should be nulled and fields may be set to default values.
-