maspack.render
Interface GLSelectable

All Superinterfaces:
GLRenderable
All Known Subinterfaces:
Dragger3d, DrawTool, Renderable, RenderableComponent, RenderableLine, RenderablePoint
All Known Implementing Classes:
ArticulatedBeamBody, ArticulatedDemo, ArticulatedFem, AttachDemo, AttachedBeamDemo, AuxMaterialBundle, AuxMaterialBundleList, AuxMaterialElementDesc, AuxMaterialElementDescList, AxialSpring, AxialSpringList, BeamBody, BlockTest, CollisionHandler, CollisionHandlerGeneric, CollisionHandlerList, CollisionHandlerOld, CollisionManager, ColorBar, ColoredFemBeam3d, CompliantConstraintDemo, ConstrainedParticle, ConstrainedTranslator3d, ConstrainerBase, ControllerBase, ControllerMonitorBase, ConvexPolygon2d, CoupledSolveDemo, CutPlaneProbe, DeformableBody, DoubleArmDemo, Dragger3dBase, DrawToolBase, DynamicMechComponentBase, EditableMesh, EditablePolygonalMesh, Elaston, FaceComponent, FaceList, FallingSkull, Fem3dBlock, FemBeam3d, FemBeamMech, FemCollision, FemDisplayProbe, FemElement, FemElement3d, FemElement3dList, FemFrictionBeam, FemMarker, FemMesh, FemMeshBase, FemModel, FemModel3d, FemMuscleArm, FemMuscleDemo, FemMuscleModel, FemNode, FemNode3d, FemSingleTet, FemSkinDemo, FemSphere, FishDemo, FixedMesh, Frame, FrameMarker, FrameSpring, FrameSpringDemo, FreehandTool, FullPlanarJoint, GLRenderableHolder, Hex3dBlock, HexBeam3d, HexElement, HexFrame, HexIncompress, HexSheet, HudPrintStream, HydrostatDemo, HydrostatInvDemo, HydrostatModel, HydrostatTubeDemo, ImagePlaneProbe, Jack3d, JointBase, LaymanBowl, LaymanDemo, LaymanModel, LightComponent, LockingDemo, LumbarSpringDemo, Marker, MarkerPlanarConnector, MassSpringDemo, MechModel, MechModelCollide, MechModelDemo, MechSystemBase, MeshBase, MeshComponent, MeshComponentList, MeshIntersectingProbe, MeshThicken.Region, MFreeAuxMaterialBundle, MFreeAuxMaterialBundleList, MFreeAuxMaterialElementDesc, MFreeAuxMaterialElementDescList, MFreeElement3d, MFreeElement3dList, MFreeHermiteNode3d, MFreeModel3d, MFreeMuscleBundle, MFreeMuscleBundleList, MFreeMuscleElementDesc, MFreeMuscleElementDescList, MFreeMuscleModel, MFreeNode3d, MonitorBase, MultiMuscleDemo, MultiPointMuscle, MultiPointMuscleVia, MultiPointSpring, MultiPointSpringList, MultiSpringDemo, Muscle, MuscleArm, MuscleBundle, MuscleBundleList, MuscleElementDesc, MuscleElementDescList, NetDemo, NURBSCurve2d, NURBSCurve3d, NURBSCurveBase, NURBSMesh, NURBSObject, NURBSSurface, Particle, ParticleConstraint, ParticleMeshConstraint, ParticlePlaneConstraint, PlanarConnector, PlanarConnectorDemo, PlanarPoint, PlaneConstrainedFem, Point, PointForce, PointForceDemo, PointList, PointMesh, PointModel, PointModel1d, PointModel2d, PointModel3d, PointSpringBase, PointSpringList, PointToPointMuscle, PointTracingProbe, Polygon2d, PolygonalMesh, PolylineMesh, PuddleDemo, PullController, PuppetDemo, PyramidElement, QuadFishDemo, QuadhexElement, QuadpyramidElement, QuadtetElement, QuadwedgeElement, RenderableBase, RenderableComponentBase, RenderableComponentList, RenderableCompositeBase, RenderableModelBase, RenderableModelBaseOld, RevoluteJoint, RigidBody, RigidBodyCollision, RigidBodyConnector, RigidBodyDemo, RigidCompositeBody, RigidMeshComponent, RigidTentacle, RobustCube, RollPitchJoint, RollPitchJointDemo, RootModel, RotatableScaler3d, Rotator3d, Scaler3d, SegmentedPlanarConnector, SegmentedPlaneDemo, SelfCollision, SheetDemo, SignedDistanceGridCell, SimpleCollide, SingleHex, SinglePyramid, SingleQuadhex, SingleQuadpyramid, SingleQuadtet, SingleQuadwedge, SingleTet, SingleWedge, SkinDemo, SkinMesh, SkinMeshBase, SkullParticles, SoftPlaneCollider, SolidJoint, SphericalJoint, SphericalJointBase, SphericalJointDemo, SphericalRpyJoint, SplineTool, SpongeDemo, SpongeModel, SpringMeshDemo, TargetFrame, TargetPoint, Tentacle, TetBeam3d, TetElement, TextComponent2d, TextComponent3d, TextComponentBase, TextLabeller3d, TracingProbe, TrackingController, Translator3d, Transrotator3d, VectorTracingProbe, VertexComponent, VertexList, ViscousBeam, WedgeElement

public interface GLSelectable
extends GLRenderable


Field Summary
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Method Summary
 void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
          Append to list the component (or components) associated with the qid-th selection query issued by this component's render method.
 boolean isSelectable()
          Returns true if this object is in fact selectable.
 int numSelectionQueriesNeeded()
          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.
 
Methods inherited from interface maspack.render.GLRenderable
getRenderHints, prerender, render, updateBounds
 

Method Detail

isSelectable

boolean isSelectable()
Returns true if this object is in fact selectable.

Returns:
true if this object is selectable

numSelectionQueriesNeeded

int numSelectionQueriesNeeded()
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.

Returns:
maximum number of selection queries needed by this component, or -1 if this component does not manage its own selection.

getSelection

void getSelection(java.util.LinkedList<java.lang.Object> list,
                  int qid)
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 numSelectionQueriesNeeded() is positive), and qid will in turn be a number between 0 and nums-1.

Parameters:
list - selected objects are appended to the end of this list
qid - index of the selection query