Package toxi.physics3d.constraints
Class PlaneConstraint
java.lang.Object
toxi.physics3d.constraints.PlaneConstraint
- All Implemented Interfaces:
ParticleConstraint3D
Constrains a particle's movement by locking it to a fixed axis aligned plane.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies the constraint to the passed in particle.
-
Field Details
-
constraint
-
axis1
-
axis2
-
-
Constructor Details
-
PlaneConstraint
- Parameters:
axis
- 1st axis to lockaxis2
- 2d axis to lockconstraint
- point on the desired constraint plane
-
-
Method Details
-
apply
Description copied from interface:ParticleConstraint3D
Applies the constraint to the passed in particle. The method is assumed to manipulate the given instance directly.- Specified by:
apply
in interfaceParticleConstraint3D
- Parameters:
p
- particle
-