Class VertsObject
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.scenegraph.SceneGraphNode
-
- gaia.cu9.ari.gaiaorbit.scenegraph.AbstractPositionEntity
-
- gaia.cu9.ari.gaiaorbit.scenegraph.VertsObject
-
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IGPUVertsRenderable
,IRenderable
,IStarContainer
,IPosition
- Direct Known Subclasses:
KeyframesPathObject
,Points
,Polyline
public class VertsObject extends AbstractPositionEntity implements IGPUVertsRenderable
Represents a vgroup of vertices which are sent to the GPU in a VBO
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.SceneGraphNode
SceneGraphNode.RenderGroup, SceneGraphNode.TLV3, SceneGraphNode.TLV3D
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
blend
protected boolean
closedLoop
Whether to close the polyline (connect end point to start point) or notprotected int
count
protected boolean
depth
protected boolean
inGpu
GPU rendering attributesprotected int
offset
Indicates the index of the mesh data in the rendererprotected PointCloudData
pointCloudData
protected float
primitiveSize
protected SceneGraphNode.RenderGroup
renderGroup
The render vgroup-
Fields inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.AbstractPositionEntity
cc, coordinates, copy, distToCamera, octant, octantId, pos, posSph, size, viewAngle, viewAngleApparent
-
Fields inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.SceneGraphNode
aux3d1, aux3d2, aux3d3, aux3d4, aux3f1, aux3f2, aux3f3, aux3f4, children, computed, ct, id, localTransform, name, namekey, numChildren, opacity, orientation, parent, parentkey, parentName, ROOT_NAME, sg, translation
-
-
Constructor Summary
Constructors Constructor Description VertsObject(SceneGraphNode.RenderGroup rg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoint(Vector3d point)
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()
com.badlogic.gdx.math.Matrix4
getLocalTransform()
int
getOffset()
SceneGraphNode
getParent()
PointCloudData
getPointCloud()
float
getPrimitiveSize()
boolean
inGpu()
boolean
isClosedLoop()
boolean
isEmpty()
boolean
isLine()
boolean
isPoint()
void
markForUpdate()
void
setBlend(boolean blend)
void
setClosedLoop(boolean closedLoop)
void
setCount(int count)
void
setDepth(boolean depth)
void
setInGpu(boolean inGpu)
void
setOffset(int offset)
void
setPointCloudData(PointCloudData pcd)
void
setPoints(double[] points)
Sets the 3D points of the line in the internal reference system.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 gaia.cu9.ari.gaiaorbit.scenegraph.AbstractPositionEntity
computeFuturePosition, doneLoading, getAbsoluteOrientation, getAbsolutePosition, getAbsolutePosition, getDelta, getDistToCamera, getHeight, getHeight, getHeight, getHeightScale, getNext, getOctant, getPos, getPosition, getPosition, getPosSph, getPredictedPosition, getRadius, getSimpleCopy, getSize, getViewAngle, getViewAngleApparent, isCopy, mustUpdatePosition, render2DLabel, render2DLabel, render2DLabel, render2DLabel, render3DLabel, setColor, setColor, setCoordinates, setSize, setSize, updateLocal
-
Methods inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.SceneGraphNode
add, add, addChild, addChild, addFocusableObjects, addNodes, addToIndex, addToRender, dispose, getAggregatedChildren, getChildByName, getChildByNameAndType, getChildrenByType, getComponentType, getCt, getFirstStarAncestor, getId, getLineCopy, getName, getNode, getNode, getOpacity, getOrientation, getRoot, getSceneGraphDepth, getStarCount, getVelocity, initialize, insert, isInRender, isInRender, isValidPosition, isVisibilityOn, mustAddToIndex, removeChild, removeFromIndex, removeFromRender, returnToPool, setComputedFlag, setCt, setCt, setId, setName, setNamekey, setParent, setParentkey, setUp, toString, update, update, updateNames, updateNamesRec
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gaia.cu9.ari.gaiaorbit.render.IRenderable
getComponentType, getDistToCamera, getOpacity
-
-
-
-
Field Detail
-
inGpu
protected boolean inGpu
GPU rendering attributes
-
offset
protected int offset
Indicates the index of the mesh data in the renderer
-
count
protected int count
-
blend
protected boolean blend
-
depth
protected boolean depth
-
renderGroup
protected SceneGraphNode.RenderGroup renderGroup
The render vgroup
-
closedLoop
protected boolean closedLoop
Whether to close the polyline (connect end point to start point) or not
-
primitiveSize
protected float primitiveSize
-
pointCloudData
protected PointCloudData pointCloudData
-
-
Constructor Detail
-
VertsObject
public VertsObject(SceneGraphNode.RenderGroup rg)
-
-
Method Detail
-
addToRenderLists
protected void addToRenderLists(ICamera camera)
Description copied from class:AbstractPositionEntity
Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.- Specified by:
addToRenderLists
in classAbstractPositionEntity
-
updateLocalValues
public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
Description copied from class:AbstractPositionEntity
This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.- Specified by:
updateLocalValues
in classAbstractPositionEntity
-
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
public void addPoint(Vector3d point)
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
public void setPointCloudData(PointCloudData pcd)
-
getPointCloud
public PointCloudData getPointCloud()
- Specified by:
getPointCloud
in interfaceIGPUVertsRenderable
-
getColor
public float[] getColor()
- Specified by:
getColor
in interfaceIGPUVertsRenderable
-
getAlpha
public double getAlpha()
- Specified by:
getAlpha
in interfaceIGPUVertsRenderable
- Overrides:
getAlpha
in classAbstractPositionEntity
-
getLocalTransform
public com.badlogic.gdx.math.Matrix4 getLocalTransform()
- Specified by:
getLocalTransform
in interfaceIGPUVertsRenderable
-
getParent
public SceneGraphNode 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)
-
setDepth
public void setDepth(boolean depth)
-
blend
public void blend()
- Specified by:
blend
in interfaceIGPUVertsRenderable
-
depth
public void depth()
- Specified by:
depth
in interfaceIGPUVertsRenderable
-
markForUpdate
public void markForUpdate()
- Specified by:
markForUpdate
in interfaceIGPUVertsRenderable
-
isLine
public boolean isLine()
-
isPoint
public boolean isPoint()
-
-