@ThreadSafe public enum EntityClass extends java.lang.Enum<EntityClass>
Classes and subclasses of all model entities.
During topological analysis (Controller.analyze()),
every model entity is assigned an EntityClass according to its type
and location within the current Linkage topology.
Overall entity class hierarchy:
NODES
LINKS
GROUND_LINK
JOINTS
TREE_JOINTS
TREE_ROOT_JOINTS
CLOSURE_JOINTS
UNCONSTRAINED_ROOT_CLOSURE_JOINTS
GRAVITY_CONSTRAINED_ROOT_CLOSURE_JOINTS
LOCKED_ROOT_CLOSURE_JOINTS
WIDGETS
LINK_WIDGETS
USER_LINK_WIDGETS
LINK_AXES
LINK_LABELS
LINK_COMS
LINK_SUBFRAME_ROUTES
JOINT_WIDGETS
USER_JOINT_WIDGETS
MOBILITY_WIDGETS
MOBILITY_SURFACES
SLIDER_SURFACES
MOBILITY_SLIDERS
ROUTES
TREE_ROUTES
DEGENERATE_TREE_ROUTES
CLOSURE_ROUTES
DEGENERATE_CLOSURE_ROUTES
ROUTE_CONES
JOINT_AXES
JOINT_LABELS
GEOMETRIES
SUBFRAMES
LINK_SUBFRAMES
USER_LINK_SUBFRAMES
JOINT_SUBFRAMES
Copyright (C) 2008 Marsette A. Vona, III
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityClass.Visibility
Possible visibility states for a entity, in order from least to most
visible.
|
| Modifier and Type | Field and Description |
|---|---|
static EntityClass[] |
ALL
set of all
EntityClass of the indicated type |
java.util.List<EntityClass> |
children
the child entity classes
|
protected java.util.List<EntityClass> |
childrenImpl
mutable impl of
children |
private static java.lang.String |
cvsid |
static EntityClass[] |
DEF_HIDDEN
override for default
visibility EntityClass.Visibility.VISIBLE |
static EntityClass[] |
DEF_INDIVIDUALLY_PICKABLE
override for default
individuallyPickable false |
protected boolean |
individuallyPickable
Whether pick records are generated for entities of this
EntityClass. |
static int |
NUM
number of
EntityClass of the indicated type |
static int |
NUM_ROOTS
number of
EntityClass of the indicated type |
static int |
NUM_TERMINALS
number of
EntityClass of the indicated type |
EntityClass |
parent
the parent entity class, null if none
|
protected boolean |
pickable
Current pickability of this
EntityClass |
static EntityClass[] |
ROOTS
set of all
EntityClass of the indicated type |
static EntityClass[] |
TERMINALS
set of all
EntityClass of the indicated type |
protected EntityClass.Visibility |
visibility
current visibility state of this
EntityClass |
static java.lang.String |
WP_ENTITY_CLASS
Widget property caching most specific EntityClass |
| Modifier and Type | Method and Description |
|---|---|
void |
dump()
dump(String, PrintStream) to System.out, no prefix |
void |
dump(java.io.PrintStream s)
dump(String, PrintStream), no prefix |
void |
dump(java.lang.String prefix,
java.io.PrintStream s)
dump settings of this
EntityClass |
static void |
dumpAll()
dumpAll(PrintStream) to System.out |
static void |
dumpAll(java.io.PrintStream s)
|
void |
dumpRecursively()
dumpRecursively(String, PrintStream) to System.out, no prefix |
void |
dumpRecursively(java.io.PrintStream s)
dumpRecursively(String, PrintStream), no prefix |
void |
dumpRecursively(java.lang.String prefix,
java.io.PrintStream s)
Recursively
dump(String, PrintStream) this class and its
subclasses. |
boolean |
getIndividuallyPickable()
|
static EntityClass |
getMostSpecificClass(javax.media.j3d.Geometry g)
get the most specific
EntityClass of g |
static EntityClass |
getMostSpecificClass(LinkageNode.SubFrame s)
get the most specific
EntityClass of s |
static EntityClass |
getMostSpecificClass(LinkageNode n)
get the most specific entity class for node n
|
static EntityClass |
getMostSpecificClass(LinkageNode n,
java.lang.String frame)
|
static EntityClass |
getMostSpecificClass(java.lang.Object o)
getMostSpecificClass(LinkageNode), getMostSpecificClass(msim.model.LinkageNode.SubFrame), getMostSpecificClass(Widget), or getMostSpecificClass(Geometry), depending on the type of o. |
static EntityClass |
getMostSpecificClass(vona.j3d.Widget w)
Covers
getMostSpecificClass(Widget, LinkageNode), gets the
node from the LinkageNode.WP_NODE property. |
static EntityClass |
getMostSpecificClass(vona.j3d.Widget w,
LinkageNode n)
Get the most specific entity class for
Widget w
in node n. |
boolean |
getPickable()
get
pickable |
EntityClass.Visibility |
getVisibility()
get
visibility |
boolean |
hasSubclass(EntityClass c)
check if c is this class or a subclass
|
boolean |
isIndividuallyPickable()
Checks if this or any ancestor classes is
individuallyPickable. |
boolean |
isInstance(LinkageNode n)
Check if the most specific
EntityClass of n is this
class or a subclass. |
boolean |
isInstance(java.lang.Object o)
Check if the most specific
EntityClass of o is this
class or a subclass. |
boolean |
isInstance(vona.j3d.Widget w)
Check if the most specific
EntityClass of w in its
LinkageNode.WP_NODE is this class or a subclass. |
boolean |
isInstance(vona.j3d.Widget w,
LinkageNode n)
Check if the most specific
EntityClass of w in n
is this class or a subclass. |
boolean |
isMasked()
Checks if this or any ancestor classes is
EntityClass.Visibility.MASKED. |
boolean |
isPickable()
Checks if this and all ancestor classes is
pickable. |
boolean |
isVisible()
Checks if neither this nor any ancestor classes is
EntityClass.Visibility.HIDDEN. |
void |
setIndividuallyPickable(boolean p)
|
void |
setPickable(boolean p)
set
pickable |
void |
setVisibility(EntityClass.Visibility v)
set
visibility |
static EntityClass |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EntityClass[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EntityClass NODES
public static final EntityClass WIDGETS
public static final EntityClass GEOMETRIES
public static final EntityClass SUBFRAMES
public static final EntityClass LINKS
public static final EntityClass GROUND_LINK
public static final EntityClass JOINTS
public static final EntityClass TREE_JOINTS
public static final EntityClass TREE_ROOT_JOINTS
public static final EntityClass CLOSURE_JOINTS
public static final EntityClass UNCONSTRAINED_ROOT_CLOSURE_JOINTS
public static final EntityClass GRAVITY_CONSTRAINED_ROOT_CLOSURE_JOINTS
public static final EntityClass LOCKED_ROOT_CLOSURE_JOINTS
public static final EntityClass LINK_WIDGETS
public static final EntityClass JOINT_WIDGETS
public static final EntityClass USER_LINK_WIDGETS
public static final EntityClass USER_JOINT_WIDGETS
public static final EntityClass MOBILITY_WIDGETS
public static final EntityClass MOBILITY_SURFACES
public static final EntityClass MOBILITY_SLIDERS
public static final EntityClass SLIDER_SURFACES
public static final EntityClass ROUTES
public static final EntityClass TREE_ROUTES
public static final EntityClass CLOSURE_ROUTES
public static final EntityClass DEGENERATE_TREE_ROUTES
public static final EntityClass DEGENERATE_CLOSURE_ROUTES
public static final EntityClass ROUTE_CONES
public static final EntityClass LINK_AXES
public static final EntityClass JOINT_AXES
public static final EntityClass LINK_LABELS
public static final EntityClass JOINT_LABELS
public static final EntityClass LINK_COMS
public static final EntityClass LINK_SUBFRAME_ROUTES
public static final EntityClass LINK_SUBFRAMES
public static final EntityClass USER_LINK_SUBFRAMES
public static final EntityClass JOINT_SUBFRAMES
private static final java.lang.String cvsid
public static final java.lang.String WP_ENTITY_CLASS
Widget property caching most specific EntityClasspublic final EntityClass parent
protected final java.util.List<EntityClass> childrenImpl
childrenpublic final java.util.List<EntityClass> children
protected EntityClass.Visibility visibility
EntityClassprotected boolean pickable
Current pickability of this EntityClass
An entity's class and all super-classes, plus classes and
superclasses of containing entities, must be pickable in order to
to be considered for picking at all. However, pick records are only
generated for entities whose class or any superclass thereof is
individuallyPickable.
Initially, all classes are pickable, but only DEF_INDIVIDUALLY_PICKABLE are individuallyPickable.
protected boolean individuallyPickable
Whether pick records are generated for entities of this EntityClass.
See pickable.
public static final EntityClass[] DEF_HIDDEN
visibility EntityClass.Visibility.VISIBLEpublic static final EntityClass[] DEF_INDIVIDUALLY_PICKABLE
individuallyPickable falsepublic static final EntityClass[] ALL
EntityClass of the indicated typepublic static final EntityClass[] ROOTS
EntityClass of the indicated typepublic static final EntityClass[] TERMINALS
EntityClass of the indicated typepublic static final int NUM
EntityClass of the indicated typepublic static final int NUM_ROOTS
EntityClass of the indicated typepublic static final int NUM_TERMINALS
EntityClass of the indicated typepublic static EntityClass[] values()
for (EntityClass c : EntityClass.values()) System.out.println(c);
public static EntityClass valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic void setVisibility(EntityClass.Visibility v)
visibilitypublic EntityClass.Visibility getVisibility()
visibilitypublic boolean isVisible()
Checks if neither this nor any ancestor classes is EntityClass.Visibility.HIDDEN.
public boolean isMasked()
Checks if this or any ancestor classes is EntityClass.Visibility.MASKED.
public void setPickable(boolean p)
pickablepublic boolean getPickable()
pickablepublic boolean isPickable()
Checks if this and all ancestor classes is pickable.
public void setIndividuallyPickable(boolean p)
public boolean getIndividuallyPickable()
public boolean isIndividuallyPickable()
Checks if this or any ancestor classes is individuallyPickable.
public static EntityClass getMostSpecificClass(LinkageNode n)
public static EntityClass getMostSpecificClass(vona.j3d.Widget w, LinkageNode n)
Get the most specific entity class for Widget w
in node n.
public static EntityClass getMostSpecificClass(vona.j3d.Widget w)
Covers getMostSpecificClass(Widget, LinkageNode), gets the
node from the LinkageNode.WP_NODE property.
public static EntityClass getMostSpecificClass(javax.media.j3d.Geometry g)
EntityClass of gpublic static EntityClass getMostSpecificClass(LinkageNode.SubFrame s)
EntityClass of spublic static EntityClass getMostSpecificClass(LinkageNode n, java.lang.String frame)
public static EntityClass getMostSpecificClass(java.lang.Object o)
getMostSpecificClass(LinkageNode), getMostSpecificClass(msim.model.LinkageNode.SubFrame), getMostSpecificClass(Widget), or getMostSpecificClass(Geometry), depending on the type of o.
public boolean hasSubclass(EntityClass c)
public boolean isInstance(LinkageNode n)
Check if the most specific EntityClass of n is this
class or a subclass.
public boolean isInstance(vona.j3d.Widget w,
LinkageNode n)
Check if the most specific EntityClass of w in n
is this class or a subclass.
public boolean isInstance(vona.j3d.Widget w)
Check if the most specific EntityClass of w in its
LinkageNode.WP_NODE is this class or a subclass.
public boolean isInstance(java.lang.Object o)
Check if the most specific EntityClass of o is this
class or a subclass.
public void dump(java.lang.String prefix,
java.io.PrintStream s)
EntityClasspublic void dump(java.io.PrintStream s)
dump(String, PrintStream), no prefixpublic void dump()
dump(String, PrintStream) to System.out, no prefixpublic void dumpRecursively(java.lang.String prefix,
java.io.PrintStream s)
Recursively dump(String, PrintStream) this class and its
subclasses.
public void dumpRecursively(java.io.PrintStream s)
dumpRecursively(String, PrintStream), no prefixpublic void dumpRecursively()
dumpRecursively(String, PrintStream) to System.out, no prefixpublic static void dumpAll(java.io.PrintStream s)
public static void dumpAll()
dumpAll(PrintStream) to System.out