org.ogre4j
Class SimpleSpline

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.SimpleSpline
All Implemented Interfaces:
ISimpleSpline, INativeObject

public class SimpleSpline
extends NativeObject
implements ISimpleSpline


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  SimpleSpline()
           
  SimpleSpline(InstancePointer p)
          This constructor is public for internal useage only!
protected SimpleSpline(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  SimpleSpline(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void addPoint(IVector3 p)
          Adds a control point to the end of the spline.
 void clear()
          Clears all the points in the spline.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 int getNumPoints()
          Gets the number of control points in the spline.
 IVector3 getPoint(int index)
          Gets the detail of one of the control points of the spline.
 void interpolate(IVector3 returnValue, float t)
          Returns an interpolated point based on a parametric value over the whole series.
 void interpolate(IVector3 returnValue, long fromIndex, float t)
          Interpolates a single segment of the spline given a parametric value.
 void recalcTangents()
          Recalculates the tangents associated with this spline.
 void setAutoCalculate(boolean autoCalc)
          Tells the spline whether it should automatically calculate tangents on demand as points are added.
 void updatePoint(int index, IVector3 value)
          Updates a single point in the spline.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

SimpleSpline

public SimpleSpline(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


SimpleSpline

protected SimpleSpline(InstancePointer p,
                       boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


SimpleSpline

public SimpleSpline(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

SimpleSpline

public SimpleSpline()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

addPoint

public void addPoint(IVector3 p)
Adds a control point to the end of the spline.

Specified by:
addPoint in interface ISimpleSpline

getPoint

public IVector3 getPoint(int index)
Gets the detail of one of the control points of the spline.

Specified by:
getPoint in interface ISimpleSpline

getNumPoints

public int getNumPoints()
Gets the number of control points in the spline.

Specified by:
getNumPoints in interface ISimpleSpline

clear

public void clear()
Clears all the points in the spline.

Specified by:
clear in interface ISimpleSpline

updatePoint

public void updatePoint(int index,
                        IVector3 value)
Updates a single point in the spline.

Specified by:
updatePoint in interface ISimpleSpline

interpolate

public void interpolate(IVector3 returnValue,
                        float t)
Returns an interpolated point based on a parametric value over the whole series.

Specified by:
interpolate in interface ISimpleSpline

interpolate

public void interpolate(IVector3 returnValue,
                        long fromIndex,
                        float t)
Interpolates a single segment of the spline given a parametric value.

Specified by:
interpolate in interface ISimpleSpline

setAutoCalculate

public void setAutoCalculate(boolean autoCalc)
Tells the spline whether it should automatically calculate tangents on demand as points are added.

Specified by:
setAutoCalculate in interface ISimpleSpline

recalcTangents

public void recalcTangents()
Recalculates the tangents associated with this spline.

Specified by:
recalcTangents in interface ISimpleSpline


Copyright © 2007 netAllied GmbH. All Rights Reserved.