com.supermap.ar.areffect
Class ARParticleElement
- java.lang.Object
-
- com.supermap.ar.areffect.AREffectElement
-
- com.supermap.ar.areffect.ARParticleElement
-
public class ARParticleElement extends AREffectElement
AR special effect object. Particle object model
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.ar.areffect.AREffectElement
AREffectElement.onRenderableLoadCompleteListener, AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType
-
-
Constructor Summary
Constructors Constructor and Description ARParticleElement(android.content.Context context)Construction method
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcreateDefaultAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)Create particle object default animationvoidcreateRotatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)Creates particle rotation animationvoidcreateTranslatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)Creates particle placement animationfloatgetDiffusivityX()Gets the diffusion coefficient of x-axisfloatgetDiffusivityY()Gets the diffusion coefficient of y-axisfloatgetDiffusivityZ()Gets the diffusion coefficient of z-axisvoidinit(int count)Initialize: generating particle collection Generating multiple AR special effect objects.booleanisGaussian()Whether the model will use Gaussian distribution to produce new positionbooleanisInitRandomDirection()The direction of a single particle is random when initializing itbooleanisRandomSize()Whether the size of the current model is randomvoidsetDiffusivityX(float diffusivityX)Sets the diffusion coefficient of x-axis Controls the diffusion extent of particle flow.voidsetDiffusivityY(float diffusivityY)Sets the diffusion coefficient of y-axis Controls the diffusion extent of particle flow.voidsetDiffusivityZ(float diffusivityZ)Sets the diffusion coefficient of z-axis Controls the diffusion extent of particle flow.voidsetGaussian(boolean isGaussian)Sets whether to use Gaussian distribution to produce new positionvoidsetInitRandomDirection(boolean isRandomDirection)Whether the direction of a single particle is random when initializing itvoidsetRandomSize(boolean isRandomSize)Sets whether you want the size of the current model is random-
Methods inherited from class com.supermap.ar.areffect.AREffectElement
addChild, addChilds, addOnTapListener, addOnTouchListener, clearAllChilds, destroy, getAllChilds, getChild, getChild, getChild, getChildCount, getElementType, getId, getLocalScaleFactor, getOnRenderableLoadCompleteListener, getPosition, getPositionType, getRelativePosition, getRotationAngle, getRotationAxis, getScaleFactor, getWGSCoordinates, isShadowCaster, isShadowReceiver, isTransformable, isVisible, removeChild, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, setElementName, setLocalScaleFactor, setOnRenderableLoadCompleteListener, setParentNode, setParentNode, setParentNode, setPosition, setRelativePosition, setRelativePosition, setRotateAlwaysToCamera, setRotateToCameraType, setRotationAngle, setScaleFactor, setShadowCaster, setShadowReceiver, setTransformable, setVisiblity, setWGSCoordinates
-
-
-
-
Constructor Detail
-
ARParticleElement
public ARParticleElement(android.content.Context context)
Construction method- Parameters:
context-
-
-
Method Detail
-
isRandomSize
public boolean isRandomSize()
Whether the size of the current model is random- Returns:
-
setRandomSize
public void setRandomSize(boolean isRandomSize)
Sets whether you want the size of the current model is random- Parameters:
isRandomSize-
-
setDiffusivityX
public void setDiffusivityX(float diffusivityX)
Sets the diffusion coefficient of x-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityX-
-
getDiffusivityX
public float getDiffusivityX()
Gets the diffusion coefficient of x-axis- Returns:
-
setDiffusivityY
public void setDiffusivityY(float diffusivityY)
Sets the diffusion coefficient of y-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityY-
-
getDiffusivityY
public float getDiffusivityY()
Gets the diffusion coefficient of y-axis- Returns:
-
setDiffusivityZ
public void setDiffusivityZ(float diffusivityZ)
Sets the diffusion coefficient of z-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityZ-
-
getDiffusivityZ
public float getDiffusivityZ()
Gets the diffusion coefficient of z-axis- Returns:
-
setGaussian
public void setGaussian(boolean isGaussian)
Sets whether to use Gaussian distribution to produce new position- Parameters:
isGaussian-
-
isGaussian
public boolean isGaussian()
Whether the model will use Gaussian distribution to produce new position- Returns:
-
setInitRandomDirection
public void setInitRandomDirection(boolean isRandomDirection)
Whether the direction of a single particle is random when initializing it- Parameters:
isRandomDirection-
-
isInitRandomDirection
public boolean isInitRandomDirection()
The direction of a single particle is random when initializing it- Returns:
-
init
public void init(int count)
Initialize: generating particle collection Generating multiple AR special effect objects. In the meanwhile, changes their positions and rotation angles randomly and saves to the sub object array- Parameters:
count- the number of particles to be generated
-
createDefaultAnimation
public void createDefaultAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Create particle object default animation- Parameters:
paramter- AR animation parameter.animationGroupName- the name of the animation group
-
createTranslatingAnimation
public void createTranslatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle placement animation- Parameters:
paramter- The animation parameter.animationGroupName- the name of the animation group
-
createRotatingAnimation
public void createRotatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle rotation animation- Parameters:
paramter- AR animation parameter.animationGroupName- the name of the animation group
-
-