C# 클래스 Axiom.Core.Light

Representation of a dynamic light source in the scene.
Lights are added to the scene like any other object. They contain various parameters like type, position, attenuation (how light intensity fades with distance), color etc.

The defaults when a light is created is pure white diffuse light, with no attenuation (does not decrease with distance) and a range of 1000 world units.

Lights are created by using the SceneManager.CreateLight method. They can subsequently be added to a SceneNode if required to allow them to move relative to a node in the scene. A light attached to a SceneNode is assumed to have a base position of (0,0,0) and a direction of (0,0,1) before modification by the SceneNode's own orientation. If note attached to a SceneNode, the light's position and direction is as set using Position and Direction.

Remember also that dynamic lights rely on modifying the color of vertices based on the position of the light compared to an object's vertex normals. Dynamic lighting will only look good if the object being lit has a fair level of tesselation and the normals are properly set. This is particularly true for the spotlight which will only look right on highly tessellated models.

상속: Axiom.Core.MovableObject, IComparable
파일 보기 프로젝트 열기: mono-soc-2011/axiom 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DefaultDirection Vector3
animableAttributes string[]

보호된 프로퍼티들

프로퍼티 타입 설명
attenuationConst float
attenuationLinear float
attenuationQuad float
derivedDirection Vector3
derivedPosition Vector3
diffuse ColorEx
direction Vector3
frustumClipVolumes PlaneBoundedVolumeList
lastParentOrientation Axiom.Math.Quaternion
lastParentPosition Vector3
localTransformDirty bool
nearClipVolume Axiom.Math.PlaneBoundedVolume
ownShadowFarDistance bool
position Vector3
powerScale Real
range float
shadowFarDistance Real
shadowFarDistanceSquared Real
specular ColorEx
spotFalloff float
spotInner float
spotOuter float
tempSquaredDist float
type LightType

공개 메소드들

메소드 설명
CompareTo ( object obj ) : int

Used to compare this light to another light for sorting.

CreateAnimableValue ( string valueName ) : Axiom.Animating.AnimableValue
GetAs4DVector ( ) : Vector4

Gets the details of this light as a 4D vector.

Getting details of a light as a 4D vector can be useful for doing general calculations between different light types; for example the vector can represent both position lights (w=1.0f) and directional lights (w=0.0f) and be used in the same calculations.

Light ( ) : System

Default constructor.

Light ( string name ) : System

Normal constructor. Should not be called directly, but rather the SceneManager.CreateLight method should be used.

NotifyCurrentCamera ( Camera camera ) : void
ResetCustomShadowCameraSetup ( ) : void

Reset the shadow camera setup to the default.

SetAttenuation ( float range, float constant, float linear, float quadratic ) : void

Sets the attenuation parameters of the light in a single call.

SetSpotlightRange ( float innerAngle, float outerAngle ) : void

SetSpotlightRange ( float innerAngle, float outerAngle, float falloff ) : void

Sets the spotlight parameters in a single call.

Update ( ) : void

Updates this lights position.

UpdateRenderQueue ( RenderQueue queue ) : void

비공개 메소드들

메소드 설명
GetFrustumClipVolumes ( Camera camera ) : PlaneBoundedVolumeList

Internal method for calculating the clip volumes outside of the frustum which can be used to determine which objects are casting shadow on the frustum as a whole.

Each of the volumes is a pyramid for a point/spot light and a cuboid for a directional light.

GetNearClipVolume ( Camera camera ) : PlaneBoundedVolume

Internal method for calculating the 'near clip volume', which is the volume formed between the near clip rectangle of the camera and the light.

This volume is a pyramid for a point/spot light and a cuboid for a directional light. It can used to detect whether an object could be casting a shadow on the viewport. Note that the reference returned is to a shared volume which will be reused across calls to this method.

메소드 상세

CompareTo() 공개 메소드

Used to compare this light to another light for sorting.
public CompareTo ( object obj ) : int
obj object
리턴 int

CreateAnimableValue() 공개 메소드

public CreateAnimableValue ( string valueName ) : Axiom.Animating.AnimableValue
valueName string
리턴 Axiom.Animating.AnimableValue

GetAs4DVector() 공개 메소드

Gets the details of this light as a 4D vector.
Getting details of a light as a 4D vector can be useful for doing general calculations between different light types; for example the vector can represent both position lights (w=1.0f) and directional lights (w=0.0f) and be used in the same calculations.
public GetAs4DVector ( ) : Vector4
리턴 Vector4

Light() 공개 메소드

Default constructor.
public Light ( ) : System
리턴 System

Light() 공개 메소드

Normal constructor. Should not be called directly, but rather the SceneManager.CreateLight method should be used.
public Light ( string name ) : System
name string
리턴 System

NotifyCurrentCamera() 공개 메소드

public NotifyCurrentCamera ( Camera camera ) : void
camera Camera
리턴 void

ResetCustomShadowCameraSetup() 공개 메소드

Reset the shadow camera setup to the default.
public ResetCustomShadowCameraSetup ( ) : void
리턴 void

SetAttenuation() 공개 메소드

Sets the attenuation parameters of the light in a single call.
public SetAttenuation ( float range, float constant, float linear, float quadratic ) : void
range float
constant float
linear float
quadratic float
리턴 void

SetSpotlightRange() 공개 메소드

public SetSpotlightRange ( float innerAngle, float outerAngle ) : void
innerAngle float
outerAngle float
리턴 void

SetSpotlightRange() 공개 메소드

Sets the spotlight parameters in a single call.
public SetSpotlightRange ( float innerAngle, float outerAngle, float falloff ) : void
innerAngle float
outerAngle float
falloff float
리턴 void

Update() 공개 메소드

Updates this lights position.
public Update ( ) : void
리턴 void

UpdateRenderQueue() 공개 메소드

public UpdateRenderQueue ( RenderQueue queue ) : void
queue Axiom.Graphics.RenderQueue
리턴 void

프로퍼티 상세

DefaultDirection 공개적으로 정적으로 프로퍼티

public static Vector3 DefaultDirection
리턴 Vector3

animableAttributes 공개적으로 정적으로 프로퍼티

public static string[] animableAttributes
리턴 string[]

attenuationConst 보호되어 있는 프로퍼티

protected float attenuationConst
리턴 float

attenuationLinear 보호되어 있는 프로퍼티

protected float attenuationLinear
리턴 float

attenuationQuad 보호되어 있는 프로퍼티

protected float attenuationQuad
리턴 float

derivedDirection 보호되어 있는 프로퍼티

Derived direction of this light.
protected Vector3 derivedDirection
리턴 Vector3

derivedPosition 보호되어 있는 프로퍼티

Derived position of this light.
protected Vector3 derivedPosition
리턴 Vector3

diffuse 보호되어 있는 프로퍼티

Diffuse color.
protected ColorEx,Axiom.Core diffuse
리턴 ColorEx

direction 보호되어 있는 프로퍼티

Direction of this light.
protected Vector3 direction
리턴 Vector3

frustumClipVolumes 보호되어 있는 프로퍼티

protected PlaneBoundedVolumeList frustumClipVolumes
리턴 PlaneBoundedVolumeList

lastParentOrientation 보호되어 있는 프로퍼티

Stored version of parent orientation.
protected Quaternion,Axiom.Math lastParentOrientation
리턴 Axiom.Math.Quaternion

lastParentPosition 보호되어 있는 프로퍼티

Stored version of parent position.
protected Vector3 lastParentPosition
리턴 Vector3

localTransformDirty 보호되어 있는 프로퍼티

protected bool localTransformDirty
리턴 bool

nearClipVolume 보호되어 있는 프로퍼티

Stored version of the last near clip volume tested.
protected PlaneBoundedVolume,Axiom.Math nearClipVolume
리턴 Axiom.Math.PlaneBoundedVolume

ownShadowFarDistance 보호되어 있는 프로퍼티

protected bool ownShadowFarDistance
리턴 bool

position 보호되어 있는 프로퍼티

Position of this light.
protected Vector3 position
리턴 Vector3

powerScale 보호되어 있는 프로퍼티

protected Real powerScale
리턴 Real

range 보호되어 있는 프로퍼티

protected float range
리턴 float

shadowFarDistance 보호되어 있는 프로퍼티

protected Real shadowFarDistance
리턴 Real

shadowFarDistanceSquared 보호되어 있는 프로퍼티

protected Real shadowFarDistanceSquared
리턴 Real

specular 보호되어 있는 프로퍼티

Specular color.
protected ColorEx,Axiom.Core specular
리턴 ColorEx

spotFalloff 보호되어 있는 프로퍼티

protected float spotFalloff
리턴 float

spotInner 보호되어 있는 프로퍼티

protected float spotInner
리턴 float

spotOuter 보호되어 있는 프로퍼티

protected float spotOuter
리턴 float

tempSquaredDist 보호되어 있는 프로퍼티

Used for sorting. Internal for "friend" access to SceneManager.
protected float tempSquaredDist
리턴 float

type 보호되어 있는 프로퍼티

Type of light.
protected LightType type
리턴 LightType