CuttingPlaneUtils
- class cee.ug.CuttingPlaneUtils()
Helper functions for cutting planes
Methods
getPositionFromRelativeNormalPosition
- cee.ug.CuttingPlaneUtils.getPositionFromRelativeNormalPosition(relVal, normal, boundingBox)
Gets a position from a relative position along the given normal on the given bounding box.
- Arguments
relVal (
number
) – The relative value to get the position for (0..1)normal (
cee.Vec3Like
) – The normal direction to compute the position inboundingBox (
cee.BoundingBox
) – The bounding box defining the range of positions for the point (usually the model bounding box)
- Return type
cee.Vec3
This is useful for implementing a slider moving the cutting plane back and forth in the direction of the plane’s normal vector.
getRelativeNormalPosition
- cee.ug.CuttingPlaneUtils.getRelativeNormalPosition(point, normal, boundingBox)
Gets a relative position along the given normal and bounding box for the given point
- Arguments
point (
cee.Vec3Like
) – The point to compute the relative position fornormal (
cee.Vec3Like
) – The normal direction to use for the computationboundingBox (
cee.BoundingBox
) – The bounding box defining the range of positions for the point (usually the model bounding box)
- Return type
number
Useful for updating the slider position based on the current position of a cutting plane.