Package esys :: Package lsm :: Package vis :: Package core :: Module capsule :: Class Capsule
[hide private]
[frames] | no frames]

Class Capsule

object --+
         |
        Capsule
Known Subclasses:

Objects of this class represent capsules, a cylinder capped with a hemisphere at each end.

Instance Methods [hide private]
 
__init__(self, radius, endPt1=None, endPt2=None, segEndPt1=None, segEndPt2=None)
Initialises capsule with center-end-point coordinates and radius.
 
getSegmentEndPt1(self)
Returns the coordinate of the center coordinate of end 1.
 
getSegmentEndPt2(self)
Returns the coordinate of the center coordinate of end 2.
 
getCenter(self)
Returns the coordinate of the center of this capsule.
 
getSegmentDirection(self)
Returns the direction vector of the central axis.
float
getLength(self)
Returns the length of this capsule.
float
getSegmentLength(self)
Returns the segment-length of this capsule.
 
getRadius(self)
Returns the radius of this capsule.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, radius, endPt1=None, endPt2=None, segEndPt1=None, segEndPt2=None)
(Constructor)

 

Initialises capsule with center-end-point coordinates and radius.

Parameters:
  • radius (float) - Radius of capsule.
  • endPt1 (sequence of 3 floats) - Coordinate of one end ("apex" of hemisphere).
  • endPt2 (sequence of 3 floats) - Center coordinate of other end ("apex" of hemisphere).
  • segEndPt1 (sequence of 3 floats) - Coordinate of one end ("apex" of hemisphere).
  • segEndPt2 (sequence of 3 floats) - Center coordinate of other end ("apex" of hemisphere).
Overrides: object.__init__

getSegmentEndPt1(self)

 

Returns the coordinate of the center coordinate of end 1.

Returns:
Center coordinate of end 1.

getSegmentEndPt2(self)

 

Returns the coordinate of the center coordinate of end 2.

Returns:
Center coordinate of end 2.

getCenter(self)

 

Returns the coordinate of the center of this capsule.

Returns:
Center coordinate of this capsule.

getSegmentDirection(self)

 

Returns the direction vector of the central axis.

Returns:
Direction of longitudinal axis.

getLength(self)

 

Returns the length of this capsule.

Returns: float
Distance between hemi-sphere apexes.

getSegmentLength(self)

 

Returns the segment-length of this capsule.

Returns: float
minimum distance between end-points of cylinder.

getRadius(self)

 

Returns the radius of this capsule.

Returns:
Radius of this capsule.