artisynth.core.mechmodels
Class PointList<P extends Point>
java.lang.Object
artisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.ComponentList<C>
artisynth.core.modelbase.RenderableComponentList<P>
artisynth.core.mechmodels.PointList<P>
- All Implemented Interfaces:
- ComponentChangeListener, ComponentListView<P>, CompositeComponent, IndexedComponentList, ModelComponent, MutableCompositeComponent<P>, ParameterizedClass, RenderableComponent, RenderableComponentListView<P>, ScalableUnits, TransformableGeometry, java.lang.Cloneable, java.lang.Iterable<P>, java.util.Collection<P>, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, ListView<P>, Scannable
public class PointList<P extends Point>
- extends RenderableComponentList<P>
- implements TransformableGeometry, ScalableUnits
Constructor Summary |
PointList(java.lang.Class<P> type)
|
PointList(java.lang.Class<P> type,
java.lang.String name)
|
PointList(java.lang.Class<P> type,
java.lang.String name,
java.lang.String shortName)
|
Methods inherited from class artisynth.core.modelbase.ComponentList |
add, add, addAll, addComponents, addFixed, addNumbered, clear, clone, componentChanged, contains, contains, containsAll, copy, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, hasParameterizedType, hierarchyContainsReferences, indexOf, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, retainAll, scan, setNavpanelDisplay, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMap |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 java.util.Collection |
equals, hashCode |
myProps
public static PropertyList myProps
PointList
public PointList(java.lang.Class<P> type)
PointList
public PointList(java.lang.Class<P> type,
java.lang.String name)
PointList
public PointList(java.lang.Class<P> type,
java.lang.String name,
java.lang.String shortName)
getAllPropertyInfo
public PropertyList getAllPropertyInfo()
- Description copied from interface:
HasProperties
- Returns a list giving static information about all properties exported by
this object.
- Specified by:
getAllPropertyInfo
in interface HasProperties
- Overrides:
getAllPropertyInfo
in class RenderableComponentList<P extends Point>
- Returns:
- static information for all exported properties
getPointDamping
public double getPointDamping()
setPointDamping
public void setPointDamping(double d)
getPointDampingMode
public PropertyMode getPointDampingMode()
setPointDampingMode
public void setPointDampingMode(PropertyMode mode)
createRenderProps
public RenderProps createRenderProps()
- Description copied from interface:
HasRenderProps
- Factory method to create render properties appropriate to this object.
- Specified by:
createRenderProps
in interface RenderableComponentListView<P extends Point>
- Specified by:
createRenderProps
in interface HasRenderProps
- Overrides:
createRenderProps
in class RenderableComponentList<P extends Point>
- Returns:
- new render properties for this object
prerender
public void prerender(RenderList list)
- Description copied from interface:
GLRenderable
- Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
- Specified by:
prerender
in interface GLRenderable
- Overrides:
prerender
in class RenderableComponentList<P extends Point>
rendersSubComponents
public boolean rendersSubComponents()
- Description copied from class:
RenderableComponentList
- Returns true if this list automatically renders any sub-components which
do not have their own render props.
- Overrides:
rendersSubComponents
in class RenderableComponentList<P extends Point>
render
public void render(GLRenderer renderer,
int flags)
- Description copied from interface:
GLRenderable
- Render this object using Open GL via the JOGL.
- Specified by:
render
in interface GLRenderable
- Overrides:
render
in class RenderableComponentList<P extends Point>
- Parameters:
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.
isSelectable
public boolean isSelectable()
- Returns true if this object is in fact selectable.
- Specified by:
isSelectable
in interface GLSelectable
- Overrides:
isSelectable
in class RenderableComponentList<P extends Point>
- Returns:
- true if this object is selectable
numSelectionQueriesNeeded
public int numSelectionQueriesNeeded()
- Description copied from interface:
GLSelectable
- If this selectable manages its own selection (by issuing selection
queries within its
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.
- Specified by:
numSelectionQueriesNeeded
in interface GLSelectable
- Overrides:
numSelectionQueriesNeeded
in class RenderableComponentList<P extends Point>
- Returns:
- maximum number of selection queries needed by this component, or
-1 if this component does not manage its own selection.
getSelection
public void getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
- Description copied from interface:
GLSelectable
- Append to
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by GLSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.
- Specified by:
getSelection
in interface GLSelectable
- Overrides:
getSelection
in class RenderableComponentList<P extends Point>
- Parameters:
list
- selected objects are appended to the end of this listqid
- index of the selection query
transformGeometry
public void transformGeometry(AffineTransform3dBase X)
- Description copied from interface:
TransformableGeometry
- Applies an affine transformation to the geometry of this object. This
method should be equivalent to
transformGeometry (X, this, 0);
- Specified by:
transformGeometry
in interface TransformableGeometry
- Parameters:
X
- affine transformation
transformGeometry
public void transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
- Description copied from interface:
TransformableGeometry
- Applies an affine transformation to the geometry of this object. If
recursively invoked within a component hierarchy, then
topComponent
should be the component for which the method
was initially invoked. The variable flags
provides
information about the context in which the transformation is
being applied. At present, the available flags are
TransformableGeometry.SIMULATING
and TransformableGeometry.ARTICULATED
.
- Specified by:
transformGeometry
in interface TransformableGeometry
- Parameters:
X
- affine transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.
scaleDistance
public void scaleDistance(double s)
- Description copied from interface:
ScalableUnits
- Scales all distance coordinates.
- Specified by:
scaleDistance
in interface ScalableUnits
- Parameters:
s
- scaling factor
scaleMass
public void scaleMass(double s)
- Description copied from interface:
ScalableUnits
- Scales all mass units.
- Specified by:
scaleMass
in interface ScalableUnits
- Parameters:
s
- scaling factor