Package gaiasky.scenegraph
Class KeyframesPathObject
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.VertsObject
gaiasky.scenegraph.KeyframesPathObject
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,I3DTextRenderable,IGPUVertsRenderable,ILineRenderable,IPointRenderable,IRenderable,IStarContainer,IVisibilitySwitch,IPosition
public class KeyframesPathObject
extends VertsObject
implements I3DTextRenderable, ILineRenderable, IPointRenderable
-
Field Summary
FieldsModifier and TypeFieldDescriptionHighlighted keyframeHighlighted knotcom.badlogic.gdx.utils.Array<Keyframe>Keyframe objectsThe knots, or keyframe positionsKnots which are also seamscom.badlogic.gdx.utils.Array<VertsObject>Contains pairs of {direction, up} representing the orientation at each knotThe actual pathThe segments joining the knotsSelected keyframeSelected knotFields inherited from class gaiasky.scenegraph.VertsObject
additive, blend, closedLoop, depth, glPrimitive, pointCloudData, primitiveSize, renderGroupFields inherited from class gaiasky.scenegraph.SceneGraphNode
B31, B32, B33, B34, cc, children, computed, coordinates, copy, ct, D31, D32, D33, D34, distToCamera, F31, F32, F33, F34, forceLabel, id, labelcolor, lastStateChangeTimeMs, localizedNameIndex, localTransform, names, numChildren, octant, octantId, opacity, orientation, parent, parentName, pos, posSph, ROOT_NAME, size, translation, viewAngle, viewAngleApparent, visible -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidaddToRenderLists(ICamera camera) Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.protected booleancheckClickDistance(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize) voidclear()Clears the data from this object, both in RAM and VRAMvoidintfloatfloatGets the text opacityvoidgetTextPosition(ICamera cam, Vector3d out, Keyframe kf) voidvoidbooleanisEmpty()booleanisLabel()Is it a label or another kind of text?booleanbooleanmoveSelection(int screenX, int screenY, NaturalCamera camera) voidRefreshes the positions and orientations from the keyframesvoidRefreshes the orientations from the keyframesvoidrefreshSingleVector(VertsObject vo, Vector3d pos, Vector3d vec) voidrender(LineRenderSystem renderer, ICamera camera, float alpha) voidrender(PointRenderSystem renderer, ICamera camera, float alpha) voidrender(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera) Label renderbooleanTells whether the text must be rendered or not for this entityvoidbooleanrotateAroundCrs(double dx, double dy, NaturalCamera camera) booleanrotateAroundDir(double dx, double dy, NaturalCamera camera) booleanrotateAroundUp(double dx, double dy, NaturalCamera camera) select(int screenX, int screenY, int minPixDist, NaturalCamera camera) voidvoidsetKeyframes(com.badlogic.gdx.utils.Array<Keyframe> keyframes) voidsetPathKnots(double[] kts, double[] dirs, double[] ups, boolean[] seams) text()Returns the textfloat[]Returns an array with the text colour in the fashion [r, g, b, a]float[]textColour(Keyframe kf) voidExecutes the blending for the textvoidtextPosition(ICamera cam, Vector3d out) Sets the position of this text in the out vectorfloatReturns the text scale for the scale varying in the shaderfloattextSize()Returns the text sizevoidvoidunhighlight(Keyframe kf) voidunselect()voidupdate(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) Methods inherited from class gaiasky.scenegraph.VertsObject
addPoint, addPoints, blend, depth, getAlpha, getColor, getLocalTransform, getParent, getPointCloud, getPrimitiveSize, isClosedLoop, isLine, isPoint, markForUpdate, setAdditive, setBlend, setClosedLoop, setDepth, setGlPrimitive, setPointCloudData, setPoints, setPrimitiveLineLoop, setPrimitiveLines, setPrimitiveLineStip, setPrimitivePoints, setPrimitiveSize, updateLocalValuesMethods inherited from class gaiasky.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addName, addNodes, addToIndex, addToRender, computeFuturePosition, dispose, doneLoading, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getAggregatedChildren, getChildByName, getChildByNameAndType, getChildrenByComponentType, getChildrenByType, getComponentType, getCoordinates, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLabelcolor, getLineCopy, getLocalizedName, getName, getNames, getNext, getNode, getNode, getOctant, getOpacity, getOrientation, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getRoot, getSceneGraphDepth, getSimpleCopy, getSize, getStarCount, getUnrotatedPos, getVelocity, getViewAngle, getViewAngleApparent, getVisibilityOpacityFactor, hasCt, hasName, hasName, insert, isCopy, isForceLabel, isForceLabel, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, isVisibleGroup, msSinceStateChange, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setForcelabel, setForceLabel, setForceLabel, setId, setLabelcolor, setLabelcolor, setLabelcolor, setName, setName, setNames, setParent, setPos, setSize, setSize, setUp, setVisible, setVisible, setVisibleGroup, shouldRender, toString, update, updateLocal, updateLocalizedName, updateLocalizedNameRecursiveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gaiasky.render.IPointRenderable
blend, depthMethods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
Field Details
-
keyframes
Keyframe objects -
selected
Selected keyframe -
highlighted
Highlighted keyframe -
path
The actual path -
segments
The segments joining the knots -
knots
The knots, or keyframe positions -
knotsSeam
Knots which are also seams -
selectedKnot
Selected knot -
highlightedKnot
Highlighted knot -
orientations
Contains pairs of {direction, up} representing the orientation at each knot
-
-
Constructor Details
-
KeyframesPathObject
public KeyframesPathObject()
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initializein classSceneGraphNode
-
setKeyframes
-
refreshData
public void refreshData()Refreshes the positions and orientations from the keyframes -
refreshOrientations
public void refreshOrientations()Refreshes the orientations from the keyframes -
refreshSingleVector
-
resamplePath
public void resamplePath() -
setPathKnots
public void setPathKnots(double[] kts, double[] dirs, double[] ups, boolean[] seams) -
addKnot
-
update
public void update(ITimeFrameProvider time, Vector3b parentTransform, ICamera camera, float opacity) - Overrides:
updatein classSceneGraphNode
-
select
-
checkClickDistance
protected boolean checkClickDistance(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize) -
highlight
-
unhighlight
-
unhighlight
public void unhighlight() -
select
-
unselect
public void unselect() -
isSelected
public boolean isSelected() -
moveSelection
-
rotateAroundDir
-
rotateAroundUp
-
rotateAroundCrs
-
addToRenderLists
Description copied from class:SceneGraphNodeAdds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Overrides:
addToRenderListsin classVertsObject
-
clear
public void clear()Description copied from class:VertsObjectClears the data from this object, both in RAM and VRAM- Overrides:
clearin classVertsObject
-
isEmpty
public boolean isEmpty()- Overrides:
isEmptyin classVertsObject
-
clearOrientations
public void clearOrientations() -
renderText
public boolean renderText()Description copied from interface:I3DTextRenderableTells whether the text must be rendered or not for this entity- Specified by:
renderTextin interfaceI3DTextRenderable- Returns:
- True if text must be rendered
-
render
public void render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera) Label render- Specified by:
renderin interfaceI3DTextRenderable- Parameters:
batch- The sprite batchshader- The shadersys- The font render systemrc- The render contextcamera- The camera
-
textColour
public float[] textColour()Description copied from interface:I3DTextRenderableReturns an array with the text colour in the fashion [r, g, b, a]- Specified by:
textColourin interfaceI3DTextRenderable- Returns:
- Array with the colour
-
textColour
-
textSize
public float textSize()Description copied from interface:I3DTextRenderableReturns the text size- Specified by:
textSizein interfaceI3DTextRenderable- Returns:
- The text size
-
textScale
public float textScale()Description copied from interface:I3DTextRenderableReturns the text scale for the scale varying in the shader- Specified by:
textScalein interfaceI3DTextRenderable- Returns:
- The scale
-
textPosition
Description copied from interface:I3DTextRenderableSets the position of this text in the out vector- Specified by:
textPositionin interfaceI3DTextRenderableout- The out parameter with the result
-
getTextPosition
-
text
Description copied from interface:I3DTextRenderableReturns the text- Specified by:
textin interfaceI3DTextRenderable- Returns:
- The text
-
getText
-
textDepthBuffer
public void textDepthBuffer()Description copied from interface:I3DTextRenderableExecutes the blending for the text- Specified by:
textDepthBufferin interfaceI3DTextRenderable
-
isLabel
public boolean isLabel()Description copied from interface:I3DTextRenderableIs it a label or another kind of text?- Specified by:
isLabelin interfaceI3DTextRenderable- Returns:
- Whether this is a label
-
getTextOpacity
public float getTextOpacity()Description copied from interface:I3DTextRenderableGets the text opacity- Specified by:
getTextOpacityin interfaceI3DTextRenderable- Returns:
- Text opacity
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidthin interfaceILineRenderable
-
render
- Specified by:
renderin interfaceILineRenderable
-
render
- Specified by:
renderin interfaceIPointRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitivein interfaceIGPUVertsRenderable- Specified by:
getGlPrimitivein interfaceILineRenderable- Overrides:
getGlPrimitivein classVertsObject
-