com.visioglobe.libVisioDevKit
Class VgSpatial

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgReferenced
      extended by com.visioglobe.libVisioDevKit.VgSpatial
Direct Known Subclasses:
VgIGeometry, VgLayer

public class VgSpatial
extends VgReferenced

This class gives access to the spatial aspect of an object (layer, point, etc). The spatial aspect controls the object's position in scene space. It also enables animation features on spatial objects.


Field Summary
 
Fields inherited from class com.visioglobe.libVisioDevKit.VgReferenced
swigCMemOwn, swigRefPtr
 
Constructor Summary
VgSpatial(long cPtr, boolean cMemoryOwn)
          Default constructor.
 
Method Summary
 void delete()
           
 VgAnimationRefPtr editAnimation(java.lang.String pName)
          Edits an animation from the spatial's animation map.
 VgAnimationConstRefPtr getAnimation(java.lang.String pName)
          Gets an animation from the spatial's animation map.
 void getAnimationNames(VgStringList pNameList)
          Gets the list of the stored animation names.
static long getCPtr(VgSpatial obj)
           
 VgOrientation getOrientation()
          Gets spatial's orientation.
 VgPosition getPosition()
          Gets spatial's position.
 void setAnimation(java.lang.String pAnimationName, VgAnimationRefPtr pAnimation)
           
 void setAnimation(VgAnimationRefPtr pAnimation)
          Deprecated.  
 void setLocalAnimation(VgAnimationRefPtr pAnimation)
          Deprecated.  
 void setOrientation(VgOrientation pOrientation)
          Sets the spatial orientation.
 void setPosition(VgPosition pPosition)
           
 void setPosition(VgPosition pPosition, boolean pHaveGeographicCoherence)
          Sets the spatial position.
 void setScale(float pScale)
          Sets the spatial's scale.
 
Methods inherited from class com.visioglobe.libVisioDevKit.VgReferenced
finalize, getCPtr, getNbReferences, ref, unref
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VgSpatial

public VgSpatial(long cPtr,
                 boolean cMemoryOwn)
Default constructor. This is protected since it is not possible to create a spatial directly. Instead, instantiate a spatial object (like point for example) and access it's spatial aspect.

Method Detail

getCPtr

public static long getCPtr(VgSpatial obj)

delete

public void delete()
Overrides:
delete in class VgReferenced

setAnimation

public void setAnimation(java.lang.String pAnimationName,
                         VgAnimationRefPtr pAnimation)

setAnimation

public void setAnimation(VgAnimationRefPtr pAnimation)
Deprecated. 

Sets an animation with an empty name on this spatial.

Parameters:
pAnimation - An animation to animate the spatial with.

setLocalAnimation

public void setLocalAnimation(VgAnimationRefPtr pAnimation)
Deprecated. 

Sets an animation on this spatial.

Parameters:
pAnimation - An animation to animate the spatial with.
Warning:
This method is kept for compatibility concerns. It will set all of the animation's channels to address the local animation node. The animation will be named "local". YOUR ANIMATION MAY BE MODIFIED BY THIS CALL.

getAnimation

public VgAnimationConstRefPtr getAnimation(java.lang.String pName)
Gets an animation from the spatial's animation map.

Parameters:
pName - The name of the animation to fetch.
Returns:
A const reference pointer that is valid if an animation exists by that name in this spatial.

editAnimation

public VgAnimationRefPtr editAnimation(java.lang.String pName)
Edits an animation from the spatial's animation map.

Parameters:
pName - The name of the animation to fetch.
Returns:
A reference pointer that is valid if an animation exists by that name in this spatial.

getAnimationNames

public void getAnimationNames(VgStringList pNameList)
Gets the list of the stored animation names.

Parameters:
pNameList - The list of strings to feed with the names.

getPosition

public VgPosition getPosition()
Gets spatial's position.

Returns:
The spatial's position.

setPosition

public void setPosition(VgPosition pPosition,
                        boolean pHaveGeographicCoherence)
Sets the spatial position.

Parameters:
pPosition - The position to put the spatial at.
pHaveGeographicCoherence - An optional parameter who by default is true. Is used to determine the geographic coherence of the spatial. If set to false, then the spatial will be coherent with the scene.

setPosition

public void setPosition(VgPosition pPosition)

getOrientation

public VgOrientation getOrientation()
Gets spatial's orientation.

Returns:
The spatial's orientation.

setOrientation

public void setOrientation(VgOrientation pOrientation)
Sets the spatial orientation.

Parameters:
pOrientation - The orientation to set on the spatial.

setScale

public void setScale(float pScale)
Sets the spatial's scale.

Parameters:
pScale - The scale to set on the spatial.

VisioDevKit 2.0, Visioglobe® 2013