Package com.aspose.threed
Class LinearExtrusion
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.LinearExtrusion
-
- All Implemented Interfaces:
IMeshConvertible
public class LinearExtrusion extends Entity implements IMeshConvertible
Linear extrusion takes a 2D shape as input and extends the shape in the 3rd dimension.
-
-
Constructor Summary
Constructors Constructor Description LinearExtrusion()
Constructor of instanceLinearExtrusion
.LinearExtrusion(Shape shape, double height)
Constructor of instanceLinearExtrusion
.
-
Method Summary
Modifier and Type Method Description boolean
getCenter()
If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2.Vector3
getDirection()
The direction of extrusion, default value is (0, 0, 1)double
getHeight()
The height of the extruded geometry, default value is 1.0Shape
getShape()
The base shape to be extruded.int
getSlices()
The slices of the twisted extruded geometry, default value is 1.double
getTwist()
The number of degrees of through which the shape is extruded.Vector3
getTwistOffset()
The offset that used in twisting, default value is (0, 0, 0).void
setCenter(boolean value)
If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2.void
setDirection(Vector3 value)
The direction of extrusion, default value is (0, 0, 1)void
setHeight(double value)
The height of the extruded geometry, default value is 1.0void
setShape(Shape value)
The base shape to be extruded.void
setSlices(int value)
The slices of the twisted extruded geometry, default value is 1.void
setTwist(double value)
The number of degrees of through which the shape is extruded.void
setTwistOffset(Vector3 value)
The offset that used in twisting, default value is (0, 0, 0).Mesh
toMesh()
Convert the extrusion to mesh.-
Methods inherited from class com.aspose.threed.Entity
createRenderableResource, getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Constructor Detail
-
LinearExtrusion
public LinearExtrusion()
Constructor of instanceLinearExtrusion
.
-
LinearExtrusion
public LinearExtrusion(Shape shape, double height)
Constructor of instanceLinearExtrusion
.
-
-
Method Detail
-
getShape
public Shape getShape()
The base shape to be extruded.
-
setShape
public void setShape(Shape value)
The base shape to be extruded.- Parameters:
value
- New value
-
getDirection
public Vector3 getDirection()
The direction of extrusion, default value is (0, 0, 1)
-
setDirection
public void setDirection(Vector3 value)
The direction of extrusion, default value is (0, 0, 1)- Parameters:
value
- New value
-
getHeight
public double getHeight()
The height of the extruded geometry, default value is 1.0
-
setHeight
public void setHeight(double value)
The height of the extruded geometry, default value is 1.0- Parameters:
value
- New value
-
getSlices
public int getSlices()
The slices of the twisted extruded geometry, default value is 1.
-
setSlices
public void setSlices(int value)
The slices of the twisted extruded geometry, default value is 1.- Parameters:
value
- New value
-
getCenter
public boolean getCenter()
If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2.
-
setCenter
public void setCenter(boolean value)
If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2.- Parameters:
value
- New value
-
getTwistOffset
public Vector3 getTwistOffset()
The offset that used in twisting, default value is (0, 0, 0).
-
setTwistOffset
public void setTwistOffset(Vector3 value)
The offset that used in twisting, default value is (0, 0, 0).- Parameters:
value
- New value
-
getTwist
public double getTwist()
The number of degrees of through which the shape is extruded.
-
setTwist
public void setTwist(double value)
The number of degrees of through which the shape is extruded.- Parameters:
value
- New value
-
toMesh
public Mesh toMesh()
Convert the extrusion to mesh.- Specified by:
toMesh
in interfaceIMeshConvertible
- Returns:
- The mesh.
-
-