InfinityModelController class
A widget that controls InfinityModel camera state - position, rotation, zoom.
- Inheritance
-
- Object
- ChangeNotifier
- InfinityModelController
Constructors
- InfinityModelController({double modelScale = 1, double viewScale = 1, double userScale = 1, double minUserScale = 0.8, double maxUserScale = 3.0, double rotationX = -45, double rotationY = 45, double rotationZ = 0, Offset translation = const Offset(0, 0), Vector3? light, double lightStrength = 1.0, double ambientLightStrength = 0.1})
- Creates a new InfinityModelController instance.
Properties
- ambientLightStrength ↔ double
-
Ambient light strength.
Varies from 0.0 to 1.0.
Set to 1.0 to use colors without light effect.
Defaults to 0.1.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- light ↔ Vector3
-
Light direction for 3D objects.
getter/setter pair
- lightStrength ↔ double
-
light strength.
Varies from 0.0 to infinity.
Defaults to 1.0.
getter/setter pair
- maxUserScale ↔ double
-
Maximum scale applied by user. By default it's 3.0.
getter/setter pair
- minUserScale ↔ double
-
Minimum scale applied by user. By default it's 0.8.
getter/setter pair
- modelScale ↔ double
-
Scale factor for the model to fit in
-1, 1bounds.getter/setter pair - rotationX ↔ double
-
Camera rotation around X-axis (vertical) in degrees (0-360).
Minus moves camera "above" the model, with plus it's "below".
getter/setter pair
- rotationY ↔ double
-
Camera rotation around Y-axis (horizontal) in degrees (0-360).
getter/setter pair
- rotationZ ↔ double
-
Camera rotation around Z-axis (roll) in degrees (0-360).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
Combination of all scale factors to pixel coordinates.
no setter
- translation ↔ Offset
-
Translation of the displayed model on the screen.
getter/setter pair
- userScale ↔ double
-
User scale. By default it's 1.0.
getter/setter pair
- viewScale ↔ double
-
Scale factor for the screen to draw
-1, 1bounded model.getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addRotation(
{double x = 0, double y = 0, double z = 0}) → void - Adds relative rotation in degrees to current rotation.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setRotation(
{double? x, double? y, double? z}) → void - Sets absolute rotation angles in degrees, normalized to 0-360 range.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
{double? viewScale, double? userScale, double? minUserScale, double? maxUserScale, double? rotationX, double? rotationY, double? rotationZ, Offset? translation, Vector3? light, double? lightStrength, double? ambientLightStrength}) → void -
Updates controller and notifies listeners (including
DiTreDiwidget).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited