Light
Inheritance: java.lang.Object, com.aspose.threed.A3DObject, com.aspose.threed.SceneObject, com.aspose.threed.Entity, com.aspose.threed.Frustum
public class Light extends Frustum
光がシーンを照らします。
光の総減衰を計算する式は次のとおりです: A = ConstantAttenuation + (Dist * LinearAttenuation) + ((Dist^2) * QuadraticAttenuation)
コンストラクタ
| コンストラクタ | 説明 |
|---|---|
| Light() | 新しい Light クラスのインスタンスを初期化します。 |
| Light(String name) | 新しい Light クラスのインスタンスを初期化します。 |
| Light(String name, LightType type) | 新しい Light クラスのインスタンスを初期化します。 |
メソッド
Light()
public Light()
新しい Light クラスのインスタンスを初期化します。
Light(String name)
public Light(String name)
新しい Light クラスのインスタンスを初期化します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 名前 | java.lang.String | 名前 |
Light(String name, LightType type)
public Light(String name, LightType type)
新しい Light クラスのインスタンスを初期化します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 名前 | java.lang.String | 名前 |
| type | LightType | 新しい光のタイプ |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
findProperty(String propertyName)
public Property findProperty(String propertyName)
プロパティを検索します。動的プロパティ(CreateDynamicProperty/SetProperty により作成)またはネイティブプロパティ(名前で識別)になる可能性があります。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| propertyName | java.lang.String | プロパティ名。 |
Returns: Property - The property.
getAspect()
public double getAspect()
フラスタムのアスペクト比を取得します
Returns: double - フラスタムのアスペクト比
getBoundingBox()
public BoundingBox getBoundingBox()
現在のエンティティのオブジェクト空間座標系におけるバウンディングボックスを取得します。
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());
getCastLight()
public boolean getCastLight()
現在の Light インスタンスが他のオブジェクトを照らすことができるかどうかを取得します。
Returns: boolean - 現在の光インスタンスが他のオブジェクトを照らすことができるかどうか。
getCastShadows()
public boolean getCastShadows()
光が他のオブジェクトに影を落とすことができるかどうかを取得します。
Returns: boolean - 光が他のオブジェクトに影を落とすことができるかどうか。
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getColor()
public Vector3 getColor()
光の色を取得します
Returns: Vector3 - the light’s color
getConstantAttenuation()
public double getConstantAttenuation()
光の総減衰を計算するための定数減衰を取得します
Returns: double - 光の総減衰を計算するための定数減衰
getDirection()
public Vector3 getDirection()
カメラが注視する方向を取得します。このプロパティの変更は getLookAt と getTarget にも影響します。
Returns: Vector3 - the direction that the camera is looking at. Changes on this property will also affects the getLookAt and getTarget.
getEntityRendererKey()
public EntityRendererKey getEntityRendererKey()
レンダラーに登録されたエンティティレンダラーのキーを取得します
Returns: EntityRendererKey - the key of the entity renderer registered in the renderer
getExcluded()
public boolean getExcluded()
エクスポート時にこのエンティティを除外するかどうかを取得します。
Returns: boolean - エクスポート時にこのエンティティを除外するかどうか。
getFalloff()
public double getFalloff()
減衰コーン角度(度単位)を取得します。
Returns: double - 減衰コーン角度(度単位)。
getFarPlane()
public double getFarPlane()
フラスタムの遠平面距離を取得します。
Returns: double - フラスタムの遠面距離。
getHotSpot()
public double getHotSpot()
ホットスポットコーン角度(度)を取得します。
Returns: double - ホットスポットコーン角度(度単位)。
getIntensity()
public double getIntensity()
光の強度を取得します。デフォルト値は 100 です。
Returns: double - 光の強度、デフォルト値は 100 です。
getLightType()
public LightType getLightType()
光のタイプを取得します。
Returns: LightType - the light’s type
getLinearAttenuation()
public double getLinearAttenuation()
光の総減衰を計算するための線形減衰を取得します。
Returns: double - 光の総減衰を計算するための線形減衰
getLookAt()
public Vector3 getLookAt()
カメラが注目している位置を取得します。
Returns: Vector3 - the the interested position that the camera is looking at.
getName()
public String getName()
名前を取得します。
Returns: java.lang.String - 名前です。
getNearPlane()
public double getNearPlane()
視錐台の近接平面距離を取得します。
Returns: double - フラスタムの近面距離。
getOrthoHeight()
public double getOrthoHeight()
正射投影時の視錐台の高さを取得します。
Returns: double - フラスタムが正射投影の場合の高さ。
getParentNode()
public Node getParentNode()
最初の親ノードを取得します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。
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()
すべての親ノードを取得します。エンティティはジオメトリインスタンシングのために複数の親ノードにアタッチできます。
Returns: java.util.ArrayList<com.aspose.threed.Node> - すべての親ノード、エンティティはジオメトリ インスタンシングのために複数の親ノードにアタッチできます
getProperties()
public PropertyCollection getProperties()
すべてのプロパティのコレクションを取得します。
Returns: PropertyCollection - the collection of all properties.
getProperty(String property)
public Object getProperty(String property)
指定されたプロパティの値を取得します
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| プロパティ | java.lang.String | プロパティ名 |
Returns: java.lang.Object - 見つかったプロパティの値
getQuadraticAttenuation()
public double getQuadraticAttenuation()
光の総減衰を計算するための二次減衰を取得します。
Returns: double - 光の総減衰を計算するための二次減衰
getRotationMode()
public RotationMode getRotationMode()
フラスタムの向きモードを取得します。このプロパティは getTarget が null の場合にのみ機能します。値が RotationMode.FIXED_TARGET の場合、方向は常にプロパティ getLookAt によって計算されます。それ以外の場合、getLookAt は常に getDirection によって計算されます。
Returns: RotationMode - the frustum’s orientation mode This property only works when the getTarget is null. If the value is RotationMode.FIXED_TARGET, the direction is always calculated by the property getLookAt Otherwise the getLookAt is always calculated by the getDirection
getScene()
public Scene getScene()
このオブジェクトが属するシーンを取得します
Returns: Scene - the scene that this object belongs to
getShadowColor()
public Vector3 getShadowColor()
影の色を取得します。
Returns: Vector3 - the shadow’s color.
getTarget()
public Node getTarget()
カメラが注視するターゲットを取得します。ユーザーがこのプロパティをサポートしている場合、getLookAt プロパティよりも先に設定すべきです。
Returns: Node - the target that the camera is looking at. If the user supports this property, it should be prior to getLookAt property.
getUp()
public Vector3 getUp()
カメラの上方向を取得します。
Returns: Vector3 - the up direction of the camera
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)
動的プロパティを削除します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| property | Property | 削除するプロパティ |
Returns: boolean - プロパティが正常に削除された場合は true
removeProperty(String property)
public boolean removeProperty(String property)
名前で識別される指定されたプロパティを削除します
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| プロパティ | java.lang.String | 削除するプロパティ |
Returns: boolean - プロパティが正常に削除された場合は true
setAspect(double value)
public void setAspect(double value)
視錐台のアスペクト比を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setCastLight(boolean value)
public void setCastLight(boolean value)
現在の光インスタンスが他のオブジェクトを照らすかどうかを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | boolean | 新しい値 |
setCastShadows(boolean value)
public void setCastShadows(boolean value)
光が他のオブジェクトに影を落とすかどうかを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | boolean | 新しい値 |
setColor(Vector3 value)
public void setColor(Vector3 value)
光の色を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Vector3 | 新しい値 |
setConstantAttenuation(double value)
public void setConstantAttenuation(double value)
光の総減衰を計算するための一定減衰を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setDirection(Vector3 value)
public void setDirection(Vector3 value)
カメラが注視する方向を設定します。このプロパティの変更は getLookAt と getTarget にも影響します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Vector3 | 新しい値 |
setExcluded(boolean value)
public void setExcluded(boolean value)
エクスポート時にこのエンティティを除外するかどうかを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | boolean | 新しい値 |
setFalloff(double value)
public void setFalloff(double value)
減衰コーン角度(度)を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setFarPlane(double value)
public void setFarPlane(double value)
視錐台の遠平面距離を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setHotSpot(double value)
public void setHotSpot(double value)
ホットスポットコーン角度(度)を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setIntensity(double value)
public void setIntensity(double value)
光の強度を設定します。デフォルト値は 100 です。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setLightType(LightType value)
public void setLightType(LightType value)
光のタイプを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | LightType | 新しい値 |
setLinearAttenuation(double value)
public void setLinearAttenuation(double value)
光の総減衰を計算するための線形減衰を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setLookAt(Vector3 value)
public void setLookAt(Vector3 value)
カメラが注目している位置を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Vector3 | 新しい値 |
setName(String value)
public void setName(String value)
名前を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | java.lang.String | 新しい値 |
setNearPlane(double value)
public void setNearPlane(double value)
フラスタムの近面距離を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setOrthoHeight(double value)
public void setOrthoHeight(double value)
フラスタムが正射投影の場合の高さを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setParentNode(Node value)
public void setParentNode(Node value)
最初の親ノードを設定します。最初の親ノードを設定すると、このエンティティは他の親ノードから切り離されます。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Node | 新しい値 |
setProperty(String property, Object value)
public void setProperty(String property, Object value)
指定されたプロパティの値を設定します
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| プロパティ | java.lang.String | プロパティ名 |
| 値 | java.lang.Object | プロパティの値 |
setQuadraticAttenuation(double value)
public void setQuadraticAttenuation(double value)
光の総減衰を計算するための二次減衰を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| 値 | double | 新しい値 |
setRotationMode(RotationMode value)
public void setRotationMode(RotationMode value)
フラスタムの向きモードを設定します。このプロパティは getTarget が null の場合にのみ機能します。値が RotationMode.FIXED_TARGET の場合、方向は常にプロパティ getLookAt によって計算されます。それ以外の場合、getLookAt は常に getDirection によって計算されます。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | RotationMode | 新しい値 |
setShadowColor(Vector3 value)
public void setShadowColor(Vector3 value)
影の色を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Vector3 | 新しい値 |
setTarget(Node value)
public void setTarget(Node value)
カメラが注視している対象を設定します。ユーザーがこのプロパティをサポートしている場合、getLookAt プロパティより前に設定すべきです。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Node | 新しい値 |
setUp(Vector3 value)
public void setUp(Vector3 value)
カメラの上方向を設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| value | Vector3 | 新しい値 |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| arg0 | long | |
| arg1 | int |