com.hedgehog.geo
Class GeometricObject

java.lang.Object
  extended by com.hedgehog.HObject
      extended by com.hedgehog.geo.GeometricObject
All Implemented Interfaces:
ModelObject, java.lang.Comparable, java.util.Comparator
Direct Known Subclasses:
Curve3D, GeometricObject2D, GeometricObject3D, IndexObject2D, IndexObject3D, IndexPoint3D, Point2DMatrix, Point3DMatrix, Point3DSet, Surface3D

public abstract class GeometricObject
extends HObject
implements ModelObject

Title: GeometricObject - abstract base class of geometric object hierarchy.

Description: Abstract base object class of geometric objects, such as points and shapes.

Copyright: Copyright (c) Hedgehog Software 2007-2009.

Company: Hedgehog Software.

Since:
1.0
Version:
1.1

Field Summary
 
Fields inherited from class com.hedgehog.HObject
mID, mName
 
Constructor Summary
GeometricObject()
          Default constructor.
GeometricObject(GeometricObject object)
          Copy constructor.
GeometricObject(ID id)
          Constructor.
GeometricObject(java.lang.String name)
          Constructor.
GeometricObject(java.lang.String name, ID id)
          Constructor.
 
Method Summary
abstract  boolean is2D()
          Indicates that the dimensionality of this object is 2D.
abstract  boolean is3D()
          Indicates that the dimensionality of this object is 3D.
abstract  boolean isCurve()
          Tests whether or not this object is a curve.
abstract  boolean isGrid()
          Tests whether or not this object is a grid.
abstract  boolean isMesh()
          Tests whether or not this object is a mesh.
abstract  boolean isPoint()
          Tests whether or not this object is a point.
abstract  boolean isPointSet()
          Tests whether or not this object is a point set.
abstract  boolean isShape()
          Tests whether or not this object is a shape.
abstract  boolean isSurface()
          Tests whether or not this object is a surface.
 int objectDimension()
          Returns the object dimension of this object.
 
Methods inherited from class com.hedgehog.HObject
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hedgehog.model.ModelObject
childModelObjects, databaseInsertStatement, databaseUpdateStatement, fromDatabase, fromXMLNode, toX3DNode, toXMLNode
 

Constructor Detail

GeometricObject

public GeometricObject()
Default constructor. Calls default constructor of ModelObject.


GeometricObject

public GeometricObject(java.lang.String name)
Constructor. Sets the name of the object.

Parameters:
name - Object name.

GeometricObject

public GeometricObject(ID id)
Constructor. Sets the ID of the object.

Parameters:
id - Object ID.

GeometricObject

public GeometricObject(java.lang.String name,
                       ID id)
Constructor. Sets the name and ID of the object.

Parameters:
name - Object name.
id - Object ID.

GeometricObject

public GeometricObject(GeometricObject object)
Copy constructor.

Parameters:
object - Object to copy.
Method Detail

objectDimension

public int objectDimension()
Returns the object dimension of this object.

Returns:
Returns the value 2 if this object is a 2D object, 3 if a 3D object and -1 otherwise.

is2D

public abstract boolean is2D()
Indicates that the dimensionality of this object is 2D.

Returns:
Logical-true if this object is a 2D object.

is3D

public abstract boolean is3D()
Indicates that the dimensionality of this object is 3D.

Returns:
Logical-true if this object is a 3D object.

isPoint

public abstract boolean isPoint()
Tests whether or not this object is a point.

Returns:
Boolean to indicate whether this object is a point.

isPointSet

public abstract boolean isPointSet()
Tests whether or not this object is a point set.

Returns:
Boolean to indicate whether this object is a point set.

isCurve

public abstract boolean isCurve()
Tests whether or not this object is a curve.

Returns:
Boolean to indicate whether this object is a curve.

isGrid

public abstract boolean isGrid()
Tests whether or not this object is a grid.

Returns:
Boolean to indicate whether this object is a grid.

isMesh

public abstract boolean isMesh()
Tests whether or not this object is a mesh.

Returns:
Boolean to indicate whether this object is a mesh.

isSurface

public abstract boolean isSurface()
Tests whether or not this object is a surface.

Returns:
Boolean to indicate whether this object is a surface.

isShape

public abstract boolean isShape()
Tests whether or not this object is a shape.

Returns:
Boolean to indicate whether this object is a shape.