Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
|
#include <G4OpenInventorQtExaminerViewer.hh>
Classes | |
struct | elementForSorting |
struct | sceneElement |
struct | viewPtData |
Public Member Functions | |
G4OpenInventorQtExaminerViewer (QWidget *parent=NULL, const char *name=NULL, SbBool embed=TRUE, SoQtFullViewer::BuildFlag flag=BUILD_ALL, SoQtViewer::Type type=BROWSER) | |
~G4OpenInventorQtExaminerViewer () | |
template<class T > | |
void | parseString (T &t, const std::string &s, bool &error) |
void | setOrigWindowSize (int w, int h) |
QMenuBar * | getMenubar () |
QMenu * | getFileMenu () |
QMenu * | getEtcMenu () |
QFont * | getFont () |
void | setExternalQtApp () |
void | addEscapeCallback (void(*cb)()) |
Public Attributes | |
std::string | saveScenegraphFileName |
std::string | saveRefCoordsFileName |
bool | abbrOutputFlag |
bool | pickRefPathFlag |
bool | viewingBeforePickRef |
Protected Types | |
enum | CameraType { PERSPECTIVE , ORTHOGRAPHIC } |
enum | State { GENERAL , BEAMLINE , VIEWPOINT , ANIMATION , REVERSED_ANIMATION , PAUSED_ANIMATION , ROTATING } |
Protected Member Functions | |
void | construct (const SbBool build) |
void | buildWidget (QWidget *parent) |
virtual void | afterRealizeHook () |
SbBool | processSoEvent (const SoEvent *const event) |
void | saveViewPt (char *name) |
bool | loadViewPts () |
void | addViewPoints () |
void | setViewPt () |
void | writeViewPtIdx () |
void | cleanUpAfterPrevFile () |
void | deleteViewPt (char *vpName=NULL) |
void | renameViewPt (char *vpName) |
void | sortViewPts (std::vector< std::string >) |
void | zoom (const float) |
void | moveCamera (float dist=0, bool lookdown=false) |
void | rotateCamera () |
void | updateViewParams (SoKeyboardEvent::Key) |
void | animateRefParticle () |
void | saveCurCamera () |
void | restoreCamera () |
void | incSpeed () |
void | decSpeed () |
void | setReferencePath (SoLineSet *, SoCoordinate3 *, bool append=false) |
void | setReferencePathZPos () |
void | findAndSetRefPath () |
SoCoordinate3 * | getCoordsNode (SoFullPath *path) |
void | getSceneElements () |
float | sqrlen (const SbVec3f &) |
void | distanceToTrajectory (const SbVec3f &, float &, SbVec3f &, int &) |
void | sortElements () |
void | createElementsList () |
void | evenOutRefParticlePts () |
void | gotoRefPathStart () |
void | invertRefPath () |
void | setStartingPtForAnimation () |
std::string | viewPtAutoName () |
SoNode * | getSuperimpositionNode (SoNode *, const char *name) |
void | superimpositionEvent (SoAction *action) |
virtual void | actualRedraw (void) |
void | updateSpeedIndicator (void) |
Static Protected Member Functions | |
static void | sceneChangeCB (void *, SoSensor *) |
static void | mouseoverCB (void *aThis, SoEventCallback *eventCB) |
static void | pickingCB (void *aThis, SoEventCallback *eventCB) |
static void | animateRefParticleCB () |
static void | animateSensorCB (void *, SoSensor *) |
static void | animateSensorRotationCB (void *, SoSensor *) |
static void | superimpositionCB (void *closure, SoAction *action) |
Friends | |
class | G4OpenInventorQtViewer |
class | HookEventProcState |
Definition at line 87 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Enumerator | |
---|---|
PERSPECTIVE | |
ORTHOGRAPHIC |
Definition at line 302 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Enumerator | |
---|---|
GENERAL | |
BEAMLINE | |
VIEWPOINT | |
ANIMATION | |
REVERSED_ANIMATION | |
PAUSED_ANIMATION | |
ROTATING |
Definition at line 306 of file G4OpenInventorQtExaminerViewer.hh.
G4OpenInventorQtExaminerViewer::G4OpenInventorQtExaminerViewer | ( | QWidget * | parent = NULL , |
const char * | name = NULL , |
||
SbBool | embed = TRUE , |
||
SoQtFullViewer::BuildFlag | flag = BUILD_ALL , |
||
SoQtViewer::Type | type = BROWSER |
||
) |
Definition at line 118 of file G4OpenInventorQtExaminerViewer.cc.
G4OpenInventorQtExaminerViewer::~G4OpenInventorQtExaminerViewer | ( | ) |
Definition at line 138 of file G4OpenInventorQtExaminerViewer.cc.
|
protectedvirtual |
Definition at line 1529 of file G4OpenInventorQtExaminerViewer.cc.
void G4OpenInventorQtExaminerViewer::addEscapeCallback | ( | void(*)() | cb | ) |
Definition at line 2593 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 2618 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by afterRealizeHook().
|
protectedvirtual |
Definition at line 666 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 2570 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by animateSensorCB(), incSpeed(), and processSoEvent().
|
staticprotected |
|
staticprotected |
Definition at line 2396 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by construct().
|
staticprotected |
Definition at line 2363 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by construct().
|
protected |
Definition at line 431 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by construct().
|
protected |
Definition at line 2701 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 156 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by G4OpenInventorQtExaminerViewer().
|
protected |
Definition at line 1979 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by sortElements().
|
protected |
Definition at line 1487 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by processSoEvent().
|
protected |
Definition at line 3199 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 1814 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by sortElements().
|
protected |
Definition at line 2250 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by setReferencePath().
|
protected |
Definition at line 1588 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by sceneChangeCB().
|
protected |
Definition at line 1711 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by findAndSetRefPath().
|
inline |
Definition at line 206 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by G4OpenInventorQtViewer::Initialise().
|
inline |
Definition at line 205 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by G4OpenInventorQtViewer::Initialise().
|
inline |
Definition at line 207 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by G4OpenInventorQtViewer::Initialise().
|
inline |
Definition at line 204 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Definition at line 1735 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by setReferencePath().
|
protected |
Definition at line 782 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by construct().
|
protected |
Definition at line 2492 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 1469 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by processSoEvent().
|
protected |
Definition at line 2561 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 910 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by afterRealizeHook().
|
staticprotected |
Definition at line 1267 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by afterRealizeHook().
|
protected |
Definition at line 1014 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by processSoEvent().
void G4OpenInventorQtExaminerViewer::parseString | ( | T & | t, |
const std::string & | s, | ||
bool & | error | ||
) |
Definition at line 2633 of file G4OpenInventorQtExaminerViewer.cc.
|
staticprotected |
Definition at line 1127 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by afterRealizeHook().
|
protected |
Definition at line 3497 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 3335 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 2329 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by processSoEvent().
|
protected |
Definition at line 987 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by animateSensorRotationCB(), and processSoEvent().
|
protected |
Definition at line 2306 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 2870 of file G4OpenInventorQtExaminerViewer.cc.
|
staticprotected |
Definition at line 2599 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by afterRealizeHook().
|
inline |
Definition at line 209 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by G4OpenInventorQtViewer::Initialise().
|
inline |
Definition at line 200 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by G4OpenInventorQtViewer::Initialise().
|
protected |
Definition at line 1544 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by findAndSetRefPath(), and pickingCB().
|
protected |
Definition at line 1575 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by invertRefPath(), and setReferencePath().
|
protected |
Definition at line 2437 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by animateRefParticle(), and processSoEvent().
|
protected |
Definition at line 2998 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by deleteViewPt().
|
protected |
Definition at line 1906 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by invertRefPath(), and setReferencePath().
|
protected |
Definition at line 3417 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 1806 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by distanceToTrajectory().
|
staticprotected |
Definition at line 799 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by construct().
|
protected |
Definition at line 809 of file G4OpenInventorQtExaminerViewer.cc.
|
protected |
Definition at line 1506 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by actualRedraw().
|
protected |
|
protected |
|
protected |
Definition at line 2948 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by deleteViewPt(), saveViewPt(), and sortViewPts().
|
protected |
Definition at line 3471 of file G4OpenInventorQtExaminerViewer.cc.
Referenced by processSoEvent().
|
friend |
Definition at line 94 of file G4OpenInventorQtExaminerViewer.hh.
|
friend |
Definition at line 238 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
bool G4OpenInventorQtExaminerViewer::abbrOutputFlag |
Definition at line 217 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), mouseoverCB(), and pickingCB().
|
protected |
Definition at line 274 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorCB(), animateSensorRotationCB(), construct(), decSpeed(), incSpeed(), and processSoEvent().
|
protected |
Definition at line 278 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateRefParticle(), animateSensorCB(), construct(), decSpeed(), processSoEvent(), and setViewPt().
|
protected |
Definition at line 279 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorRotationCB(), construct(), and rotateCamera().
|
protected |
Definition at line 436 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), processSoEvent(), setViewPt(), and updateSpeedIndicator().
|
protected |
Definition at line 437 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), processSoEvent(), setViewPt(), and updateSpeedIndicator().
|
protected |
Definition at line 435 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), processSoEvent(), and setViewPt().
|
protected |
Definition at line 385 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by processSoEvent().
|
protected |
Definition at line 393 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by restoreCamera(), and saveCurCamera().
|
protected |
Definition at line 259 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera(), processSoEvent(), and rotateCamera().
|
protected |
Definition at line 282 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateRefParticle(), and animateSensorCB().
|
protected |
Definition at line 281 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateRefParticle(), and animateSensorCB().
|
protected |
Definition at line 282 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateRefParticle(), and animateSensorCB().
|
protected |
Definition at line 281 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateRefParticle(), and animateSensorCB().
|
protected |
Definition at line 258 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera(), processSoEvent(), and rotateCamera().
|
protected |
Definition at line 460 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera().
|
protected |
Definition at line 257 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Definition at line 430 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 438 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 421 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 413 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 385 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by actualRedraw(), animateRefParticle(), animateSensorCB(), animateSensorRotationCB(), cleanUpAfterPrevFile(), construct(), incSpeed(), processSoEvent(), setStartingPtForAnimation(), setViewPt(), and superimpositionEvent().
|
protected |
Definition at line 386 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), deleteViewPt(), renameViewPt(), setViewPt(), and superimpositionEvent().
|
protected |
Definition at line 454 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook().
|
protected |
Definition at line 455 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook().
|
protected |
Definition at line 384 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera(), and rotateCamera().
|
protected |
Definition at line 371 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook(), deleteViewPt(), loadViewPts(), and renameViewPt().
|
protected |
Definition at line 370 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook(), construct(), deleteViewPt(), renameViewPt(), and sortViewPts().
|
protected |
Definition at line 372 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook(), cleanUpAfterPrevFile(), deleteViewPt(), renameViewPt(), saveViewPt(), sortViewPts(), and writeViewPtIdx().
|
protected |
Definition at line 237 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 398 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), processSoEvent(), and setStartingPtForAnimation().
|
protected |
Definition at line 374 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and writeViewPtIdx().
|
protected |
Definition at line 375 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), renameViewPt(), saveViewPt(), and sortViewPts().
|
protected |
Definition at line 449 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), decSpeed(), processSoEvent(), setViewPt(), and updateSpeedIndicator().
|
protected |
Definition at line 433 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 432 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 431 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 434 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 427 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and mouseoverCB().
|
protected |
Definition at line 426 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and mouseoverCB().
|
protected |
Definition at line 425 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and mouseoverCB().
|
protected |
Definition at line 428 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and mouseoverCB().
|
protected |
Definition at line 416 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 415 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 414 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 417 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 396 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook(), animateRefParticle(), construct(), processSoEvent(), and setStartingPtForAnimation().
|
protected |
Definition at line 239 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), HookEventProcState::Notify(), and sceneChangeCB().
|
protected |
Definition at line 463 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 460 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera().
|
protected |
Definition at line 457 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and setStartingPtForAnimation().
bool G4OpenInventorQtExaminerViewer::pickRefPathFlag |
Definition at line 218 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and pickingCB().
|
protected |
Definition at line 391 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
|
protected |
Definition at line 390 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera().
|
protected |
Definition at line 389 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera(), and rotateCamera().
|
protected |
Definition at line 383 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by processSoEvent().
|
protected |
Definition at line 385 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorRotationCB(), and processSoEvent().
|
protected |
Definition at line 382 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorCB(), moveCamera(), processSoEvent(), setStartingPtForAnimation(), and superimpositionEvent().
|
protected |
Definition at line 378 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorCB(), distanceToTrajectory(), evenOutRefParticlePts(), incSpeed(), invertRefPath(), moveCamera(), processSoEvent(), setReferencePath(), setReferencePathZPos(), setStartingPtForAnimation(), sortElements(), and superimpositionEvent().
|
protected |
Definition at line 380 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by setReferencePathZPos(), and superimpositionEvent().
|
protected |
Definition at line 395 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Definition at line 394 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Definition at line 399 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by processSoEvent(), and rotateCamera().
|
protected |
Definition at line 400 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorRotationCB(), processSoEvent(), and rotateCamera().
|
protected |
Definition at line 461 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct().
std::string G4OpenInventorQtExaminerViewer::saveRefCoordsFileName |
Definition at line 213 of file G4OpenInventorQtExaminerViewer.hh.
std::string G4OpenInventorQtExaminerViewer::saveScenegraphFileName |
Definition at line 212 of file G4OpenInventorQtExaminerViewer.hh.
|
protected |
Definition at line 280 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by afterRealizeHook().
|
protected |
Definition at line 368 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by createElementsList(), getSceneElements(), and sortElements().
|
protected |
Definition at line 406 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and getSuperimpositionNode().
|
protected |
Definition at line 409 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and updateSpeedIndicator().
|
protected |
Definition at line 274 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by animateSensorCB(), construct(), decSpeed(), and incSpeed().
|
protected |
Definition at line 410 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 388 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), moveCamera(), and processSoEvent().
|
protected |
Definition at line 412 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), and superimpositionEvent().
|
protected |
Definition at line 408 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), mouseoverCB(), processSoEvent(), and setViewPt().
|
protected |
Definition at line 398 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), processSoEvent(), and setStartingPtForAnimation().
|
protected |
Definition at line 460 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by moveCamera().
bool G4OpenInventorQtExaminerViewer::viewingBeforePickRef |
Definition at line 219 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by pickingCB().
|
protected |
Definition at line 373 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by cleanUpAfterPrevFile(), construct(), deleteViewPt(), loadViewPts(), saveViewPt(), setViewPt(), and writeViewPtIdx().
|
protected |
Definition at line 369 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by addViewPoints(), afterRealizeHook(), cleanUpAfterPrevFile(), deleteViewPt(), loadViewPts(), processSoEvent(), renameViewPt(), saveViewPt(), setViewPt(), and sortViewPts().
|
protected |
Definition at line 366 of file G4OpenInventorQtExaminerViewer.hh.
Referenced by construct(), createElementsList(), and sortElements().