com.metaio.sdk.jni
Class IBillboardGroup

java.lang.Object
  extended by com.metaio.sdk.jni.IBillboardGroup

public class IBillboardGroup
extends Object

Takes a set of billboards and reorders them in space. All billboards within the set are placed in space relative to each other. First the billboard distance to the global origin (3d camera position) is adjusted and then the billboards are arranged in clip space that they don't overlap anymore


Constructor Summary
IBillboardGroup(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 boolean addBillboard(IGeometry billboard)
           
 void delete()
           
static long getCPtr(IBillboardGroup obj)
           
 boolean removeBillboard(IGeometry billboard)
           
 void setBillboardExpandFactors(float expand, int strength)
          The billboard expand factors influence how much the billboards are expands relative to the center of the camera view.
 void setBillboardExpandFactors(float expand, int strength, int maxOverlap)
          The billboard expand factors influence how much the billboards are expands relative to the center of the camera view.
 void setDistanceWeightFactor(int weight)
          As higher the distance weight, as closer come billboards which are far away from the screen.
 void setViewCompressionValues(float nearValue, float farValue)
          All visible billboards are placed relative to each other away from the camera in the range [nearValue, farValue].
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IBillboardGroup

public IBillboardGroup(long cPtr,
                       boolean cMemoryOwn)
Method Detail

getCPtr

public static long getCPtr(IBillboardGroup obj)

delete

public void delete()

addBillboard

public boolean addBillboard(IGeometry billboard)
Parameters:
billboard - The billboard which is added bool True if the billboard could be added else false.

removeBillboard

public boolean removeBillboard(IGeometry billboard)
Parameters:
billboard - The billboard which is removed bool True if the billboard could be removed else false.

setViewCompressionValues

public void setViewCompressionValues(float nearValue,
                                     float farValue)
All visible billboards are placed relative to each other away from the camera in the range [nearValue, farValue]. The distance between each poi within this range is linear.

Parameters:
nearValue - Minimum poi to camera distance
farValue - Maximum poi to camera distance

setDistanceWeightFactor

public void setDistanceWeightFactor(int weight)
As higher the distance weight, as closer come billboards which are far away from the screen. The formula where the weight is used is pow( billboardDistance/maximumBillboardDistance, weight). Usually a value around 10 gives good results. default is 10.

Parameters:
weight - The distance weight factor

setBillboardExpandFactors

public void setBillboardExpandFactors(float expand,
                                      int strength,
                                      int maxOverlap)
The billboard expand factors influence how much the billboards are expands relative to the center of the camera view.

Parameters:
expand - A value which should range from [0...1]. It defines how much the billboards are expanded as they come closer to the center of the camera view. Fully expanded is 1 and 0 is no expansion at all. The default value is 0.8.
strength - The strength factor defines how much the billboards around the center are influenced by the expansion. A low value will allow billboards at the edges of the screen to expand a bit, whereas a high value will only allow the billboards wich are close to the camera view center to expand. The default value is 5.
maxOverlap - If the number of billboards exceeds this number, the distance between them decreases drastically. This prevents high stacks. The default value is 10.

setBillboardExpandFactors

public void setBillboardExpandFactors(float expand,
                                      int strength)
The billboard expand factors influence how much the billboards are expands relative to the center of the camera view.

Parameters:
expand - A value which should range from [0...1]. It defines how much the billboards are expanded as they come closer to the center of the camera view. Fully expanded is 1 and 0 is no expansion at all. The default value is 0.8.
strength - The strength factor defines how much the billboards around the center are influenced by the expansion. A low value will allow billboards at the edges of the screen to expand a bit, whereas a high value will only allow the billboards wich are close to the camera view center to expand. The default value is 5.
maxOverlap - If the number of billboards exceeds this number, the distance between them decreases drastically. This prevents high stacks. The default value is 10.