LinearExtrusion

Inheritance: java.lang.Object, com.aspose.threed.A3DObject, com.aspose.threed.SceneObject, com.aspose.threed.Entity

All Implemented Interfaces: com.aspose.threed.IMeshConvertible

public class LinearExtrusion extends Entity implements IMeshConvertible

L’estrusione lineare prende una forma 2D come input ed estende la forma nella terza dimensione. Esempio: Il codice seguente mostra come utilizzare LinearExtrusion per estrudere una forma in un modello solido.

//Create a new 3D scene
 		Scene scene = new Scene();
 
 		// Initialize the base profile to be extruded
 		var profile = new RectangleShape();
 		profile.setRoundingRadius(0.3);
 
 		// Create left node
 		var left = scene.getRootNode().createChildNode();
 		left.createChildNode(new Box(0.01, 3, 3));
 
 		// Create right node
 		var right = scene.getRootNode().createChildNode();
 		right.createChildNode(new Box(0.01, 3, 3));
 		right.getTransform().setTranslation(new Vector3(5, 0, 0));
 
 		//Perform linear extrusion on left node using center and slices property
 		var l = new LinearExtrusion(profile, 10);
 		l.setCenter(false);
 		l.setSlices(3);
 		l.setTwist(20);
 		left.createChildNode(l);
 
 		// Perform linear extrusion on left node using center and slices property
 		var r = new LinearExtrusion(profile, 10);
 		r.setCenter(true);
 		r.setSlices(3);
 		r.setTwist(90);
 		right.createChildNode(r);

Costruttori

CostruttoreDescrizione
LinearExtrusion()Costruttore dell’istanza LinearExtrusion.
LinearExtrusion(Profile shape, double height)Costruttore dell’istanza LinearExtrusion.

Metodi

MetodoDescrizione
equals(Object arg0)
findProperty(String propertyName)Trova la proprietà.
getBoundingBox()Ottiene il bounding box dell’entità corrente nel suo sistema di coordinate dello spazio oggetto.
getCenter()Se questo valore è false, l’intervallo Z dell’estrusione lineare è da 0 a altezza, altrimenti l’intervallo è da -altezza/2 a altezza/2.
getClass()
getDirection()La direzione dell’estrusione, il valore predefinito è (0, 0, 1)
getEntityRendererKey()Ottiene la chiave del renderer dell’entità registrata nel renderer
getExcluded()Ottiene se escludere questa entità durante l’esportazione.
getHeight()L’altezza della geometria estrusa, il valore predefinito è 1.0
getName()Ottiene il nome.
getParentNode()Ottiene il primo nodo genitore; se impostato, questa entità verrà staccata dagli altri nodi genitori.
getParentNodes()Ottiene tutti i nodi genitore; un’entità può essere collegata a più nodi genitore per l’instancing della geometria.
getProperties()Ottiene la collezione di tutte le proprietà.
getProperty(String property)Ottieni il valore della proprietà specificata
getScene()Ottiene la scena a cui appartiene questo oggetto
getShape()La forma di base da estrudere.
getSlices()Le sezioni della geometria estrusa attorcigliata, il valore predefinito è 1.
getTwist()Il numero di gradi attraverso i quali la forma è estrusa.
getTwistOffset()L’offset utilizzato nella torsione, il valore predefinito è (0, 0, 0).
hashCode()
notify()
notifyAll()
removeProperty(Property property)Rimuove una proprietà dinamica.
removeProperty(String property)Rimuove la proprietà specificata identificata per nome
setCenter(boolean value)Se questo valore è false, l’intervallo Z dell’estrusione lineare è da 0 a altezza, altrimenti l’intervallo è da -altezza/2 a altezza/2.
setDirection(Vector3 value)La direzione dell’estrusione, il valore predefinito è (0, 0, 1)
setExcluded(boolean value)Imposta se escludere questa entità durante l’esportazione.
setHeight(double value)L’altezza della geometria estrusa, il valore predefinito è 1.0
setName(String value)Imposta il nome.
setParentNode(Node value)Imposta il primo nodo genitore; se impostato, questa entità verrà staccata dagli altri nodi genitori.
setProperty(String property, Object value)Imposta il valore della proprietà specificata
setShape(Profile value)La forma di base da estrudere.
setSlices(int value)Le sezioni della geometria estrusa attorcigliata, il valore predefinito è 1.
setTwist(double value)Il numero di gradi attraverso i quali la forma è estrusa.
setTwistOffset(Vector3 value)L’offset utilizzato nella torsione, il valore predefinito è (0, 0, 0).
toMesh()Converti l’estrusione in mesh.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

LinearExtrusion()

public LinearExtrusion()

Costruttore dell’istanza LinearExtrusion.

LinearExtrusion(Profile shape, double height)

public LinearExtrusion(Profile shape, double height)

Costruttore dell’istanza LinearExtrusion.

Parameters:

ParametroTipoDescrizione
shapeProfile
altezzadouble

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParametroTipoDescrizione
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

Trova la proprietà. Può essere una proprietà dinamica (creata con CreateDynamicProperty/SetProperty) o una proprietà nativa (identificata per nome).

Parameters:

ParametroTipoDescrizione
propertyNamejava.lang.StringNome della proprietà.

Returns: Property - The property.

getBoundingBox()

public BoundingBox getBoundingBox()

Ottiene il bounding box dell’entità corrente nel suo sistema di coordinate dello spazio oggetto.

Returns: BoundingBox - the bounding box of current entity in its object space coordinate system. Example: The following code shows how to calculate the bounding box of a shape

Entity entity = new Sphere();
     entity.setRadius(10);
     var bbox = entity.getBoundingBox();
     System.out.printf("The bounding box of the entity is %s ~ %s", bbox.getMinimum(), bbox.getMaximum());

getCenter()

public boolean getCenter()

Se questo valore è false, l’intervallo Z dell’estrusione lineare è da 0 a altezza, altrimenti l’intervallo è da -altezza/2 a altezza/2.

Returns: boolean - Se questo valore è false, l’intervallo Z dell’estrusione lineare è da 0 a altezza, altrimenti l’intervallo è da -altezza/2 a altezza/2.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDirection()

public Vector3 getDirection()

La direzione dell’estrusione, il valore predefinito è (0, 0, 1)

Returns: Vector3 - The direction of extrusion, default value is (0, 0, 1)

getEntityRendererKey()

public EntityRendererKey getEntityRendererKey()

Ottiene la chiave del renderer dell’entità registrata nel renderer

Returns: EntityRendererKey - the key of the entity renderer registered in the renderer

getExcluded()

public boolean getExcluded()

Ottiene se escludere questa entità durante l’esportazione.

Returns: boolean - se escludere questa entità durante l’esportazione.

getHeight()

public double getHeight()

L’altezza della geometria estrusa, il valore predefinito è 1.0

Returns: double - L’altezza della geometria estrusa, il valore predefinito è 1.0

getName()

public String getName()

Ottiene il nome.

Returns: java.lang.String - il nome.

getParentNode()

public Node getParentNode()

Ottiene il primo nodo genitore; se impostato, questa entità verrà staccata dagli altri nodi genitori.

Returns: Node - the first parent node, if set the first parent node, this entity will be detached from other parent nodes.

getParentNodes()

public ArrayList<Node> getParentNodes()

Ottiene tutti i nodi genitore; un’entità può essere collegata a più nodi genitore per l’instancing della geometria.

Returns: java.util.ArrayList<com.aspose.threed.Node> - tutti i nodi genitore, un’entità può essere collegata a più nodi genitore per l’instanziazione della geometria

getProperties()

public PropertyCollection getProperties()

Ottiene la collezione di tutte le proprietà.

Returns: PropertyCollection - the collection of all properties.

getProperty(String property)

public Object getProperty(String property)

Ottieni il valore della proprietà specificata

Parameters:

ParametroTipoDescrizione
proprietàjava.lang.StringNome della proprietà

Returns: java.lang.Object - Il valore della proprietà trovata

getScene()

public Scene getScene()

Ottiene la scena a cui appartiene questo oggetto

Returns: Scene - the scene that this object belongs to

getShape()

public Profile getShape()

La forma di base da estrudere.

Returns: Profile - The base shape to be extruded.

getSlices()

public int getSlices()

Le sezioni della geometria estrusa attorcigliata, il valore predefinito è 1.

Returns: int - Le sezioni della geometria estrusa attorcigliata, il valore predefinito è 1.

getTwist()

public double getTwist()

Il numero di gradi attraverso i quali la forma è estrusa.

Returns: double - Il numero di gradi attraverso i quali la forma è estrusa.

getTwistOffset()

public Vector3 getTwistOffset()

L’offset utilizzato nella torsione, il valore predefinito è (0, 0, 0).

Returns: Vector3 - The offset that used in twisting, default value is (0, 0, 0).

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeProperty(Property property)

public boolean removeProperty(Property property)

Rimuove una proprietà dinamica.

Parameters:

ParametroTipoDescrizione
propertyPropertyQuale proprietà rimuovere

Returns: boolean - true se la proprietà è stata rimossa con successo

removeProperty(String property)

public boolean removeProperty(String property)

Rimuove la proprietà specificata identificata per nome

Parameters:

ParametroTipoDescrizione
proprietàjava.lang.StringQuale proprietà rimuovere

Returns: boolean - true se la proprietà è stata rimossa con successo

setCenter(boolean value)

public void setCenter(boolean value)

Se questo valore è false, l’intervallo Z dell’estrusione lineare è da 0 a altezza, altrimenti l’intervallo è da -altezza/2 a altezza/2.

Parameters:

ParametroTipoDescrizione
valorebooleanNuovo valore

setDirection(Vector3 value)

public void setDirection(Vector3 value)

La direzione dell’estrusione, il valore predefinito è (0, 0, 1)

Parameters:

ParametroTipoDescrizione
valueVector3Nuovo valore

setExcluded(boolean value)

public void setExcluded(boolean value)

Imposta se escludere questa entità durante l’esportazione.

Parameters:

ParametroTipoDescrizione
valorebooleanNuovo valore

setHeight(double value)

public void setHeight(double value)

L’altezza della geometria estrusa, il valore predefinito è 1.0

Parameters:

ParametroTipoDescrizione
valoredoubleNuovo valore

setName(String value)

public void setName(String value)

Imposta il nome.

Parameters:

ParametroTipoDescrizione
valorejava.lang.StringNuovo valore

setParentNode(Node value)

public void setParentNode(Node value)

Imposta il primo nodo genitore; se impostato, questa entità verrà staccata dagli altri nodi genitori.

Parameters:

ParametroTipoDescrizione
valueNodeNuovo valore

setProperty(String property, Object value)

public void setProperty(String property, Object value)

Imposta il valore della proprietà specificata

Parameters:

ParametroTipoDescrizione
proprietàjava.lang.StringNome della proprietà
valorejava.lang.ObjectIl valore della proprietà

setShape(Profile value)

public void setShape(Profile value)

La forma di base da estrudere.

Parameters:

ParametroTipoDescrizione
valueProfileNuovo valore

setSlices(int value)

public void setSlices(int value)

Le sezioni della geometria estrusa attorcigliata, il valore predefinito è 1.

Parameters:

ParametroTipoDescrizione
valoreintNuovo valore

setTwist(double value)

public void setTwist(double value)

Il numero di gradi attraverso i quali la forma è estrusa.

Parameters:

ParametroTipoDescrizione
valoredoubleNuovo valore

setTwistOffset(Vector3 value)

public void setTwistOffset(Vector3 value)

L’offset utilizzato nella torsione, il valore predefinito è (0, 0, 0).

Parameters:

ParametroTipoDescrizione
valueVector3Nuovo valore

toMesh()

public Mesh toMesh()

Converti l’estrusione in mesh.

Returns: Mesh

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParametroTipoDescrizione
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParametroTipoDescrizione
arg0long
arg1int