Package gaiasky.scenegraph
Class VertsObject
java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.VertsObject
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IGPUVertsRenderable,IRenderable,IStarContainer,IVisibilitySwitch,IPosition
- Direct Known Subclasses:
KeyframesPathObject,Points,Polyline
Represents a group of vertices which are sent to the GPU in a VBO
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanWhether to close the polyline (connect end point to start point) or notprotected intprotected booleanprotected intprotected booleanGPU rendering attributesprotected intIndicates the index of the mesh data in the rendererprotected PointCloudDataprotected floatprotected SceneGraphRenderer.RenderGroupThe render groupFields inherited from class gaiasky.scenegraph.SceneGraphNode
aux3b1, aux3b2, aux3b3, aux3b4, aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, cc, children, computed, coordinates, copy, ct, distToCamera, id, lastStateChangeTimeMs, localTransform, namekey, names, numChildren, octant, octantId, opacity, orientation, parent, parentkey, parentName, pos, posSph, ROOT_NAME, sg, size, translation, viewAngle, viewAngleApparent, visible -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given point ot this datavoidaddPoints(double[] points)Adds the given points to this dataprotected voidaddToRenderLists(ICamera camera)Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.voidblend()voidclear()Clears the data from this object, both in RAM and VRAMvoiddepth()doublegetAlpha()float[]getColor()intgetCount()intcom.badlogic.gdx.math.Matrix4intfloatbooleaninGpu()booleanbooleanisEmpty()booleanisLine()booleanisPoint()voidvoidsetAdditive(boolean additive)voidsetBlend(boolean blend)voidsetClosedLoop(boolean closedLoop)voidsetCount(int count)voidsetDepth(boolean depth)voidsetGlPrimitive(int glPrimitive)voidsetInGpu(boolean inGpu)voidsetOffset(int offset)voidvoidsetPoints(double[] points)Sets the 3D points of the line in the internal reference system.voidvoidvoidvoidvoidsetPrimitiveSize(float lineWidth)Line width for lines, point size for pointsvoidupdateLocalValues(ITimeFrameProvider time, ICamera camera)This function updates all the local values before the localTransform is updated.Methods 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, getCt, getDelta, getDescription, getDistToCamera, getFirstStarAncestor, getHeight, getHeight, getHeight, getHeightScale, getId, getLineCopy, 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, initialize, insert, insert, isCopy, isInRender, isInRender, isValidPosition, isVisibilityOn, isVisible, isVisible, isVisible, isVisibleGroup, msSinceStateChange, mustAddToIndex, mustUpdatePosition, namesConcat, removeChild, removeFromIndex, removeFromRender, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, render3DLabel, returnToPool, setColor, setColor, setComputedFlag, setCoordinates, setCt, setCt, setDescription, setId, setLabelcolor, setLabelcolor, setName, setNamekey, setNames, setParent, setParentkey, setSize, setSize, setUp, setVisible, setVisible, setVisibleGroup, shouldRender, toString, update, update, updateLocal, updateNames, updateNamesRecMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gaiasky.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
Field Details
-
inGpu
protected boolean inGpuGPU rendering attributes -
offset
protected int offsetIndicates the index of the mesh data in the renderer -
count
protected int count -
blend
protected boolean blend -
depth
protected boolean depth -
additive
protected boolean additive -
glPrimitive
protected int glPrimitive -
renderGroup
The render group -
closedLoop
protected boolean closedLoopWhether to close the polyline (connect end point to start point) or not -
primitiveSize
protected float primitiveSize -
pointCloudData
-
-
Constructor Details
-
VertsObject
-
-
Method Details
-
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 classSceneGraphNode
-
updateLocalValues
Description copied from class:SceneGraphNodeThis function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValuesin classSceneGraphNode
-
setPoints
public void setPoints(double[] points)Sets the 3D points of the line in the internal reference system.- Parameters:
points- Vector with the points. If length is not multiple of 3, some points are discarded.
-
addPoints
public void addPoints(double[] points)Adds the given points to this data- Parameters:
points- The points to add
-
addPoint
Adds the given point ot this data- Parameters:
point- The point to add
-
isEmpty
public boolean isEmpty() -
clear
public void clear()Clears the data from this object, both in RAM and VRAM -
inGpu
public boolean inGpu()- Specified by:
inGpuin interfaceIGPUVertsRenderable
-
getOffset
public int getOffset()- Specified by:
getOffsetin interfaceIGPUVertsRenderable
-
getCount
public int getCount()- Specified by:
getCountin interfaceIGPUVertsRenderable
-
setPointCloudData
-
getPointCloud
- Specified by:
getPointCloudin interfaceIGPUVertsRenderable
-
getColor
public float[] getColor()- Specified by:
getColorin interfaceIGPUVertsRenderable- Overrides:
getColorin classSceneGraphNode
-
getAlpha
public double getAlpha()- Specified by:
getAlphain interfaceIGPUVertsRenderable- Overrides:
getAlphain classSceneGraphNode
-
getLocalTransform
public com.badlogic.gdx.math.Matrix4 getLocalTransform()- Specified by:
getLocalTransformin interfaceIGPUVertsRenderable
-
getParent
- Specified by:
getParentin interfaceIGPUVertsRenderable
-
setInGpu
public void setInGpu(boolean inGpu)- Specified by:
setInGpuin interfaceIGPUVertsRenderable
-
setOffset
public void setOffset(int offset)- Specified by:
setOffsetin interfaceIGPUVertsRenderable
-
setCount
public void setCount(int count)- Specified by:
setCountin interfaceIGPUVertsRenderable
-
setPrimitiveSize
public void setPrimitiveSize(float lineWidth)Description copied from interface:IGPUVertsRenderableLine width for lines, point size for points- Specified by:
setPrimitiveSizein interfaceIGPUVertsRenderable- Parameters:
lineWidth- The size
-
getPrimitiveSize
public float getPrimitiveSize()- Specified by:
getPrimitiveSizein interfaceIGPUVertsRenderable
-
isClosedLoop
public boolean isClosedLoop()- Specified by:
isClosedLoopin interfaceIGPUVertsRenderable
-
setClosedLoop
public void setClosedLoop(boolean closedLoop)- Specified by:
setClosedLoopin interfaceIGPUVertsRenderable
-
setBlend
public void setBlend(boolean blend) -
setAdditive
public void setAdditive(boolean additive) -
setDepth
public void setDepth(boolean depth) -
blend
public void blend()- Specified by:
blendin interfaceIGPUVertsRenderable
-
depth
public void depth()- Specified by:
depthin interfaceIGPUVertsRenderable
-
setGlPrimitive
public void setGlPrimitive(int glPrimitive) -
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitivein interfaceIGPUVertsRenderable
-
setPrimitiveLineStip
public void setPrimitiveLineStip() -
setPrimitiveLines
public void setPrimitiveLines() -
setPrimitiveLineLoop
public void setPrimitiveLineLoop() -
setPrimitivePoints
public void setPrimitivePoints() -
markForUpdate
public void markForUpdate()- Specified by:
markForUpdatein interfaceIGPUVertsRenderable
-
isLine
public boolean isLine() -
isPoint
public boolean isPoint()
-