dzzd
Interface IScene3DObject

All Superinterfaces:
ISceneObject
All Known Subinterfaces:
ICamera3D, ILight3D, IMesh3D

public interface IScene3DObject
extends ISceneObject

Interface used for accessing a 3D scene object.
- 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()
          Get object axis.
 IPoint3D getCenter()
           
 IScene3DObject getFirstChild()
          Return the first child of this object.
 IScene3DObject getInstanceCopy()
          Return an instance copy for this object.
 IScene3DObject getNextChild()
          Return the next child for this object parent related to this object.
 IScene3DObject getParent()
          Get parent object.
 IPoint3D getPivot()
          Get a vector representing the current pivot point (in object space) for this object.
 IPoint3D getPosition()
          Get a vector representing the current position relative to parent space.
 IPoint3D getRotation()
          Get a vector representing the current rotation around pivot in the following order (rx,rz,ry).
 double getSphereBox()
          Get object spherebox radius.
 ISolidSphere3DResult moveAsSolidSphere(double x, double y, double z, double radius, int maxLoop)
          Translate this object as a solid object in its parent object space by performing physic collisions.
 void removeChild(IScene3DObject childToRemove)
          Remove child from this object.
 void setParent(IScene3DObject parent)
          Set parent object.
 void setSphereBox(double radius)
          Set object spherebox radius.
 void zoom(double x, double y, double z)
          Zoom that object and all chidrens object by x,y,z factor.
 
Methods inherited from interface dzzd.ISceneObject
getId, getName, getRender3D, setId, setName
 

Method Detail

getInstanceCopy

public IScene3DObject getInstanceCopy()
Return an instance copy for this object.

the returned instance share material but use a different vertex array (original vertex are duplicated)

Returns:
interface for a newly allocated instance of this object
Since:
1.0

getPosition

public IPoint3D getPosition()
Get a vector representing the current position relative to parent space.

Returns:
interface of vector representing current position
Since:
1.0

getRotation

public IPoint3D getRotation()
Get a vector representing 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
Since:
1.0

getPivot

public IPoint3D getPivot()
Get a vector representing the current pivot point (in object space) for this object.

Returns:
interface of vector representing current pivot point
Since:
1.0

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
Since:
1.0

getAxis3D

public IAxis3D getAxis3D()
Get object axis.

Returns:
axis used by this object
Since:
1.0

getParent

public IScene3DObject getParent()
Get parent object.

Returns:
parent object interface or null if no parent
Since:
1.0

setParent

public void setParent(IScene3DObject parent)
Set parent object.

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

addChild

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

Parameters:
childToAdd - new child to add to this object
Since:
1.0

removeChild

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

Parameters:
childToRemove - child to remove from this object
Since:
1.0

getFirstChild

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

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

getNextChild

public IScene3DObject getNextChild()
Return the next child for this object parent related to this object.

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

getSphereBox

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

Returns:
sphere box radius in scene units
Since:
1.0

setSphereBox

public void setSphereBox(double radius)
Set 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
Since:
1.0

moveAsSolidSphere

public ISolidSphere3DResult moveAsSolidSphere(double x,
                                              double y,
                                              double z,
                                              double radius,
                                              int maxLoop)
Translate this object as a solid object in its parent object space by performing physic collisions.
collision are performed using sphereBox (relative to object center) and current renderer owner scene objects

Parameters:
x - x translation vector component
y - y translation vector component
z - z translation vector component
maxLoop - collision is a recursive process (rebounds) you can limit recursive depth with this parameter (you may use 4)
Returns:
interface to get informations about last performed collision
Since:
1.0

getCenter

public IPoint3D getCenter()