Represents a set of limiting range for a
MotorAspect property.
Inheritance Hierarchy
Namespace:
Demo3D.Visuals.Motor
Assembly:
Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntaxpublic sealed class Limit : IDisposable
The MotorAspectLimit type exposes the following members.
Constructors
Properties|
| Name | Description |
|---|
 | Count |
The number of restrictive ranges.
|
 | Max |
The most restrictive maximum value from the set of limiting ranges.
|
 | Min |
The most restrictive minimum value from the set of limiting ranges.
|
Top
Methods|
| Name | Description |
|---|
 | Add |
Adds a restricting range to the limit.
|
 | Clear |
Clears all restrictive ranges from the limit.
|
 | Dispose | Releases all resources used by the MotorAspectLimit |
Top
Events|
| Name | Description |
|---|
 | OnChanged |
An event that is triggered when the minimum and/or maximum values for the permitted
range change.
|
Top
Remarks
The value for a property may be limited by a finite set of potentially overlapping
ranges. The MotorAspectLimit stores the set of ranges and allows for querying the
minimum and maximum allowable value for a property.
For example, given the pair of ranges [-4, 7] and [0.5, 12], the most restrictive
minimum value is 0.5 and the most restructive maximum value is 7. This is used to
allow a single motor to be attached to multiple joints. Each joint may impose a limiting
range on the motor. The motor's range of motion should then be restricted to the most
restrictive minimum and maximum values, ensuring that the motor doesn't attempt to drive
any joint beyond its limits.
One caveat is that disjoint ranges may result in an infeasible permitted range. This is
the case when the maximum of one range is less than the minimum for another. In such
cases there is no allowable value. An exception will be triggered when such a case is
detected and the range won't be added.
See Also