net.dzzd.access
Interface IScene3DObject

All Superinterfaces:
IMonitoredSceneObject, IRender3DMode, IScene2DObject, ISceneObject
All Known Subinterfaces:
ICamera3D, ILight3D, IMesh3D, ISolidSphere3D

public interface IScene3DObject
extends IScene2DObject, IRender3DMode

Used for accessing a Scene3DObject.
- 3D scene objects are all positioned objects (visible or not) in the 3d scene.
eg.: Cameras,lights and meshes are all 3d scene object

- 3D scene objects can be hierarchically linked each other.

Positioning 3D scene objects in 3D scene:
each object is positioned in the 3D scene by a pivot,position and rotation vector relative to its parent space.

Since:
1.0
Version:
1.0, 01/01/04
Author:
Bruno Augier
See Also:
IPoint3D

Method Summary
 void addChild(IScene3DObject childToAdd)
          Add child to this object.
 IAxis3D getAxis3D()
          Gets object axis3D.
 IPoint3D getCenter()
          Gets the center (in object space) for this object.
 IScene3DObject getClone(boolean childrens)
          Gets a clone copy for this object.
 IScene3DObject getFirstChild()
          Gets the first child of this object.
 IScene3DObject getNextChild()
          Gets the next child for this parent object.
 IScene3DObject getParent()
          Gets parent object.
 IPoint3D getPivot()
          Gets the current pivot point (in object space) for this object.
 IPoint3D getPosition()
          Gets the current position => this object pivot 3d coordinates relative to this object parent space.
 IPoint3D getRotation()
          Gets the current rotation around pivot in the following order (rx,rz,ry).
 IScene3D getScene3D()
          Gets Scene3D owner, null if object has not been added to a Scene3D.
 IScene3DObjectAnimator getScene3DObjectAnimator()
          Gets Scene3DObjectAnimator.
 double getSphereBox()
          Gets object spherebox radius.
 IPoint3D getZoom()
          Gets the current zoom of this Scene3DObject.
 boolean isActive()
          Gets the active flag.
 boolean isSolid()
          Gets the solid flag.
 boolean isVisible()
          Gets the visible flag.
 void loopAtScene3DObjectAnimator(long loop)
          Call this Scene3DObjectAnimator loopAt method (also call on chidrens).
 void pauseScene3DObjectAnimator()
          Call this Scene3DObjectAnimator pause method (also call on chidrens).
 void playScene3DObjectAnimator()
          Call this Scene3DObjectAnimator play method (also call on chidrens).
 void removeChild(IScene3DObject childToRemove)
          Remove child from this object.
 void resumeScene3DObjectAnimator()
          Call this Scene3DObjectAnimator resume method (also call on chidrens).
 void setActive(boolean flag)
          Sets the active flag.
 IScene3DObject setAxis3DToWorld()
          Sets this Scene3DObject Axis3D to world space.
 void setParent(IScene3DObject parent)
          Sets parent object.
 void setPoint3DToWorld(IPoint3D point3d)
          Sets a Point3D given in this Scene3DObject space to world space.
 void setScene3DObjectAnimator(IScene3DObjectAnimator animator)
          Sets Scene3DObjectAnimator.
 void setSolid(boolean flag)
          Sets the solid flag.
 void setSphereBox(double radius)
          Sets object spherebox radius.
 void setVisible(boolean flag)
          Sets the visible flag.
 void startScene3DObjectAnimator()
          Call this Scene3DObjectAnimator start method (also call on chidrens).
 void startScene3DObjectAnimator(long start)
          Call this Scene3DObjectAnimator start method (also call on chidrens).
 void startScene3DObjectAnimator(long start, long end)
          Call this Scene3DObjectAnimator start method (also call on chidrens).
 void stopScene3DObjectAnimator()
          Call this Scene3DObjectAnimator stop method (also call on chidrens).
 void zoom(double x, double y, double z)
          Zoom that object and all chidrens object by x,y,z factor.
 
Methods inherited from interface net.dzzd.access.ISceneObject
build, clearProperties, copy, getBuild, getId, getName, getProperty, getScene, setBuild, setId, setName, setProperty
 
Methods inherited from interface net.dzzd.access.IMonitoredSceneObject
copy
 
Methods inherited from interface net.dzzd.access.IRender3DMode
disableRender3DMode, enableRender3DMode, getRender3DMode, getRender3DModeFlags, setRender3DModeFlags
 

Method Detail

getScene3D

public IScene3D getScene3D()
Gets Scene3D owner, null if object has not been added to a Scene3D.

Returns:
Scene3D owner, null if not in a Scene3D

getClone

public IScene3DObject getClone(boolean childrens)
Gets a clone copy for this object.

in case of IMesh3D the returned instance share material but do not share vertex and face (original vertex and face are duplicated)

Parameters:
childrens - true if chidren must be duplicated
Returns:
interface for a newly allocated instance copy of this object

getPosition

public IPoint3D getPosition()
Gets the current position => this object pivot 3d coordinates relative to this object parent space.

Returns:
interface of vector representing current position

getRotation

public IPoint3D getRotation()
Gets the current rotation around pivot in the following order (rx,rz,ry). component x of the returned vector is the rotation angle around the x axis.
component y of the returned vector is the rotation angle around the y axis.
component z of the returned vector is the rotation angle around the z axis.

Returns:
interface of vector representing current rotation

getPivot

public IPoint3D getPivot()
Gets the current pivot point (in object space) for this object.

Returns:
interface of vector representing current pivot point

getZoom

public IPoint3D getZoom()
Gets the current zoom of this Scene3DObject.

Returns:
interface of vector representing current zoom

zoom

public void zoom(double x,
                 double y,
                 double z)
Zoom that object and all chidrens object by x,y,z factor.

Parameters:
x - x zoom factor
y - y zoom factor
z - z zoom factor

getAxis3D

public IAxis3D getAxis3D()
Gets object axis3D.

Returns:
axis used by this object

getParent

public IScene3DObject getParent()
Gets parent object.

Returns:
parent object interface or null if no parent

setParent

public void setParent(IScene3DObject parent)
Sets parent object.

Parameters:
parent - new parent object for this object (pass null for no parent)

addChild

public void addChild(IScene3DObject childToAdd)
Add child to this object.

Parameters:
childToAdd - new child to add to this object

removeChild

public void removeChild(IScene3DObject childToRemove)
Remove child from this object.

Parameters:
childToRemove - child to remove from this object

getFirstChild

public IScene3DObject getFirstChild()
Gets the first child of this object.

Returns:
first chid object for this object or null if none

getNextChild

public IScene3DObject getNextChild()
Gets the next child for this parent object.

Returns:
next child for that object parent object related to this object

getSphereBox

public double getSphereBox()
Gets object spherebox radius.
return object sphere box radius relative to object center and expressed in scene unit.

Returns:
sphere box radius in scene units

setSphereBox

public void setSphereBox(double radius)
Sets object spherebox radius.
set object sphere box radius relative to object center and expressed in scene unit.

Parameters:
radius - new sphere box radius in scene units

getCenter

public IPoint3D getCenter()
Gets the center (in object space) for this object.

Returns:
this object center.

getScene3DObjectAnimator

public IScene3DObjectAnimator getScene3DObjectAnimator()
Gets Scene3DObjectAnimator.

Returns:
current Scene3DObjectAnimator or null if none.

setScene3DObjectAnimator

public void setScene3DObjectAnimator(IScene3DObjectAnimator animator)
Sets Scene3DObjectAnimator.

Parameters:
animator - Scene3DObjectAnimator to set for this Scene3DObject or null to remove/disable current Scene3DObjectAnimator.

playScene3DObjectAnimator

public void playScene3DObjectAnimator()
Call this Scene3DObjectAnimator play method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().play()


startScene3DObjectAnimator

public void startScene3DObjectAnimator()
Call this Scene3DObjectAnimator start method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().start()


startScene3DObjectAnimator

public void startScene3DObjectAnimator(long start)
Call this Scene3DObjectAnimator start method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().start()


startScene3DObjectAnimator

public void startScene3DObjectAnimator(long start,
                                       long end)
Call this Scene3DObjectAnimator start method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().start()


stopScene3DObjectAnimator

public void stopScene3DObjectAnimator()
Call this Scene3DObjectAnimator stop method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().stop()


pauseScene3DObjectAnimator

public void pauseScene3DObjectAnimator()
Call this Scene3DObjectAnimator pause method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().start()


resumeScene3DObjectAnimator

public void resumeScene3DObjectAnimator()
Call this Scene3DObjectAnimator resume method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().resume()


loopAtScene3DObjectAnimator

public void loopAtScene3DObjectAnimator(long loop)
Call this Scene3DObjectAnimator loopAt method (also call on chidrens).
To avoid animation of chidrens use : this.getScene3DObjectAnimator().resume()


isVisible

public boolean isVisible()
Gets the visible flag.
visible Scene3DObject are rendered on screen by Render3D.

set this flag to false to disable rendering of it and all its childrens..

Returns:
visible flag

isActive

public boolean isActive()
Gets the active flag.
active Scene3DObject are transformed in the different space by Scene3D world space,camera space.

set this flag to false to disable tranformation on it and all its childrens.

Returns:
active flag

isSolid

public boolean isSolid()
Gets the solid flag.
solid Scene3DObject are used to perform collision by physics engine as SolidSphere3D .

set this flag to false to disable collision on it and all its childrens.

Returns:
solid flag

setVisible

public void setVisible(boolean flag)
Sets the visible flag.
visible Scene3DObject are rendered on screen by Render3D.

set this flag to false to disable rendering of it and all its childrens..

Parameters:
flag - visible flag

setActive

public void setActive(boolean flag)
Sets the active flag.
active Scene3DObject are transformed in the different space by Scene3D world space,camera space.

set this flag to false to disable tranformation on it and all its childrens.

Parameters:
flag - active flag

setSolid

public void setSolid(boolean flag)
Sets the solid flag.
solid Scene3DObject are used to perform collision by physics engine as SolidSphere3D .

set this flag to false to disable collision on it and all its childrens.

Parameters:
flag - solid flag

setAxis3DToWorld

public IScene3DObject setAxis3DToWorld()
Sets this Scene3DObject Axis3D to world space.
Set this Scene3DObject Axis3D in world space using its parent position,pivot,rotation ant its own position,pivot and rotation.

Returns:
this Scene3DObject

setPoint3DToWorld

public void setPoint3DToWorld(IPoint3D point3d)
Sets a Point3D given in this Scene3DObject space to world space.
Convert the given Point3D from object space to world space

Parameters:
point3d - local Point3D to set to world space