All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class vlc.vrml.generic.geometry.Collision

java.lang.Object
   |
   +----vlc.vrml.generic.geometry.VrmlObject
           |
           +----vlc.vrml.generic.geometry.ChildrenNode
                   |
                   +----vlc.vrml.generic.geometry.GroupingNode
                           |
                           +----vlc.vrml.generic.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. While this is a problem with the internal and external versions, There is no such problem here because we are not creating any dynamic instances of VRML. However, to maintain consistency across all versions we keep the system.

Author:
Justin Couch justin@vlc.com.au

Constructor Index

 o Collision()
Default Constructor.
 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_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(ChildrenNode[])
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(float bboxCenter[],
                  float bboxSize[],
                  boolean useProxy)
Cosntructor to use when you want to supply non-default values of the bounding box center or size.

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)
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)
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(ChildrenNode 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 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 GroupingNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index