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
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
Whether to close the polyline (connect end point to start point) or notprotected int
protected boolean
protected int
protected boolean
GPU rendering attributesprotected int
Indicates the index of the mesh data in the rendererprotected PointCloudData
protected float
protected SceneGraphRenderer.RenderGroup
The 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, size, translation, viewAngle, viewAngleApparent, visible
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given point ot this datavoid
addPoints(double[] points)
Adds the given points to this dataprotected void
addToRenderLists(ICamera camera)
Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.void
blend()
void
clear()
Clears the data from this object, both in RAM and VRAMvoid
depth()
double
getAlpha()
float[]
getColor()
int
getCount()
int
com.badlogic.gdx.math.Matrix4
int
float
boolean
inGpu()
boolean
boolean
isEmpty()
boolean
isLine()
boolean
isPoint()
void
void
setAdditive(boolean additive)
void
setBlend(boolean blend)
void
setClosedLoop(boolean closedLoop)
void
setCount(int count)
void
setDepth(boolean depth)
void
setGlPrimitive(int glPrimitive)
void
setInGpu(boolean inGpu)
void
setOffset(int offset)
void
void
setPoints(double[] points)
Sets the 3D points of the line in the internal reference system.void
void
void
void
void
setPrimitiveSize(float lineWidth)
Line width for lines, point size for pointsvoid
updateLocalValues(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, 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, updateNamesRec
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:SceneGraphNode
Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Overrides:
addToRenderLists
in classSceneGraphNode
-
updateLocalValues
Description copied from class:SceneGraphNode
This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Overrides:
updateLocalValues
in 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:
inGpu
in interfaceIGPUVertsRenderable
-
getOffset
public int getOffset()- Specified by:
getOffset
in interfaceIGPUVertsRenderable
-
getCount
public int getCount()- Specified by:
getCount
in interfaceIGPUVertsRenderable
-
setPointCloudData
-
getPointCloud
- Specified by:
getPointCloud
in interfaceIGPUVertsRenderable
-
getColor
public float[] getColor()- Specified by:
getColor
in interfaceIGPUVertsRenderable
- Overrides:
getColor
in classSceneGraphNode
-
getAlpha
public double getAlpha()- Specified by:
getAlpha
in interfaceIGPUVertsRenderable
- Overrides:
getAlpha
in classSceneGraphNode
-
getLocalTransform
public com.badlogic.gdx.math.Matrix4 getLocalTransform()- Specified by:
getLocalTransform
in interfaceIGPUVertsRenderable
-
getParent
- Specified by:
getParent
in interfaceIGPUVertsRenderable
-
setInGpu
public void setInGpu(boolean inGpu)- Specified by:
setInGpu
in interfaceIGPUVertsRenderable
-
setOffset
public void setOffset(int offset)- Specified by:
setOffset
in interfaceIGPUVertsRenderable
-
setCount
public void setCount(int count)- Specified by:
setCount
in interfaceIGPUVertsRenderable
-
setPrimitiveSize
public void setPrimitiveSize(float lineWidth)Description copied from interface:IGPUVertsRenderable
Line width for lines, point size for points- Specified by:
setPrimitiveSize
in interfaceIGPUVertsRenderable
- Parameters:
lineWidth
- The size
-
getPrimitiveSize
public float getPrimitiveSize()- Specified by:
getPrimitiveSize
in interfaceIGPUVertsRenderable
-
isClosedLoop
public boolean isClosedLoop()- Specified by:
isClosedLoop
in interfaceIGPUVertsRenderable
-
setClosedLoop
public void setClosedLoop(boolean closedLoop)- Specified by:
setClosedLoop
in 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:
blend
in interfaceIGPUVertsRenderable
-
depth
public void depth()- Specified by:
depth
in interfaceIGPUVertsRenderable
-
setGlPrimitive
public void setGlPrimitive(int glPrimitive) -
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitive
in interfaceIGPUVertsRenderable
-
setPrimitiveLineStip
public void setPrimitiveLineStip() -
setPrimitiveLines
public void setPrimitiveLines() -
setPrimitiveLineLoop
public void setPrimitiveLineLoop() -
setPrimitivePoints
public void setPrimitivePoints() -
markForUpdate
public void markForUpdate()- Specified by:
markForUpdate
in interfaceIGPUVertsRenderable
-
isLine
public boolean isLine() -
isPoint
public boolean isPoint()
-