All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vlc.vrml.external.geometry.Collision

java.lang.Object
   |
   +----vlc.vrml.generic.geometry.VrmlObject
           |
           +----vlc.vrml.external.geometry.VrmlObject
                   |
                   +----vlc.vrml.external.geometry.ChildrenNode
                           |
                           +----vlc.vrml.external.geometry.GroupingNode
                                   |
                                   +----vlc.vrml.external.geometry.Collision

public class Collision
extends GroupingNode
JVerge

Version:
0.8 (beta 4) Copyright 1997 The Virtual Light Company under the GNU LGPL

The latest information and bugs in JVerge can be found at http://www.vlc.com.au/JVerge

For definition of the Anchor node please see the VRML 97 Anchor specification

Getting proxy nodes to work is a bit of a kludge. the proxy field is of the field access type. This means that it needs to be set at creation time. To overcome this problem there is a boolean flag to say whether a group node should be created for the proxy. Thanks to Gavin Bell for the cool DEF/USE trick in createVrmlFromString.

Author:
Justin Couch justin@vlc.com.au

Constructor Index

 o Collision()
Default Constructor.
 o Collision(Browser)
Default Constructor when you wish to supply your own Browser reference.
 o Collision(Browser, float[], float[], boolean)
Cosntructor to use when you want to supply non-default values of the bounding box center or size and to use your own Browser reference.
 o Collision(float[], float[], boolean)
Cosntructor to use when you want to supply non-default values of the bounding box center or size.

Method Index

 o addProxyChildren(ChildrenNode[])
Add the given nodes as proxies to the current node.
 o cleanup()
Call when about to remove the node from the scenegraph.
 o clone()
Make a clone of this object
 o get_collide()
Get the current setting of the collide field
 o get_collideTime()
Get the current setting of the collideTime eventOut
 o get_proxyChildren()
Get the currently set children being used in the proxy node.
 o has_proxy()
Test to determine if the proxy was created during the construction of this node.
 o removeProxyChildren(ChildrenNode[])
Remove the given nodes as proxies to the current node.
 o set_collide(boolean)
Set the collision field.
 o set_proxyChildren(VrmlObject[])
Set the given nodes as proxies to the current node.
 o writeToStream(int)
Prints the formatted contents of this node to the given stream.

Constructors

 o Collision
 public Collision()
Default Constructor. Creates a default Collision

 o Collision
 public Collision(Browser b)
Default Constructor when you wish to supply your own Browser reference. Creates a default Collision

 o Collision
 public Collision(float bboxCenter[],
                  float bboxSize[],
                  boolean useProxy)
Cosntructor to use when you want to supply non-default values of the bounding box center or size.

 o Collision
 public Collision(Browser b,
                  float bboxCenter[],
                  float bboxSize[],
                  boolean useProxy)
Cosntructor to use when you want to supply non-default values of the bounding box center or size and to use your own Browser reference.

Methods

 o cleanup
 public void cleanup()
Call when about to remove the node from the scenegraph.

Overrides:
cleanup in class VrmlObject
 o writeToStream
 public void writeToStream(int indent)
Prints the formatted contents of this node to the given stream.

Parameters:
indent - The number of spaces to indent this node in the string
Overrides:
writeToStream in class VrmlObject
 o addProxyChildren
 public void addProxyChildren(ChildrenNode child_list[])
Add the given nodes as proxies to the current node. This is only valid if you used a proxy in the construction of this this node. If you didn't then the method will just exit doing nothing.

Parameters:
children - This list of children to add as the proxy
 o removeProxyChildren
 public void removeProxyChildren(ChildrenNode child_list[])
Remove the given nodes as proxies to the current node. This is only valid if you used a proxy in the construction of this this node. If you didn't then the method will just exit doing nothing.

Parameters:
child_list - This list of children to remove from the proxy
 o set_proxyChildren
 public void set_proxyChildren(VrmlObject child_list[])
Set the given nodes as proxies to the current node. This is only valid if you used a proxy in the construction of this this node. If you didn't then the method will just exit doing nothing. This automatically deltes the old nodes and does cleanup.

Parameters:
children - This list of children to set as the proxy
 o get_proxyChildren
 public ChildrenNode[] get_proxyChildren()
Get the currently set children being used in the proxy node.

Returns:
the list of children currently used.
 o set_collide
 public void set_collide(boolean val)
Set the collision field.

Parameters:
val - true to enable collision detection, false to disable.
 o get_collide
 public boolean get_collide()
Get the current setting of the collide field

Returns:
The current setting
 o get_collideTime
 public double get_collideTime()
Get the current setting of the collideTime eventOut

Returns:
The last generated collideTime value.
 o has_proxy
 public boolean has_proxy()
Test to determine if the proxy was created during the construction of this node.

Returns:
True if the proxy node was created, false if not.
 o clone
 public Object clone()
Make a clone of this object

Returns:
A deep clone copy of this object
Overrides:
clone in class VrmlObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index