artisynth.core.modelbase
Interface CompositeComponent

All Superinterfaces:
ComponentChangeListener, HasProperties, HierarchyNode, IndexedComponentList, ModelComponent, Scannable
All Known Subinterfaces:
MutableCompositeComponent<C>
All Known Implementing Classes:
ArticulatedBeamBody, ArticulatedDemo, ArticulatedFem, AttachDemo, AttachedBeamDemo, AuxMaterialBundle, AuxMaterialBundleList, AuxMaterialElementDescList, AxialSpringList, BlockTest, CollisionHandlerList, CollisionManager, ColoredFemBeam3d, CompliantConstraintDemo, ComponentList, CompositeComponentBase, ConstrainedParticle, CoupledSolveDemo, DoubleArmDemo, EditableMesh, EditablePolygonalMesh, FaceList, FallingSkull, Fem3dBlock, FemBeam3d, FemBeamMech, FemCollision, FemElement3dList, FemFrictionBeam, FemMesh, FemMeshBase, FemModel, FemModel3d, FemMuscleArm, FemMuscleDemo, FemMuscleModel, FemSingleTet, FemSkinDemo, FemSphere, FishDemo, ForceEffectorList, FrameSpringDemo, Hex3dBlock, HexBeam3d, HexFrame, HexIncompress, HexSheet, HydrostatDemo, HydrostatInvDemo, HydrostatModel, HydrostatTubeDemo, LaymanBowl, LaymanDemo, LaymanModel, LockingDemo, LumbarSpringDemo, MassSpringDemo, MechModel, MechModelCollide, MechModelDemo, MechSystemBase, MeshComponentList, MFreeAuxMaterialBundle, MFreeAuxMaterialBundleList, MFreeAuxMaterialElementDescList, MFreeElement3dList, MFreeModel3d, MFreeMuscleBundle, MFreeMuscleBundleList, MFreeMuscleElementDescList, MFreeMuscleModel, ModelBase, ModelBaseOld, MultiMuscleDemo, MultiPointSpringList, MultiSpringDemo, MuscleArm, MuscleBundle, MuscleBundleList, MuscleElementDescList, NetDemo, PlanarConnectorDemo, PlaneConstrainedFem, PointForceDemo, PointList, PointModel, PointModel1d, PointModel2d, PointModel3d, PointSpringList, PointToPointMuscle, PuddleDemo, PuppetDemo, QuadFishDemo, ReferenceList, RenderableComponentList, RenderableCompositeBase, RenderableModelBase, RenderableModelBaseOld, RigidBodyCollision, RigidBodyDemo, RigidCompositeBody, RigidTentacle, RobustCube, RollPitchJointDemo, RootModel, ScalableList, SegmentedPlaneDemo, SelfCollision, SheetDemo, SimpleCollide, SingleHex, SinglePyramid, SingleQuadhex, SingleQuadpyramid, SingleQuadtet, SingleQuadwedge, SingleTet, SingleWedge, SkinDemo, SkinMesh, SkinMeshBase, SkullParticles, SphericalJointDemo, SpongeDemo, SpongeModel, SpringMeshDemo, Tentacle, TetBeam3d, TrackingController, TransformableList, VertexList, ViscousBeam

public interface CompositeComponent
extends ModelComponent, ComponentChangeListener, IndexedComponentList

ModelComponent which contains sub-components.


Nested Class Summary
static class CompositeComponent.NavpanelDisplay
          Specifies how the a composite component should be displayed in a navigation panel.
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Method Summary
 void componentChanged(ComponentChangeEvent e)
          Notifies this composite component that a change has occured within one or more of its descendants.
 ModelComponent findComponent(java.lang.String path)
          Recursively searches for a sub-component of this ModelComponent, identified by a path of component names.
 ModelComponent get(int idx)
          Returns a specific sub-component of this ModelComponent, identified by index.
 ModelComponent get(java.lang.String nameOrNumber)
          Returns a specific sub-component of this ModelComponent, identified by name or string representation of the sub-component's number
 ModelComponent getByNumber(int num)
          Returns a specific sub-component of this ModelComponent, identified by number.
 CompositeComponent.NavpanelDisplay getNavpanelDisplay()
          Returns the DisplayMode for this component.
 int getNumberLimit()
          Returns the current upper limit for numbers among all sub-components in this composite.
 boolean hierarchyContainsReferences()
          Returns true if the component hierarchy formed by this component and its descendents is closed with respect to references.
 int indexOf(ModelComponent comp)
          Returns the index of a specified sub-component, or -1 if that the component is not present.
 int numComponents()
          Returns the number of components in this CompositeComponent.
 void updateNameMap(java.lang.String newName, java.lang.String oldName, ModelComponent comp)
           
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HasProperties
getAllPropertyInfo, getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 

Method Detail

get

ModelComponent get(java.lang.String nameOrNumber)
Returns a specific sub-component of this ModelComponent, identified by name or string representation of the sub-component's number

Parameters:
nameOrNumber - name or number of the sub-component
Returns:
named sub-component, or null if the component does not exist.

get

ModelComponent get(int idx)
Returns a specific sub-component of this ModelComponent, identified by index.

Specified by:
get in interface IndexedComponentList
Parameters:
idx - index of the sub-component
Returns:
indexed sub-component, or null if the component does not exist.

getByNumber

ModelComponent getByNumber(int num)
Returns a specific sub-component of this ModelComponent, identified by number.

Parameters:
num - number of the sub-component
Returns:
specified sub-component, or null if the component does not exist.

numComponents

int numComponents()
Returns the number of components in this CompositeComponent.

Specified by:
numComponents in interface IndexedComponentList
Returns:
number of sub-components

indexOf

int indexOf(ModelComponent comp)
Returns the index of a specified sub-component, or -1 if that the component is not present.

Returns:
indexed sub-component

findComponent

ModelComponent findComponent(java.lang.String path)
Recursively searches for a sub-component of this ModelComponent, identified by a path of component names.

Parameters:
path - path leading to the sub-component
Returns:
named sub-component, or null if the component does not exist.

getNumberLimit

int getNumberLimit()
Returns the current upper limit for numbers among all sub-components in this composite. This is one greater than the maximum sub-component number currently assigned. A value of 0 means that there are no sub-components. This method is useful for creating and sizing arrays whose contents are indexed by component numbers.

Returns:
upper limit for numbers among all sub-components

getNavpanelDisplay

CompositeComponent.NavpanelDisplay getNavpanelDisplay()
Returns the DisplayMode for this component. This specifies how the component should be displayed in a navigation panel.

Returns:
display mode for this component

componentChanged

void componentChanged(ComponentChangeEvent e)
Notifies this composite component that a change has occured within one or more of its descendants. When this occurs, the composite may need to invalidate cached information that depends on the descendants.

This method should propagate the notification up the component hierarchy by calling notifyParentOfChange.

Specified by:
componentChanged in interface ComponentChangeListener
Parameters:
e - optional argument giving specific information about the change

updateNameMap

void updateNameMap(java.lang.String newName,
                   java.lang.String oldName,
                   ModelComponent comp)

hierarchyContainsReferences

boolean hierarchyContainsReferences()
Returns true if the component hierarchy formed by this component and its descendents is closed with respect to references. In other words, all components referenced by components within the hierarchy are themselves components within the hierarchy.

In particular, this means that one does not need to search outside the hierarchy when looking for dependencies.

Returns:
true if this component's hierarchy is closed with respect to references.