com.supermap.ar.areffect.preset
Class FlowElement
- java.lang.Object
-
- com.supermap.ar.areffect.preset.FlowElement
-
public class FlowElement extends java.lang.Object
Flow element The resource is a gltf model
-
-
Constructor Summary
Constructors Constructor and Description FlowElement()
The constructorFlowElement(java.lang.String id)
The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clear()
ARAnimationGroup
generateAnimation(AREffectElement e)
Generate animationARAnimationGroup
generateAnimation(int resourceId)
Generate flow elements based on the model's resource ID Note: Uniform cycle (or uniform speed) should be set before using this method.java.lang.String
getAnimationGroupName()
Gets the animation group name (actually the animation ID)java.util.List<AREffectElement>
getElementList()
Gets all elements of the class objectjava.util.List<Location>
getLocations()
get geographic locationAREffectElement
getParentElement()
Get the parent nodejava.util.List<Point3D>
getPoints()
get ARcoordinate pointsint
getRepeatCount()
Gets the number of cycles of the animation When -1, the animation loops indefinitelyjava.lang.Float
getSpacingDistance()
get Distance retur nnulljava.lang.Long
getUnifiedDuration()
get the uniform cyclefloat
getUnifiedSpeed()
get the uniform speed, m/svoid
initModelAnimation()
Load the model's own animation To be asynchronous Model Renderable is null,throw NullPointerExceptionvoid
setLocations(java.util.List<Location> locations)
set geographic locationvoid
setLocations(Location a, Location b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of abvoid
setParentNode(AREffectElement element)
Setting the parent nodevoid
setParentNode(EffectView arEffectView)
Setting the parent nodevoid
setPoints(java.util.List<Point3D> points)
set ARcoordinate pointsvoid
setPoints(Point3D a, Point3D b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of abvoid
setRepeatCount(int repeatCount)
Sets the number of cycles for the animation If the value is less than 0, go to -1 -1, the animation loop is infinitevoid
setRotationAngle(Vector v, float angle)
Set rotation posturevoid
setRotationDirection(boolean b)
The rotation direction true,clockwise false,counterclockwisevoid
setScaleFactor(float[] scaleFactor)
Set the proportionvoid
setScaleFactor(float x, float y, float z)
Set the proportionvoid
setUnifiedDuration(long duration)
set the uniform cycle m/svoid
setUnifiedSpeed(float speed)
set the uniform speed m/s
-
-
-
Constructor Detail
-
FlowElement
public FlowElement()
The constructor
-
FlowElement
public FlowElement(java.lang.String id)
The constructor- Parameters:
id
-
-
-
Method Detail
-
setParentNode
public void setParentNode(AREffectElement element)
Setting the parent node
-
setParentNode
public void setParentNode(EffectView arEffectView)
Setting the parent node
-
getSpacingDistance
public java.lang.Float getSpacingDistance()
get Distance retur nnull- Returns:
-
setPoints
public void setPoints(Point3D a, Point3D b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of ab- Parameters:
a
-b
-spacingDistance
-
-
setLocations
public void setLocations(Location a, Location b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of ab- Parameters:
a
-b
-spacingDistance
-
-
getLocations
public java.util.List<Location> getLocations()
get geographic location- Returns:
-
setLocations
public void setLocations(java.util.List<Location> locations)
set geographic location- Parameters:
locations
-
-
getPoints
public java.util.List<Point3D> getPoints()
get ARcoordinate points- Returns:
-
setPoints
public void setPoints(java.util.List<Point3D> points)
set ARcoordinate points- Parameters:
points
-
-
setUnifiedSpeed
public void setUnifiedSpeed(float speed)
set the uniform speed m/s- Parameters:
speed
-
-
getUnifiedSpeed
public float getUnifiedSpeed()
get the uniform speed, m/s- Returns:
-
setUnifiedDuration
public void setUnifiedDuration(long duration)
set the uniform cycle m/s- Parameters:
duration
-
-
getUnifiedDuration
public java.lang.Long getUnifiedDuration()
get the uniform cycle- Returns:
-
getRepeatCount
public int getRepeatCount()
Gets the number of cycles of the animation When -1, the animation loops indefinitely- Returns:
-
setRepeatCount
public void setRepeatCount(int repeatCount)
Sets the number of cycles for the animation If the value is less than 0, go to -1 -1, the animation loop is infinite- Parameters:
repeatCount
-
-
setRotationAngle
public void setRotationAngle(Vector v, float angle)
Set rotation posture- Parameters:
v
- The axis of rotationangle
- Rotation Angle
-
setScaleFactor
public void setScaleFactor(float x, float y, float z)
Set the proportion- Parameters:
x
- X Axial scalingy
- Y Axial scalingz
- Z Axial scaling
-
getAnimationGroupName
public java.lang.String getAnimationGroupName()
Gets the animation group name (actually the animation ID)- Returns:
-
getElementList
public java.util.List<AREffectElement> getElementList()
Gets all elements of the class object- Returns:
-
generateAnimation
public ARAnimationGroup generateAnimation(int resourceId)
Generate flow elements based on the model's resource ID Note: Uniform cycle (or uniform speed) should be set before using this method.- Parameters:
resourceId
- Model resource ID- Returns:
-
generateAnimation
public ARAnimationGroup generateAnimation(AREffectElement e)
Generate animation- Parameters:
e
-- Returns:
-
initModelAnimation
public void initModelAnimation()
Load the model's own animation To be asynchronous Model Renderable is null,throw NullPointerException
-
setRotationDirection
public void setRotationDirection(boolean b)
The rotation direction true,clockwise false,counterclockwise- Parameters:
b
-
-
clear
public void clear()
-
setScaleFactor
public void setScaleFactor(float[] scaleFactor)
Set the proportion- Parameters:
scaleFactor
- Xyz scale
-
getParentElement
public AREffectElement getParentElement()
Get the parent node- Returns:
-
-