FrameMixin is a mixin containing rules that can be used by other designs. We do not use it alone; instead, it is used to add the rules to other designs.
FrameMixin is the primary geometric positioning provider. All geometric objects, and all ancestors of such object in the model tree must support these Rules.
Parameter Rules
position: | Specifies the PositionSpec to be used for positioning this model. |
Example: | { origin: p(0, 0, 0, this.parent.transform ) }; |
Rules
localTransform: The Frame defining this object's position relative to its parent.
origin: The point which is the origin of this object's Frame.
transform: The Frame defining this object's position relative to the world.
unitX: The unit vector in this object's +X direction.
unitY: The unit vector in this object's +Y direction.
unitZ: The unit vector in this object's +Z direction.
Mixins
NONE
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
position |
Number |
1 |
Inputs |
Cached |
localTransform |
Number |
1 |
Inputs |
Cached |
origin |
Number |
1 |
Inputs |
Cached |
transform |
Number |
this.length * this.width * this.height |
Geometry |
Cached |
unitX |
Any |
{ origin: this.origin, normal: this.unitX, distance: this.length / 2 } |
Constraint |
Cached |
unitY |
Any |
{ origin: this.origin, normal: -this.unitY, distance: this.width/2 } |
Constraint |
Cached |
unitZ |
Point |
p(0, 0, this.height / 2) |
Geometry |
Cached |