Package heronarts.lx.transform
Class LXProjection
java.lang.Object
heronarts.lx.transform.LXProjection
Class to compute projections of an entire model. These are applied cheaply by
using direct manipulation rather than matrix multiplication. No push or pop
is available.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncenter()
Centers the projection, by translating it such that the origin (0, 0, 0) becomes the center of the modeliterator()
reflectX()
Reflects the projection about the x-axisreflectY()
Reflects the projection about the y-axisreflectZ()
Reflects the projection about the z-axisreset()
Reset all points in the projection to the modelrotate
(float angle, float l, float m, float n) Rotates the projection about a vectorrotateX
(float angle) Rotate about the x-axisrotateY
(float angle) Rotate about the x-axisrotateZ
(float angle) Rotate about the x-axisscale
(float sx, float sy, float sz) Scales the projectiontranslate
(float tx, float ty, float tz) Translates the projectiontranslateCenter
(float tx, float ty, float tz) Translates the model from its center, so (0, 0, 0) becomes (tx, ty, tz)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LXProjection
Constructs a projection view of the given model- Parameters:
model
- Model
-
-
Method Details
-
iterator
-
reset
Reset all points in the projection to the model- Returns:
- this, for method chaining
-
scale
Scales the projection- Parameters:
sx
- x-factorsy
- y-factorsz
- z-factor- Returns:
- this, for method chaining
-
translate
Translates the projection- Parameters:
tx
- x-translationty
- y-translationtz
- z-translation- Returns:
- this, for method chaining
-
center
Centers the projection, by translating it such that the origin (0, 0, 0) becomes the center of the model- Returns:
- this, for method chaining
-
translateCenter
Translates the model from its center, so (0, 0, 0) becomes (tx, ty, tz)- Parameters:
tx
- x-translationty
- y-translationtz
- z-translation- Returns:
- this, for method chaining
-
reflectX
Reflects the projection about the x-axis- Returns:
- this, for method chaining
-
reflectY
Reflects the projection about the y-axis- Returns:
- this, for method chaining
-
reflectZ
Reflects the projection about the z-axis- Returns:
- this, for method chaining
-
rotate
Rotates the projection about a vector- Parameters:
angle
- Angle to rotate by, in radiansl
- vector x-valuem
- vector y-valuen
- vector z-value- Returns:
- this, for method chaining
-
rotateX
Rotate about the x-axis- Parameters:
angle
- Angle in radians- Returns:
- this
-
rotateY
Rotate about the x-axis- Parameters:
angle
- Angle in radians- Returns:
- this
-
rotateZ
Rotate about the x-axis- Parameters:
angle
- Angle in radians- Returns:
- this
-